/* ── Demo verify widget ──────────────────────────────────────────────────── */

#demo-verify {
  background: var(--surface, #f8fafc);
  color: var(--ink, #0a0a0a);
}

/* Dark-mode override: matches Bootstrap bg-dark / text-white semantics
   using design tokens so the rest of the site stays in sync. */
[data-theme="dark"] #demo-verify {
  background: var(--paper, #0b1220);
  color: #ffffff;
}
[data-theme="dark"] #demo-verify .text-secondary,
[data-theme="dark"] #demo-verify .ec-demo-card__kicker {
  color: var(--muted, #94a3b8) !important;
}

#demo-verify-form {
  max-width: 560px;
}

.demo-result-card {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .demo-result-card {
  background: #1e293b;
  border-color: #334155;
}

/* Status badge */
.demo-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Band chip */
.demo-band-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 0.5rem;
}

/* Band colours */
.band-excellent {
  background: #d1fae5;
  color: #065f46;
}
.band-good {
  background: #dbeafe;
  color: #1e40af;
}
.band-risky {
  background: #fef3c7;
  color: #92400e;
}
.band-poor {
  background: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .band-excellent { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .band-good      { background: #1e3a8a; color: #93c5fd; }
[data-theme="dark"] .band-risky     { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .band-poor      { background: #7f1d1d; color: #fca5a5; }

/* Status background colours (reuse band logic) */
.status-valid    { background: #d1fae5; color: #065f46; }
.status-risky    { background: #fef3c7; color: #92400e; }
.status-invalid  { background: #fee2e2; color: #991b1b; }
.status-unknown  { background: #f1f5f9; color: #475569; }

[data-theme="dark"] .status-valid   { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .status-risky   { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .status-invalid { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .status-unknown { background: #1e293b; color: #94a3b8; }

/* CTA link */
.demo-cta-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f766e;
  text-decoration: none;
}
.demo-cta-link:hover {
  text-decoration: underline;
}

/* Spinner */
.demo-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: demo-spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

/* Turnstile container keeps consistent height so layout doesn't jump */
#demo-turnstile-wrap {
  min-height: 65px;
}

/* Adblocker notice */
#demo-captcha-notice {
  font-size: 0.82rem;
  color: #92400e;
}

/* ── New split-layout demo (validemail.net-inspired) ─────────────────────
   All colors now derive from design tokens (--ink, --paper, --muted,
   --rule, --brand, --brand-subtle, --paper-elevated, --surface-2). Those
   tokens flip automatically across:
     - light (default :root)
     - explicit dark ([data-theme="dark"])
     - OS dark + no toggle (@media prefers-color-scheme: dark :root:not([data-theme]))
   so this section needs ONE rule per element rather than three.        */
.ec-demo-section {
  background: linear-gradient(180deg, var(--paper-cool) 0%, var(--paper) 100%);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}
.ec-demo-eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--brand-subtle); color: var(--brand-emphasis);
  padding: .35rem .9rem; border-radius: 999px;
  font-size: .82rem; font-weight: 600;
}
.ec-demo-h2 {
  font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.15;
  color: var(--ink);
}
.ec-demo-bullets li {
  display: flex; align-items: center; gap: .65rem;
  padding: .35rem 0; color: var(--ink-soft);
}
.ec-demo-bullets li i {
  color: var(--brand); font-size: 1.05rem;
}

.ec-demo-cta-grad {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--brand-emphasis) 0%, var(--brand) 100%);
  box-shadow: 0 8px 24px rgba(13, 148, 136, .28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ec-demo-cta-grad:hover {
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(13, 148, 136, .36);
}

.ec-demo-card {
  background: var(--paper-elevated);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .08);
  overflow: hidden;
  color: var(--ink);
}
.ec-demo-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule-soft);
}
.ec-demo-card__kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand-emphasis);
}
.ec-demo-card__title {
  font-size: 1.15rem; font-weight: 700; margin-top: .2rem;
  color: var(--ink);
}
.ec-demo-card__badge {
  display: inline-flex; padding: .35rem .75rem; border-radius: 8px;
  background: var(--paper); color: var(--muted); font-size: .75rem; font-weight: 600;
  border: 1px solid var(--rule); white-space: nowrap;
}
.ec-demo-card__body { padding: 1.5rem; color: var(--ink); }
.ec-demo-input-row {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.ec-demo-input {
  flex: 1 1 240px; min-width: 200px;
  border: 2px solid var(--rule); border-radius: 12px;
  padding: .85rem 1rem; font-size: 1rem;
  background: var(--paper); color: var(--ink);
}
.ec-demo-input::placeholder { color: var(--muted-soft); }
.ec-demo-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .18);
  outline: none;
}
.ec-demo-submit {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 0 1.5rem; border: none; border-radius: 12px;
  background: var(--brand-emphasis); color: #fff; font-weight: 600;
  white-space: nowrap; cursor: pointer; min-height: 52px;
  transition: background .15s, transform .15s;
}
.ec-demo-submit:hover:not(:disabled) { background: var(--brand); transform: translateY(-1px); }
.ec-demo-submit:disabled { opacity: .5; cursor: not-allowed; }

.ec-demo-result {
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: 12px; padding: 1rem;
  color: var(--ink);
}
.ec-demo-result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem 1.25rem;
  font-size: .9rem;
}
@media (max-width: 540px) { .ec-demo-result-grid { grid-template-columns: 1fr; } }
.ec-demo-result-row {
  display: flex; align-items: baseline; gap: .4rem; padding: .35rem 0;
  border-bottom: 1px dashed var(--rule-soft);
}
.ec-demo-result-row i { color: var(--muted); width: 16px; flex-shrink: 0; }
.ec-demo-result-row__label { font-weight: 600; color: var(--ink-soft); }
.ec-demo-result-row__value { color: var(--ok); font-weight: 500; word-break: break-all; }
.ec-demo-result-row__value.is-false { color: var(--muted); }
.ec-demo-result-row__value.is-bad { color: var(--bad); }
.ec-demo-result-row a { color: var(--brand); }

/* Stats strip */
.ec-demo-stats {
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  color: #e2e8f0; padding: 3rem 0;
}
.ec-demo-stat {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 1.5rem 1rem; text-align: center;
  transition: transform .15s, background .15s;
}
.ec-demo-stat:hover { transform: translateY(-2px); background: rgba(255,255,255,.05); }
.ec-demo-stat__icon { font-size: 1.5rem; color: #818cf8; margin-bottom: .5rem; opacity: .85; }
.ec-demo-stat__big { font-size: 1.85rem; font-weight: 800; line-height: 1.1; color: #fff; }
.ec-demo-stat__small { font-size: .85rem; color: #94a3b8; margin-top: .15rem; }
.ec-demo-trust {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px; display: inline-block; padding: .65rem 1.5rem;
  font-size: .9rem; color: #cbd5e1;
}
.ec-demo-stats .container { text-align: center; }
.ec-demo-stats .container > .row { text-align: left; }

/* Force white submit button label regardless of theme (button bg stays brand). */
.ec-demo-submit, .ec-demo-submit i { color: #fff; }

/* Override Bootstrap's .text-secondary inside the demo so it follows our muted
   token instead of Bootstrap's color-mode default (which can clash with the
   tokenised --paper background in OS dark mode). */
.ec-demo-section .text-secondary { color: var(--muted) !important; }
