/* Integrations page — outbound webhooks. Loads after tokens/components/app. */

.integ-page { padding: 24px 0 64px; }
.integ-page .breadcrumbs { margin-bottom: 20px; }

.integ-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.integ-head h1 { font-size: 32px; font-family: var(--font-head); line-height: 1.15; }
.integ-honest {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 12px 0 28px; padding: 12px 16px;
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--r-card); background: var(--bg-soft);
  font-size: 14px; color: var(--ink); line-height: 1.5;
}
.integ-honest svg { width: 18px; height: 18px; flex: none; color: var(--brand); margin-top: 2px; }

.integ-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .integ-grid { grid-template-columns: 1fr; } }

.integ-card {
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg);
  box-shadow: var(--shadow-card); padding: 20px;
}
.integ-card h2 { font-size: 18px; margin-bottom: 4px; }
.integ-card > p.lead { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

/* ---- create form ---- */
.wh-form { display: grid; gap: 14px; }
.wh-form label { font-size: 13px; font-weight: 600; color: var(--ink); }
.wh-form input[type="url"] {
  width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-input); background: var(--bg); color: var(--ink);
}
.wh-form input[type="url"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.wh-form .hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.wh-events { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.wh-events li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.wh-events input { width: 16px; height: 16px; accent-color: var(--brand); }
.wh-events code { font-size: 13px; background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; }
.wh-form .btn { justify-self: start; }

/* ---- the one-time secret ---- */
.secret-box {
  margin-top: 16px; padding: 16px; border-radius: var(--r-card);
  border: 1px solid var(--accent-dark); background: var(--accent-wash);
}
.secret-box[hidden] { display: none; }
.secret-box h3 { font-size: 15px; margin-bottom: 6px; }
.secret-box p { font-size: 13px; color: var(--ink); line-height: 1.5; }
.secret-box p strong { color: var(--danger-ink); }
.secret-row { display: flex; gap: 8px; align-items: stretch; margin: 10px 0 8px; }
.secret-row code {
  flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-all;
  font-size: 12.5px; line-height: 1.5; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-input); background: var(--bg); color: var(--ink);
  user-select: all;
}
.secret-row .btn { flex: none; align-self: center; }
.secret-box .secret-done { margin-top: 8px; }

/* ---- hook list ---- */
.wh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wh-item {
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg);
  box-shadow: var(--shadow-card); padding: 16px 18px;
}
.wh-item[data-status="revoked"] { opacity: .72; }
.wh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wh-url { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; word-break: break-all; color: var(--ink); }
.wh-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.wh-meta strong { color: var(--ink); font-weight: 600; }
.wh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wh-chips code { font-size: 12px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg-soft); border: 1px solid var(--line); }
.wh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.wh-actions .btn-sm { height: 34px; padding-inline: 12px; font-size: 13px; }
.wh-actions .btn-danger { color: var(--danger-ink); border-color: var(--danger-wash); background: var(--danger-wash); }
.wh-actions .btn-danger:not(:disabled):hover { border-color: var(--danger); }
.wh-note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.wh-note[hidden] { display: none; }
.wh-note.is-bad { color: var(--danger-ink); }
.wh-note.is-good { color: var(--success-ink); }

.status-pill[data-status="active"] { background: #E6F7EF; color: var(--success-ink); }
.status-pill[data-status="paused"] { background: #FFF4E0; color: #8A5200; }
.status-pill[data-status="revoked"] { background: var(--danger-wash); color: var(--danger-ink); }

/* ---- deliveries drawer ---- */
.wh-drawer { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.wh-drawer[hidden] { display: none; }
.wh-drawer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.dlv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dlv-table th, .dlv-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dlv-table th { font-weight: 600; color: var(--muted); font-size: 12px; }
.dlv-table td.ok { color: var(--success-ink); font-weight: 600; }
.dlv-table td.bad { color: var(--danger-ink); font-weight: 600; }
.dlv-table td code { font-size: 12px; }
.dlv-wrap { overflow-x: auto; }
.dlv-empty { font-size: 13px; color: var(--muted); }

/* ---- verify snippet ---- */
.integ-verify pre {
  margin: 10px 0 0; padding: 12px 14px; font-size: 12.5px; line-height: 1.55;
  border: 1px solid var(--line); border-radius: var(--r-input); background: var(--bg-soft);
  overflow-x: auto; white-space: pre; color: var(--ink);
}
.integ-verify ul { margin: 10px 0 0 18px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.integ-verify li code { color: var(--ink); }

.integ-empty { text-align: center; padding: 32px 20px; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: var(--r-card); }
