/* ═════════════════════════════════════════════════════════════════════
   SPECTRA /// SENDER — Webhooks
   ═════════════════════════════════════════════════════════════════════ */

.wh-list { display: flex; flex-direction: column; gap: 14px; }

.wh-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s;
}
.wh-card:hover { border-color: var(--border-hi); }
.wh-card.disabled { opacity: 0.6; }

.wh-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.wh-card-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.wh-card-title-text { min-width: 0; }
.wh-url {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-bright);
  word-break: break-all;
  margin-bottom: 4px;
}
.wh-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}
.wh-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.wh-dot.on  { background: var(--green); box-shadow: 0 0 8px var(--green); }
.wh-dot.off { background: var(--fg-mute); }

.wh-card-actions { display: flex; gap: 4px; flex-wrap: wrap; }

.wh-card-meta {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
}
@media (max-width: 720px) { .wh-card-meta { grid-template-columns: 1fr; } }

.wh-meta-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wm-k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 600;
}
.wm-v {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-bright);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wm-v.ok  { color: var(--green); }
.wm-v.warn { color: var(--amber); }
.wm-v.err { color: var(--red); }

.wh-secret {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}
.wh-copy {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--fg-faint);
  cursor: pointer;
  transition: all 0.15s;
  background: none;
  border: none;
  padding: 0;
}
.wh-copy:hover { color: var(--product); background: var(--product-soft); }
.wh-copy svg { width: 11px; height: 11px; }

.wh-last {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: var(--r-pill);
}
.wh-last.ok  { background: var(--green-soft); color: var(--green); }
.wh-last.err { background: var(--red-soft); color: var(--red); }

.wh-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wh-event-chip {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--fg-faint);
  opacity: 0.55;
}
.wh-event-chip.on {
  opacity: 1;
  background: var(--product-soft);
  border-color: var(--product-line);
  color: var(--product);
}

.wh-add-wrap {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

/* Event reference table */
.wh-event-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wh-event-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 12.5px;
}
.wh-event-row:last-child { border-bottom: none; }
.wh-event-row.head {
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 600;
  padding-bottom: 8px;
}
.wh-event-id {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--product);
  font-weight: 500;
}
.wh-event-desc { color: var(--fg-dim); line-height: 1.5; }

/* Schema */
.wh-schema {
  background: var(--terminal-bg);
  color: var(--terminal-fg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}

/* Editor modal */
.wh-secret-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.wh-secret-row .input { flex: 1; }

.wh-event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
@media (max-width: 640px) { .wh-event-grid { grid-template-columns: 1fr; } }

.wh-event-check {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
}
.wh-event-check input { display: none; }
.wh-event-check:hover { background: var(--card-bg); }
.wh-event-check.on {
  background: var(--product-soft);
  border-color: var(--product-line);
}
.wh-event-body { flex: 1; min-width: 0; }
.wh-event-id-sm {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-bright);
  font-weight: 500;
  margin-bottom: 2px;
}
.wh-event-check.on .wh-event-id-sm { color: var(--product); }
.wh-event-desc-sm {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-mute);
  line-height: 1.5;
}