/* WCAG Audit Teaser – Public Sales Tool */
.wcag-teaser {
  --ts-brand:    #29b6c8;
  --ts-dark:     #1a2235;
  --ts-ok:       #059669;
  --ts-warn:     #d97706;
  --ts-crit:     #dc2626;
  --ts-info:     #2563eb;
  --ts-muted:    #64748b;
  --ts-border:   #e2e8f0;
  --ts-bg:       #f4f6fb;
  --ts-radius:   14px;
  --ts-shadow:   0 4px 24px rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Step management ───────────────────────────────────────────────── */
.wcag-ts-step { display: none; }
.wcag-ts-step.is-active { display: block; }

/* ── Step 1: Hero / URL input ──────────────────────────────────────── */
.wcag-ts-hero {
  background: linear-gradient(145deg, #0b0f14 0%, #1a2235 55%, #29b6c8 100%);
  border-radius: var(--ts-radius);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--ts-shadow);
}

.wcag-ts-icon-wrap {
  color: var(--ts-brand);
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  opacity: .8;
}
.wcag-ts-icon-wrap svg { width: 100%; height: 100%; }

.wcag-ts-heading {
  color: #fff !important;
  font-size: clamp(22px, 4vw, 32px) !important;
  font-weight: 700 !important;
  margin: 0 0 12px !important;
  line-height: 1.2 !important;
}

.wcag-ts-subheading {
  color: rgba(255,255,255,.75);
  font-size: 16px;
  margin: 0 0 28px;
  line-height: 1.5;
}

.wcag-ts-url-form {
  display: flex;
  gap: 10px;
  max-width: 540px;
  margin: 0 auto 14px;
}

.wcag-ts-input-wrap { flex: 1; }
.wcag-ts-input-wrap input[type="url"] {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  color: #fff;
  outline: none;
  transition: border-color .2s, background .2s;
  font-family: inherit;
}
.wcag-ts-input-wrap input[type="url"]::placeholder { color: rgba(255,255,255,.45); }
.wcag-ts-input-wrap input[type="url"]:focus {
  border-color: var(--ts-brand);
  background: rgba(255,255,255,.15);
}

.wcag-ts-btn-primary {
  padding: 13px 22px;
  background: var(--ts-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.wcag-ts-btn-primary:hover { background: #1e8fa0; transform: translateY(-1px); }
.wcag-ts-btn-primary:active { transform: translateY(0); }
.wcag-ts-btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.wcag-ts-hint {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  margin: 0;
}

.wcag-ts-error {
  color: #fca5a5;
  font-size: 13px;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(220,38,38,.15);
  border-radius: 6px;
}

/* ── Step 2: Scanner animation ─────────────────────────────────────── */
.wcag-ts-scan-anim {
  padding: 48px 32px;
  text-align: center;
  background: var(--ts-dark);
  border-radius: var(--ts-radius);
  box-shadow: var(--ts-shadow);
}

.wcag-ts-scanner-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
}

.wcag-ts-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ts-brand);
}
.wcag-ts-ring-1 { animation: wcag-ts-pulse 2.4s ease-out infinite; }
.wcag-ts-ring-2 { animation: wcag-ts-pulse 2.4s ease-out .6s infinite; }
.wcag-ts-ring-3 { animation: wcag-ts-pulse 2.4s ease-out 1.2s infinite; }

@keyframes wcag-ts-pulse {
  0%   { transform: scale(.4); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.wcag-ts-scanner-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ts-brand);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 8px rgba(41,182,200,.2);
}

.wcag-ts-scan-headline {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
}

.wcag-ts-checklist {
  display: inline-block;
  text-align: left;
  min-width: 260px;
  margin-bottom: 24px;
}
.wcag-ts-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  padding: 5px 0;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .3s, transform .3s;
}
.wcag-ts-check-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.wcag-ts-check-item.is-done { color: #fff; }
.wcag-ts-check-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, border-color .3s;
}
.wcag-ts-check-item.is-done .wcag-ts-check-dot {
  background: var(--ts-ok);
  border-color: var(--ts-ok);
}
.wcag-ts-check-dot::after {
  content: '';
  width: 6px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  opacity: 0;
  transition: opacity .2s;
}
.wcag-ts-check-item.is-done .wcag-ts-check-dot::after { opacity: 1; }

.wcag-ts-progress-track {
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
  max-width: 340px;
  margin: 0 auto;
}
.wcag-ts-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ts-brand), #3dcfe2);
  border-radius: 999px;
  width: 0%;
  transition: width .4s ease;
}

/* ── Step 3: Results ───────────────────────────────────────────────── */
.wcag-ts-results-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  border-radius: var(--ts-radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--ts-shadow);
}

.wcag-ts-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wcag-ts-partial-badge {
  background: #e0f7fa;
  color: #0e7490;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.wcag-ts-result-url {
  font-size: 12px;
  color: var(--ts-muted);
  word-break: break-all;
  font-family: monospace;
}

.wcag-ts-partial-desc {
  font-size: 12px;
  color: var(--ts-muted);
  margin: 0;
  line-height: 1.5;
  border-top: 1px solid var(--ts-border);
  padding-top: 12px;
}

.wcag-ts-cards {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.wcag-ts-card {
  flex: 1;
  background: var(--ts-bg);
  border-radius: 8px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-top: 4px solid var(--ts-border);
  text-align: center;
}
.wcag-ts-card-crit { border-top-color: var(--ts-crit); }
.wcag-ts-card-warn { border-top-color: var(--ts-warn); }
.wcag-ts-card-info { border-top-color: var(--ts-info); }
.wcag-ts-card-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.wcag-ts-card-crit .wcag-ts-card-num { color: var(--ts-crit); }
.wcag-ts-card-warn .wcag-ts-card-num { color: var(--ts-warn); }
.wcag-ts-card-info .wcag-ts-card-num { color: var(--ts-info); }
.wcag-ts-card-lbl { font-size: 12px; font-weight: 600; color: #1e293b; }

/* ── Issues section ────────────────────────────────────────────────── */
.wcag-ts-issues-section {
  background: #fff;
  border-radius: var(--ts-radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--ts-shadow);
}
.wcag-ts-issues-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--ts-border);
  background: #f8faff;
}

.wcag-ts-sample-issues { padding: 0 0 0; }
.wcag-ts-issue-row {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--ts-border);
  font-size: 13px;
}
.wcag-ts-issue-sev {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.wcag-ts-sev-high   { background: #fee2e2; color: var(--ts-crit); }
.wcag-ts-sev-medium { background: #fef3c7; color: var(--ts-warn); }
.wcag-ts-sev-low    { background: #dbeafe; color: var(--ts-info); }
.wcag-ts-issue-plain { color: #1e293b; line-height: 1.4; }
.wcag-ts-issue-wcag { font-size: 11px; color: var(--ts-muted); text-align: right; }

/* ── Locked/blurred section ────────────────────────────────────────── */
.wcag-ts-locked-section { position: relative; overflow: hidden; }
.wcag-ts-blur-rows { padding: 8px 20px 16px; filter: blur(5px); user-select: none; }
.wcag-ts-blur-row {
  height: 36px;
  background: var(--ts-bg);
  border-radius: 6px;
  margin-bottom: 8px;
}
.wcag-ts-blur-row-short { width: 65%; }
.wcag-ts-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(2px);
  text-align: center;
  padding: 16px;
}
.wcag-ts-lock-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.wcag-ts-lock-overlay p { margin: 4px 0; font-size: 14px; color: #1e293b; }
.wcag-ts-lock-overlay strong { color: #1e293b; }
.wcag-ts-lock-sub { font-size: 13px; color: var(--ts-muted) !important; }

/* ── Email / contact form ───────────────────────────────────────────── */
.wcag-ts-email-form {
  background: linear-gradient(135deg, #0b0f14 0%, #1a2235 60%, #29b6c8 100%);
  border-radius: var(--ts-radius);
  padding: 32px;
  box-shadow: var(--ts-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wcag-ts-email-heading {
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0 0 16px !important;
  text-align: center;
  width: 100%;
  max-width: 480px;
}
.wcag-ts-contact-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 16px;
}
.wcag-ts-contact-fields input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
}
.wcag-ts-contact-fields input::placeholder { color: rgba(255,255,255,.45); }
.wcag-ts-contact-fields input:focus { border-color: var(--ts-brand); }

/* Consent block */
.wcag-ts-consent-wrap {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  margin-bottom: 20px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px;
  padding: 14px 16px;
}
.wcag-ts-consent-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  line-height: 1.5;
}
.wcag-ts-consent-label input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--ts-brand);
  cursor: pointer;
}
.wcag-ts-consent-details {
  margin-top: 10px;
}
.wcag-ts-consent-details summary {
  color: var(--ts-brand);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.wcag-ts-consent-details summary::-webkit-details-marker { display: none; }
.wcag-ts-consent-details summary::before { content: '▸ '; }
.wcag-ts-consent-details[open] summary::before { content: '▾ '; }
.wcag-ts-consent-details p {
  margin: 8px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
}

/* Submit button and error — constrained + centered by parent flex */
#wcag-ts-email-btn {
  width: 100%;
  max-width: 480px;
}
#wcag-ts-email-error {
  width: 100%;
  max-width: 480px;
}

/* ── Step 4: Thank you ─────────────────────────────────────────────── */
.wcag-ts-thankyou {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border-radius: var(--ts-radius);
  box-shadow: var(--ts-shadow);
}
.wcag-ts-check-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  color: var(--ts-ok);
}
.wcag-ts-check-circle svg { width: 100%; height: 100%; }
.wcag-ts-thankyou h3 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 0 0 12px !important;
}
.wcag-ts-thankyou p {
  color: var(--ts-muted);
  font-size: 15px;
  margin: 0 0 8px;
  line-height: 1.5;
}
.wcag-ts-cta-block { margin-top: 24px; }
.wcag-ts-cta-link {
  display: inline-block;
  padding: 12px 28px;
  background: var(--ts-brand);
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  border-radius: 9px;
  text-decoration: none !important;
  transition: background .15s;
}
.wcag-ts-cta-link:hover { background: #1e8fa0; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .wcag-ts-hero { padding: 32px 20px; }
  .wcag-ts-url-form { flex-direction: column; }
  .wcag-ts-results-wrap { padding: 16px; }
  .wcag-ts-cards { flex-wrap: wrap; }
  .wcag-ts-card { min-width: 80px; }
  .wcag-ts-issue-row { grid-template-columns: 70px 1fr; }
  .wcag-ts-issue-wcag { display: none; }
}
