/* =====================================================================================
   SmithersWebinar — THE single stylesheet. ALL CSS lives here (permanent rule).
   Palette is drawn from the Smithers logo: teal jacket, sunburst yellow, comic red,
   ink black. Every color resolves from --brand-* variables for one consistent app theme.
   ===================================================================================== */

:root {
    --brand-primary: #2e7d6e;      /* Smithers jacket teal */
    --brand-secondary: #e4372e;    /* bow-tie red — CTAs and accents */
    --brand-accent: #ffd84d;       /* sunburst yellow — highlights, badges */
    --brand-ink: #1b1b1f;          /* comic outline black */
    --brand-bg: #fffdf7;           /* warm paper white */
    --brand-surface: #f4f1e8;
    --brand-text: #1b1b1f;
    --brand-text-soft: #5c5f6b;
    --brand-border: #e6e2d4;
    --brand-radius: 14px;
}

[data-theme="dark"] {
    --brand-bg: #14161c;
    --brand-surface: #1e2129;
    --brand-text: #f2f0e8;
    --brand-text-soft: #a0a4b0;
    --brand-border: #2c3040;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--brand-bg); color: var(--brand-text); line-height: 1.55; }
a { color: var(--brand-primary); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; }

/* ---------- Motion primitives (reused everywhere — never re-declare per page) ---------- */
.sw-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.sw-reveal.sw-in, .no-js .sw-reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .sw-reveal { opacity: 1; transform: none; transition: none; } .sw-anim-float, .sw-pulse, .sw-orb, .sw-hero-emoji, .sw-live-dot { animation: none !important; } }
.sw-anim-float { display: inline-block; animation: sw-bob 3.4s ease-in-out infinite; animation-delay: var(--fd, 0s); }
@keyframes sw-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.sw-pulse { animation: sw-pulse 2.4s ease-in-out infinite; }
@keyframes sw-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(228,55,46,.45); } 50% { box-shadow: 0 0 0 14px rgba(228,55,46,0); } }
.sw-grad-text { background: linear-gradient(100deg, var(--brand-primary), var(--brand-secondary) 60%, var(--brand-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Shared chrome ---------- */
.sw-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 5vw; border-bottom: 3px solid var(--brand-ink); position: sticky; top: 0; background: var(--brand-bg); z-index: 50; }
.sw-logo { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; color: var(--brand-ink); }
.sw-logo-img { height: 46px; width: 46px; border-radius: 50%; }
.sw-nav { display: flex; gap: 22px; align-items: center; }
.sw-nav a { color: var(--brand-text); font-weight: 600; }
.sw-main { min-height: 70vh; }
.sw-footer { padding: 28px 5vw; border-top: 3px solid var(--brand-ink); color: var(--brand-text-soft); font-size: .9rem; text-align: center; background: var(--brand-surface); }

/* ---------- Buttons ---------- */
.sw-btn { display: inline-block; padding: 10px 22px; border-radius: calc(var(--brand-radius) - 4px); border: 2px solid var(--brand-ink); font-weight: 700; cursor: pointer; font-size: 1rem; transition: transform .12s ease; }
.sw-btn:hover { transform: translateY(-2px); }
.sw-btn-primary { background: var(--brand-secondary); color: #fff; box-shadow: 3px 3px 0 var(--brand-ink); }
.sw-btn-ghost { background: transparent; color: var(--brand-primary); border-color: var(--brand-primary); }
.sw-btn-lg { padding: 14px 30px; font-size: 1.1rem; }
.sw-btn-sm { padding: 6px 14px; font-size: .9rem; }
.sw-btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Hero with motion layer ---------- */
.sw-hero { position: relative; padding: 11vh 5vw 9vh; text-align: center; overflow: hidden; background: radial-gradient(circle at 70% 20%, rgba(255,216,77,.35), transparent 45%), radial-gradient(circle at 15% 80%, rgba(46,125,110,.18), transparent 50%), var(--brand-bg); }
.sw-hero-motion { position: absolute; inset: 0; pointer-events: none; }
.sw-orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; animation: sw-orbit 14s ease-in-out infinite; }
.sw-orb-1 { width: 130px; height: 130px; background: var(--brand-accent); top: 12%; left: 6%; }
.sw-orb-2 { width: 80px; height: 80px; background: var(--brand-primary); top: 65%; right: 10%; animation-delay: 3s; }
.sw-orb-3 { width: 55px; height: 55px; background: var(--brand-secondary); top: 25%; right: 22%; animation-delay: 6s; opacity: .35; }
@keyframes sw-orbit { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(18px,-26px) scale(1.12); } }
.sw-hero-emoji { position: absolute; bottom: -50px; left: calc(12% + var(--d, 0s) * 10%); font-size: 1.9rem; opacity: 0; animation: sw-rise 9s linear infinite; animation-delay: var(--d, 0s); }
@keyframes sw-rise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: .85; } 85% { opacity: .5; } 100% { transform: translateY(-88vh) scale(1.35); opacity: 0; } }
.sw-hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-ink); color: var(--brand-accent); padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: .85rem; margin-bottom: 22px; }
.sw-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand-secondary); animation: sw-blink 1.4s ease-in-out infinite; }
@keyframes sw-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.sw-hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); margin: 0 0 18px; }
.sw-hero-sub { max-width: 760px; margin: 0 auto 30px; font-size: 1.2rem; color: var(--brand-text-soft); }
.sw-hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.sw-hero-proof { margin-top: 28px; font-style: italic; color: var(--brand-text-soft); }

/* ---------- Sections / cards ---------- */
.sw-section { padding: 8vh 5vw; max-width: 1200px; margin: 0 auto; }
.sw-section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); text-align: center; margin-bottom: 12px; }
.sw-section-lead { max-width: 780px; margin: 0 auto 40px; text-align: center; color: var(--brand-text-soft); font-size: 1.1rem; }
.sw-section-alt { background: var(--brand-surface); max-width: none; }
.sw-section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.sw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 34px; }
.sw-card { background: var(--brand-bg); border: 2px solid var(--brand-ink); border-radius: var(--brand-radius); padding: 26px; box-shadow: 5px 5px 0 rgba(27,27,31,.14); transition: transform .15s ease, box-shadow .15s ease; }
.sw-card:hover { transform: translateY(-4px); box-shadow: 7px 9px 0 rgba(27,27,31,.18); }
.sw-card h3 { margin-top: 0; color: var(--brand-primary); }
.sw-card-icon { font-size: 2.2rem; margin-bottom: 8px; }
.sw-card-usecase { border-top: 6px solid var(--brand-accent); }
.sw-cta-band { text-align: center; }

/* ---------- Stats band ---------- */
.sw-stats-band { text-align: center; }
.sw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 30px; }
.sw-stat { background: var(--brand-ink); color: #fff; border-radius: var(--brand-radius); padding: 26px 20px; }
.sw-stat-num { display: block; font-size: 2.6rem; font-weight: 900; color: var(--brand-accent); }
.sw-stat-label { font-size: .92rem; color: #d7d9e0; }

/* ---------- How-it-works steps ---------- */
.sw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 34px; }
.sw-step { text-align: center; padding: 20px; }
.sw-step-num { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-accent); border: 3px solid var(--brand-ink); font-weight: 900; font-size: 1.3rem; margin-bottom: 10px; }

/* ---------- Forms ---------- */
form label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .95rem; }
form input, form select, form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--brand-border); border-radius: 8px; background: var(--brand-bg); color: var(--brand-text); font-size: 1rem; margin-top: 4px; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--brand-primary); }
form button { margin-top: 18px; }
.sw-inline-form { display: inline; }

/* ---------- Auth (sign in / sign up) ---------- */
.sw-auth { display: flex; justify-content: center; padding: 8vh 5vw; }
.sw-auth-card { width: 100%; max-width: 430px; }
.sw-auth-wide { max-width: 560px; }
.sw-auth-sub { color: var(--brand-text-soft); margin-top: -6px; }
.sw-auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--brand-text-soft); }
.sw-auth-divider::before, .sw-auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--brand-border); }
.sw-auth-message { color: var(--brand-secondary); font-weight: 700; }
.sw-auth-switch { text-align: center; margin-top: 16px; }
/* ---------- Dashboard ---------- */
.sw-dashboard { padding: 5vh 5vw; max-width: 1100px; margin: 0 auto; }
.sw-flash { background: var(--brand-surface); border-left: 5px solid var(--brand-primary); padding: 12px 16px; border-radius: 6px; }
.sw-create-card { margin: 24px 0 34px; }
.sw-campaign-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.sw-campaign-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sw-badge { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; background: var(--brand-surface); color: var(--brand-text-soft); }
.sw-badge-active { background: var(--brand-primary); color: #fff; }
.sw-badge-generating { background: var(--brand-accent); color: var(--brand-ink); }
.sw-badge-readyforreview { background: #2fa96d; color: #fff; }

/* ---------- Settings + injected CCL widgets (asc-*) ---------- */
.sw-settings-card { margin-top: 24px; }
.sw-tabs { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; border-bottom: 3px solid var(--brand-ink); }
.sw-tab { background: var(--brand-surface); color: var(--brand-text); border: 2px solid var(--brand-border); border-bottom: none; border-radius: 10px 10px 0 0; padding: 10px 20px; font-weight: 700; cursor: pointer; }
.sw-tab-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-ink); }
/* Consent proximity: the statement rides INSIDE the recording field (relocated by Settings JS) so
   what to read sits directly above the Record button — critical on mobile. */
.asc-pv-field--recording .asc-pv-consent { background: color-mix(in srgb, var(--brand-accent) 22%, transparent); border: 2px dashed var(--brand-primary); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; }
.asc-pv-consent-text { font-weight: 700; font-style: italic; }
.asc-pv-actions button, .asc-pv-record-start, .asc-pv-record-stop, .asc-pv-record-clear { background: var(--brand-primary); color: #fff; border: 2px solid var(--brand-ink); border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.asc-pv-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.asc-pv-field { margin: 12px 0; }
.asc-pv-panel, .asc-cfp-panel { border: 2px solid var(--brand-border); border-radius: var(--brand-radius); padding: 18px; background: var(--brand-bg); color: var(--brand-text); }
.asc-pv-panel h3, .asc-cfp-panel h3 { color: var(--brand-primary); margin-top: 0; }
.asc-pv-subtitle, .asc-pv-loading { color: var(--brand-text-soft); font-size: .92rem; }
.asc-pv-list { margin: 14px 0; display: grid; gap: 10px; }
.asc-pv-panel button, .asc-cfp-panel button { background: var(--brand-primary); color: #fff; border: 2px solid var(--brand-ink); border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.asc-pv-panel input, .asc-pv-panel select, .asc-cfp-panel input, .asc-cfp-panel select { border: 2px solid var(--brand-border); border-radius: 8px; padding: 8px 10px; background: var(--brand-bg); color: var(--brand-text); }
/* Shared layout for CCL widget form wrappers — inner
   grid + spacing classes emitted by AscWidgetHelpers. Kept ONCE here so every widget picks the same look. */
.asc-branding-header { margin-bottom: 14px; }
.asc-branding-subtitle { color: var(--brand-text-soft); font-size: .92rem; margin: 6px 0 0; }
.asc-branding-form { display: grid; gap: 14px; }
.asc-branding-field { display: flex; flex-direction: column; gap: 6px; }
.asc-branding-label { font-weight: 700; color: var(--brand-text); }
.asc-branding-input { width: 100%; }
.asc-branding-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.asc-branding-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.asc-field-hint { color: var(--brand-text-soft); font-size: .85rem; }
.asc-alert { border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.asc-alert--success { background: color-mix(in srgb, var(--brand-primary) 12%, transparent); color: var(--brand-primary); }
.asc-alert--error { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; }
.asc-alert--info { background: var(--brand-surface); color: var(--brand-text); }
@media (max-width: 640px) { .asc-branding-row { grid-template-columns: 1fr; } }

/* ---------- Create Webinar form (sw-form-card / sw-anchor-row / sw-form-inline-actions) ---------- */
.sw-form-card { margin-top: 18px; padding: 22px; }
.sw-form-card h2 { margin-top: 0; color: var(--brand-primary); }
.sw-required { color: #dc2626; font-weight: 700; }
.sw-form-inline-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.sw-hint { color: var(--brand-text-soft); font-size: .88rem; }
.sw-anchor-row { display: grid; grid-template-columns: 2fr 3fr auto; gap: 10px; margin-bottom: 8px; align-items: center; }
.sw-anchor-remove { padding: 4px 10px; }
.sw-radio-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 20px; font-weight: 400; }
.sw-form-actions { display: flex; gap: 12px; margin-top: 20px; }
.sw-feature-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.sw-check-card { display: flex; align-items: flex-start; gap: 10px; border: 2px solid var(--brand-border); border-radius: 8px; padding: 12px; background: var(--brand-bg); }
.sw-check-card input { width: auto; margin-top: 3px; }
.sw-check-card span { display: grid; gap: 4px; }
.asc-stripe-connect-card { margin: 18px 0; padding: 18px; border: 2px solid var(--brand-border); border-radius: 10px; background: var(--brand-bg); }
.asc-stripe-connect-header { display: flex; gap: 12px; align-items: flex-start; }
.asc-stripe-connect-icon { font-size: 1.5rem; line-height: 1; }
.asc-stripe-connect-title { margin: 0; color: var(--brand-primary); }
.asc-stripe-connect-sub { margin: 5px 0 0; color: var(--brand-text-soft); }
.asc-stripe-connect-status { margin-top: 14px; padding: 10px 12px; border-radius: 7px; font-weight: 700; }
.asc-stripe-connect-status--ok { background: color-mix(in srgb, #198754 12%, transparent); color: #146c43; }
.asc-stripe-connect-status--pending { background: color-mix(in srgb, #d97706 12%, transparent); color: #9a5a05; }
.asc-stripe-connect-cta { margin-top: 12px; }
.sw-paid-webinar-fee-note { margin: 16px 0; padding: 14px; border-left: 4px solid var(--brand-primary); background: var(--brand-surface); }
.sw-paid-webinar-fee-note h3 { margin: 0 0 6px; color: var(--brand-primary); }
.sw-paid-webinar-fee-note p { margin: 0; }
.sw-paid-webinar-warning { display: block; margin-top: 7px; color: #9a5a05; font-weight: 700; }
.sw-idea-sources { border-top: 2px solid var(--brand-border); margin-top: 22px; padding-top: 18px; }
.sw-idea-sources h3 { color: var(--brand-primary); margin: 0; }
.sw-knowledge-doc-list { display: grid; gap: 10px; margin: 12px 0; }
.sw-knowledge-doc-row { display: flex; gap: 10px; align-items: center; }
.sw-knowledge-doc-row .sw-knowledge-doc-card { flex: 1; }
.sw-knowledge-doc-row .sw-btn { margin-top: 0; }
.sw-knowledge-doc-card { align-items: center; }
@media (max-width: 640px) { .sw-knowledge-doc-row { align-items: stretch; flex-direction: column; } }
.sw-avatar-source-preview { display: grid; gap: 8px; margin-top: 16px; }
.sw-avatar-source-preview img { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; border: 2px solid var(--brand-border); }
.sw-avatar-library { display: grid; gap: 16px; margin-top: 18px; }
.sw-avatar-profile-card { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.sw-avatar-profile-media img,
.sw-avatar-empty-preview { width: 180px; aspect-ratio: 1; border-radius: 8px; border: 2px solid var(--brand-border); object-fit: cover; background: #f7f3e8; }
.sw-avatar-empty-preview { display: grid; place-items: center; color: var(--brand-muted); font-weight: 700; }
.sw-avatar-profile-body { display: grid; gap: 12px; }
.sw-avatar-profile-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sw-hidden-legacy-field { display: none; }
.sw-reference-upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sw-reference-status { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-reference-pill { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--brand-border); padding: 3px 8px; font-size: .75rem; font-weight: 800; color: var(--brand-text-soft); background: var(--brand-surface); }
.sw-reference-pill-on { color: #14532d; border-color: #86efac; background: #dcfce7; }
.sw-reference-pill-missing { color: #7f1d1d; border-color: #fecaca; background: #fee2e2; }
.sw-reference-pill-failed { color: #7f1d1d; border-color: #fca5a5; background: #fee2e2; }
.sw-reference-pill-optional { color: var(--brand-text-soft); }
/* Avatar generation status — extends the existing .sw-badge scale rather than introducing a second
   badge system. Colors resolve from brand vars so light/dark themes inherit for free. */
.sw-badge-failed { background: #b3261e; color: #fff; }
.sw-avatar-progress { height: 6px; border-radius: 999px; background: var(--brand-surface); overflow: hidden; }
.sw-avatar-progress-bar { height: 100%; background: var(--brand-primary); transition: width .4s ease; }
.sw-pricing-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.sw-page-sub { color: var(--brand-text-soft); max-width: 760px; }
.sw-segmented { display: inline-flex; border: 2px solid var(--brand-ink); border-radius: 8px; overflow: hidden; background: var(--brand-bg); }
.sw-segmented a { padding: 9px 16px; color: var(--brand-text); font-weight: 800; border-right: 2px solid var(--brand-ink); }
.sw-segmented a:last-child { border-right: 0; }
.sw-segmented .sw-segment-active { background: var(--brand-primary); color: #fff; }
.sw-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; align-items: stretch; }
.sw-plan-grid-compact { margin-top: 24px; }
.sw-plan-card { position: relative; display: grid; gap: 12px; align-content: start; background: var(--brand-bg); border: 2px solid var(--brand-ink); border-radius: 8px; padding: 22px; box-shadow: 4px 4px 0 rgba(27,27,31,.14); }
.sw-plan-card h2 { margin: 0; color: var(--brand-primary); }
.sw-plan-desc { color: var(--brand-text-soft); margin: 0; min-height: 68px; }
.sw-plan-price { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.sw-plan-price span { font-size: 2.1rem; font-weight: 900; color: var(--brand-ink); }
.sw-plan-price small { color: var(--brand-text-soft); font-weight: 700; }
.sw-plan-features { margin: 0; padding-left: 18px; color: var(--brand-text); }
.sw-plan-features li { margin: 6px 0; }
.sw-plan-featured { border-color: var(--brand-secondary); box-shadow: 5px 5px 0 rgba(228,55,46,.22); }
.sw-plan-active { background: color-mix(in srgb, var(--brand-primary) 7%, var(--brand-bg)); }
.sw-plan-ribbon { position: absolute; top: 12px; right: 12px; background: var(--brand-accent); color: var(--brand-ink); border: 2px solid var(--brand-ink); border-radius: 999px; padding: 2px 9px; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.sw-usage-band { margin-top: 28px; padding: 22px; border: 2px solid var(--brand-border); border-radius: 8px; background: var(--brand-surface); }
.sw-usage-band h2 { margin-top: 0; }
.sw-usage-grid, .sw-billing-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.sw-usage-grid div { display: grid; gap: 4px; padding: 14px; border: 2px solid var(--brand-border); border-radius: 8px; background: var(--brand-bg); }
.sw-usage-grid span { color: var(--brand-text-soft); font-size: .9rem; }
.sw-register-payment { margin: 14px 0; }
.sw-stripe-card { border: 2px solid var(--brand-border); border-radius: 8px; padding: 12px; background: #fff; margin-top: 6px; }
.sw-paid-register-price { border: 2px solid var(--brand-primary); border-radius: 8px; padding: 10px 12px; background: color-mix(in srgb, var(--brand-primary) 10%, transparent); }
/* Avatar rig stage — the WebGL canvas and its static fallback share one box so a browser without WebGL2
   lays out identically instead of collapsing the surrounding grid. Reuses the existing avatar border and
   radius values rather than introducing a second visual language for the same object. */
.sw-avatar-rig-stage { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: transparent; }
.sw-avatar-rig-stage canvas,
.avatar-rig-fallback { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Parameter sliders for the studio's rig preview — the replacement for the "Review poses (70)" tile grid.
   Reuses .sw-avatar-progress sizing so the two read as the same control family. */
.sw-rig-params { display: grid; gap: 8px; margin-top: 14px; }
.sw-rig-param { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: .85rem; }
.sw-rig-param output { color: var(--brand-muted); font-variant-numeric: tabular-nums; text-align: right; }
.sw-avatar-debug { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.sw-avatar-debug[hidden] { display: none; }
.sw-avatar-validation { margin: 10px 0; }
.sw-avatar-validation pre { max-height: 180px; overflow: auto; padding: 10px; border: 1px solid var(--brand-border); border-radius: 6px; background: var(--brand-surface); font-size: .8rem; white-space: pre-wrap; }
.sw-avatar-error { margin: 0; padding: 8px 10px; border-radius: 6px; background: #fdeceb; color: #7f1d1d; font-size: .85rem; border-left: 4px solid #b3261e; }
/* Bulk "use this avatar on existing webinars" block inside an avatar card. */
.sw-avatar-apply { margin-top: 4px; border-top: 1px solid var(--brand-border); padding-top: 10px; }
.sw-avatar-apply > summary { cursor: pointer; font-weight: 700; color: var(--brand-primary); }
.sw-avatar-apply-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; }
.sw-avatar-apply-list label { display: flex; align-items: center; gap: 8px; }
/* Pose contact sheet — review a generated library and replace individual bad frames. */
.sw-avatar-poses { margin-top: 4px; border-top: 1px solid var(--brand-border); padding-top: 10px; }
.sw-avatar-poses > summary { cursor: pointer; font-weight: 700; color: var(--brand-primary); }
.sw-pose-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.sw-pose-category { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--brand-border); }
.sw-pose-category-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
/* min-width:0 stops any child's min-content from forcing the grid cell wider than the auto-fill
   minimum. Without it, an occluding pose's "idle" badge in the caption used to drag the tile
   bigger than its siblings and push the ↻ button into the next tile's cell. */
.sw-pose-tile { margin: 0; display: grid; gap: 4px; min-width: 0; }
/* Image + regen-button share this stacking context so the button can absolute-position over the image. */
.sw-pose-tile-media { position: relative; }
.sw-pose-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--brand-border); background: repeating-conic-gradient(#e9e9e9 0% 25%, #fff 0% 50%) 50% / 12px 12px; display: block; }
/* ↻ button lives on the image as a photo-review affordance — always visible on touch, revealed
   on hover on pointer devices — so a bad pose can be re-rolled without opening the caption. */
.sw-pose-regen { position: absolute; top: 4px; right: 4px; margin: 0; }
.sw-pose-regen button { border: 0; border-radius: 999px; width: 28px; height: 28px; padding: 0; font-size: .95rem; line-height: 1; cursor: pointer; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s ease, background .15s ease; }
.sw-pose-tile:hover .sw-pose-regen button, .sw-pose-regen button:focus-visible { opacity: 1; }
.sw-pose-regen button:hover { background: rgba(0,0,0,.85); }
@media (hover: none) { .sw-pose-regen button { opacity: 1; } }
/* Batch-select checkbox in the top-left corner of each pose tile. Always visible so batch selection
   is discoverable without hover. Chunky enough for touch (28×28 hit area) but visually understated
   so it doesn't fight the image. Opposite corner from .sw-pose-regen so they never overlap. */
.sw-pose-check { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; display: grid; place-items: center; background: rgba(0,0,0,.55); border-radius: 6px; cursor: pointer; }
.sw-pose-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--brand-primary); }
.sw-pose-check:hover { background: rgba(0,0,0,.85); }
/* Batch action bar above the pose sheet — Regenerate-selected button + hint text. */
.sw-pose-batch-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
/* Caption row no longer holds the button; keep the name/badge tidy with flex wrap + ellipsis so
   long pose names ("idle_smooth_hair") never overflow their cell. */
.sw-pose-tile figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: .7rem; color: var(--brand-text-soft); min-width: 0; }
.sw-pose-tile figcaption > span:first-child { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-avatar-preview-lab { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.sw-avatar-preview-mode { display: grid; gap: 6px; }
.sw-avatar-preview-stack { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--brand-border); border-radius: 8px; background: linear-gradient(135deg, #f8f8f8 0 50%, #262626 50% 100%); }
.sw-avatar-preview-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; animation: sw-avatar-preview-cycle 4.8s infinite; }
.sw-avatar-preview-stack img:nth-child(1) { animation-delay: 0s; }
.sw-avatar-preview-stack img:nth-child(2) { animation-delay: 1.2s; }
.sw-avatar-preview-stack img:nth-child(3) { animation-delay: 2.4s; }
.sw-avatar-preview-stack img:nth-child(4) { animation-delay: 3.6s; }
.sw-avatar-preview-stack img:nth-child(5) { animation-delay: 4.8s; }
@keyframes sw-avatar-preview-cycle { 0%, 18% { opacity: 1; } 24%, 100% { opacity: 0; } }

/* Notifications inbox — list of every CCL Notification raised for the signed-in user. Read rows
   dim; unread rows keep full contrast + a left accent stripe. Uses the same sw-badge / sw-hint /
   sw-btn primitives every other page in the site uses so there's no bespoke visual language. */
.sw-notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sw-notif-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-surface); }
.sw-notif-unread { border-left: 4px solid var(--brand-primary); background: var(--brand-surface-strong, #fff); }
.sw-notif-read { opacity: .72; }
.sw-notif-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.sw-notif-body { grid-column: 1; margin: 0; font-size: .95rem; }
.sw-notif-actions { grid-column: 2; grid-row: 2; align-self: center; }

/* Live presenter avatar — a floating picture-in-picture tile in the top-right of the stage.
   Sized 1:1 with the 384px pose canvas so bytes ship unresampled. Fallback letter shows while
   avatar-manager.js preloads the dense 30fps pose library, then the canvas takes over and the fallback
   is hidden by the renderer. Kept above the reaction/slide layers via z-index. */
.sw-avatar-tile { position: absolute; top: 12px; right: 12px; width: 160px; height: 160px; border-radius: 14px; overflow: hidden; border: 2px solid rgba(255,255,255,.18); background: #1a1a1a; box-shadow: 0 6px 20px rgba(0,0,0,.4); z-index: 20; }
.sw-avatar-tile canvas { width: 100%; height: 100%; display: block; }
.sw-avatar-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3.2rem; font-weight: 700; letter-spacing: .02em; background: var(--brand-primary, #2a7f5f); }
.sw-avatar-fallback[hidden] { display: none; }
/* Per-campaign avatar attach control on the dashboard action rows. */
.sw-campaign-avatar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sw-avatar-scene-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; border: 1px solid var(--brand-border); }
.sw-avatar-picker-panel { display: grid; gap: 12px; margin-top: 12px; }
.sw-avatar-selected-preview { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--brand-border); border-radius: 8px; }
.sw-avatar-selected-preview img { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; border: 1px solid var(--brand-border); }
.sw-btn-danger { background: #b3261e; color: #fff; border-color: #7f1d1d; }
.sw-btn-danger:hover { background: #8f1f18; color: #fff; }
.sw-page-sub { color: var(--brand-text-soft); margin-bottom: 20px; }
.sw-inline-label { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; }
.sw-metrics-body { margin-top: 12px; min-height: 60px; }
.sw-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 20px; }
@media (max-width: 900px) { .sw-charts-row { grid-template-columns: 1fr; } .sw-anchor-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .sw-feature-toggles { grid-template-columns: 1fr; } }


/* =====================================================================================
   CCL Widget styling — every asc-* class the injectable CCL widgets emit.
   Grouped by widget: Buttons/Alerts (base) → Billing → EmailDomain → Notifications →
   ChatbotConfig.
   ===================================================================================== */

/* ---- Base: widget-emitted buttons + alerts + inline hints (used by every widget) ---- */
.asc-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 10px; border: 2px solid var(--brand-ink);
    background: var(--brand-surface); color: var(--brand-text);
    font-weight: 700; font-size: .95rem; cursor: pointer;
    transition: transform .1s ease, background .12s ease, color .12s ease, filter .12s ease;
    white-space: nowrap; line-height: 1;
}
.asc-btn:hover { transform: translateY(-1px); }
.asc-btn-primary { background: var(--brand-secondary); color: #fff; border-color: var(--brand-ink); box-shadow: 3px 3px 0 var(--brand-ink); }
.asc-btn-primary:hover { filter: brightness(1.06); }
.asc-btn-secondary { background: var(--brand-surface); color: var(--brand-text); }
.asc-btn-secondary:hover { background: var(--brand-bg); }
.asc-btn-outline { background: transparent; color: var(--brand-primary); border-color: var(--brand-primary); }
.asc-btn-outline:hover { background: color-mix(in srgb, var(--brand-primary) 10%, transparent); }
.asc-btn-danger { background: transparent; color: #dc2626; border-color: #dc2626; }
.asc-btn-danger:hover { background: color-mix(in srgb, #dc2626 12%, transparent); }
.asc-btn:disabled, .asc-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.asc-alert { padding: 12px 14px; border-radius: 10px; border: 2px solid var(--brand-border); background: var(--brand-surface); color: var(--brand-text); font-weight: 600; margin: 8px 0; }
.asc-alert--success { background: color-mix(in srgb, var(--brand-primary) 14%, var(--brand-bg)); border-color: var(--brand-primary); color: var(--brand-primary); }
.asc-alert--error   { background: color-mix(in srgb, #dc2626 12%, var(--brand-bg)); border-color: #dc2626; color: #b91c1c; }
.asc-alert--info    { background: color-mix(in srgb, var(--brand-accent) 22%, var(--brand-bg)); border-color: var(--brand-accent); color: var(--brand-text); }
.asc-field-hint { color: var(--brand-text-soft); font-size: .85rem; margin-top: 4px; }
.asc-divider { border: none; border-top: 2px dashed var(--brand-border); margin: 18px 0; }

/* ---- BillingWidget (asc-billing-*) — Stripe billing panel ---- */
.asc-billing-panel { display: grid; gap: 16px; }
.asc-billing-status { margin-bottom: 4px; }
.asc-billing-card {
    background: var(--brand-bg); border: 2px solid var(--brand-border);
    border-radius: var(--brand-radius); padding: 20px;
    box-shadow: 3px 3px 0 rgba(27,27,31,.06);
}
.asc-billing-card-title { margin: 0 0 12px; font-size: 1rem; font-weight: 800; color: var(--brand-primary); text-transform: uppercase; letter-spacing: .04em; }
.asc-billing-plan-name { font-size: 1.1rem; font-weight: 700; color: var(--brand-text); }
.asc-billing-plan-price { margin-top: 4px; color: var(--brand-primary); font-weight: 700; }
.asc-billing-plan-subtitle, .asc-billing-empty, .asc-billing-note, .asc-billing-method-meta { margin: 6px 0 0; color: var(--brand-text-soft); font-size: .9rem; }
.asc-billing-subscription-head, .asc-billing-method-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.asc-billing-enddate { margin-top: 10px; color: var(--brand-text-soft); font-size: .9rem; }
.asc-billing-method-list { display: grid; gap: 10px; }
.asc-billing-method-item { padding-top: 10px; border-top: 1px solid var(--brand-border); }
.asc-billing-method-item:first-child { padding-top: 0; border-top: 0; }
.asc-billing-method-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asc-billing-badge {
    display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
    background: color-mix(in srgb, var(--brand-primary) 16%, transparent);
    color: var(--brand-primary); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
/* The "Add Payment Method" form grid — replaces the cramped-single-column look with a proper 2-col grid on wide screens. */
.asc-billing-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.asc-billing-field { display: flex; flex-direction: column; gap: 6px; }
.asc-billing-field label { font-size: .85rem; font-weight: 700; color: var(--brand-text); }
.asc-billing-field input, .asc-billing-field select, .asc-billing-card-element {
    width: 100%; border: 2px solid var(--brand-border); border-radius: 10px;
    padding: 10px 12px; background: var(--brand-bg); color: var(--brand-text);
    font-family: inherit; font-size: 1rem;
}
.asc-billing-field input:focus, .asc-billing-field select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 20%, transparent); }
.asc-billing-card-element { min-height: 46px; display: flex; align-items: center; }
.asc-billing-errors { min-height: 1.25rem; margin-top: 4px; color: #dc2626; font-size: .85rem; }
.asc-billing-submit { margin-top: 14px; }

/* ---- Legacy email-domain styles (asc-domain-*) kept for older saved markup ---- */
.asc-domain-panel { display: grid; gap: 16px; }
.asc-domain-header h3 { margin: 0 0 4px; color: var(--brand-primary); }
.asc-domain-subtitle { color: var(--brand-text-soft); font-size: .95rem; margin: 0 0 12px; }
.asc-domain-status-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--brand-surface); border: 2px solid var(--brand-border); border-radius: 10px; }
.asc-dns-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.asc-dns-info { font-size: .85rem; color: var(--brand-text-soft); margin-bottom: 10px; }
.asc-dns-table { display: grid; gap: 6px; border: 2px solid var(--brand-border); border-radius: 10px; overflow: hidden; background: var(--brand-bg); }
.asc-dns-row { display: grid; grid-template-columns: 100px 1fr 2fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--brand-border); align-items: center; }
.asc-dns-row:last-child { border-bottom: 0; }
.asc-dns-row.asc-dns-header-row { background: var(--brand-surface); font-weight: 700; color: var(--brand-text); }
.asc-copy-btn { padding: 4px 10px; }

/* ---- NotificationSettingsWidget (asc-notif-*) ---- */
.asc-notif-settings { display: grid; gap: 18px; }
.asc-notif-settings-header { display: grid; gap: 4px; }
.asc-notif-settings-title { margin: 0; color: var(--brand-primary); font-size: 1.15rem; }
.asc-notif-settings-desc { margin: 0; color: var(--brand-text-soft); }
.asc-notif-settings-form { display: grid; gap: 18px; }
.asc-notif-section {
    background: var(--brand-bg); border: 2px solid var(--brand-border); border-radius: var(--brand-radius);
    padding: 18px; box-shadow: 3px 3px 0 rgba(27,27,31,.06);
}
.asc-notif-section-title { margin: 0 0 4px; font-size: .85rem; font-weight: 800; color: var(--brand-primary); text-transform: uppercase; letter-spacing: .05em; }
.asc-notif-section-desc { margin: 0 0 12px; color: var(--brand-text-soft); font-size: .9rem; }
.asc-notif-toggle {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
    border: 1px solid var(--brand-border); border-radius: 10px; margin-bottom: 8px;
    cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.asc-notif-toggle:hover { border-color: var(--brand-primary); }
.asc-notif-toggle input[type="checkbox"] { margin-top: 4px; }
.asc-notif-toggle-body { display: flex; flex-direction: column; }
.asc-notif-toggle-label { font-weight: 700; }
.asc-notif-toggle-desc { color: var(--brand-text-soft); font-size: .85rem; }
.asc-notif-field { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.asc-notif-label { font-size: .85rem; font-weight: 700; color: var(--brand-text); }
.asc-notif-input { width: 100%; border: 2px solid var(--brand-border); border-radius: 10px; padding: 10px 12px; background: var(--brand-bg); color: var(--brand-text); font-family: inherit; font-size: 1rem; }
.asc-notif-input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 20%, transparent); }
.asc-notif-hint { color: var(--brand-text-soft); font-size: .85rem; }
.asc-notif-actions { display: flex; align-items: center; gap: 12px; }

/* ---- ChatbotConfigAdminWidget (asc-chatbot-*) — persona / voice / model panel ---- */
.asc-chatbot-config-panel { display: grid; gap: 16px; }
.asc-chatbot-tabs { display: flex; gap: 6px; border-bottom: 3px solid var(--brand-ink); padding-bottom: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.asc-chatbot-tab { padding: 8px 14px; background: var(--brand-surface); border: 2px solid var(--brand-border); border-bottom: none; border-radius: 10px 10px 0 0; font-weight: 700; cursor: pointer; color: var(--brand-text); }
.asc-chatbot-tab--active { background: var(--brand-primary); color: #fff; border-color: var(--brand-ink); }
.asc-chatbot-section { background: var(--brand-bg); border: 2px solid var(--brand-border); border-radius: var(--brand-radius); padding: 20px; box-shadow: 3px 3px 0 rgba(27,27,31,.06); }
.asc-chatbot-section h3 { margin: 0 0 12px; color: var(--brand-primary); }
.asc-chatbot-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.asc-chatbot-field label { font-size: .9rem; font-weight: 700; color: var(--brand-text); }
.asc-chatbot-field input, .asc-chatbot-field select, .asc-chatbot-field textarea { width: 100%; border: 2px solid var(--brand-border); border-radius: 10px; padding: 10px 12px; background: var(--brand-bg); color: var(--brand-text); font-family: inherit; font-size: 1rem; }
.asc-chatbot-field textarea { min-height: 100px; resize: vertical; }
.asc-chatbot-field input:focus, .asc-chatbot-field select:focus, .asc-chatbot-field textarea:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 20%, transparent); }

.asc-copy-cell { display: inline-flex; align-items: center; gap: 6px; }

/* Mobile — collapse grid columns everywhere so widgets don't cramp on small screens */
@media (max-width: 700px) {
    .asc-billing-form-grid { grid-template-columns: 1fr; }
    .asc-dns-row { grid-template-columns: 1fr; }
}

/* ---------- ReportGrid container overflow — keep wide grids inside their host card ----------
   ReportGrid.InjectPanel emits a single .asc-report wrapper. Without this rule, a grid with many
   columns (Users tab, Campaigns grid) bleeds past the right edge of its .sw-card. HtmlReport's
   own widget already scopes its own scrollers, which is why it looked fine while ReportGrid didn't
   — same CCL primitive, different DOM layer. Adding overflow-x here on ReportGrid's outer wrapper
   fixes every consumer at once. */
.sw-card .asc-report, .sw-settings-card .asc-report { max-width: 100%; overflow-x: auto; }
.sw-card .asc-report-table, .sw-settings-card .asc-report-table { min-width: max-content; }

/* ---------- Sub-tabs (used inside the Admin Reports tab for Platform / Data Explorer) ---------- */
.sw-subtabs { display: flex; gap: 6px; margin: 14px 0 10px; border-bottom: 2px solid var(--brand-border); padding-bottom: 6px; flex-wrap: wrap; }
.sw-subtab { background: var(--brand-surface); color: var(--brand-text); border: 1px solid var(--brand-border); border-radius: 8px 8px 0 0; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.sw-subtab-active { background: var(--brand-primary); color: #fff; border-color: var(--brand-ink); }
.sw-subtabpane { padding-top: 6px; }

/* ---------- CRM widget tabs + modal + toolbar (asc-crm-*) — used by the injected CrmWidget only.
   Kept ONCE here so the widget renders correctly across the app. */
.asc-crm-tabs { display: flex; gap: 6px; margin: 14px 0 10px; flex-wrap: wrap; border-bottom: 2px solid var(--brand-border); padding-bottom: 6px; }
.asc-crm-tab { background: var(--brand-surface); color: var(--brand-text); border: 1px solid var(--brand-border); border-radius: 8px 8px 0 0; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.asc-crm-tab--active { background: var(--brand-primary); color: #fff; border-color: var(--brand-ink); }
.asc-crm-tabpane { padding-top: 6px; }
.asc-crm-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.asc-crm-metrics-body { margin-top: 12px; min-height: 60px; }
.asc-crm-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1050; display: flex; align-items: center; justify-content: center; padding: 20px; }
.asc-crm-modal[hidden] { display: none; }
.asc-crm-modal-body { background: var(--brand-bg); color: var(--brand-text); border-radius: 12px; min-width: 340px; max-width: 520px; width: 100%; max-height: 85vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.asc-crm-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--brand-border); font-weight: 700; }
.asc-crm-modal-head .asc-modal-x { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: inherit; padding: 0 4px; }
.asc-crm-modal-body .asc-branding-form { padding: 18px; }
.asc-btn-cancel { background: transparent; border: 1px solid var(--brand-border); border-radius: 8px; padding: 8px 14px; cursor: pointer; color: inherit; font-weight: 600; }

/* ---------- Schedule panel (sw-sched-*) ---------- */
.sw-sched-wrap { margin-top: 12px; width: 100%; }
.sw-sched-wrap > summary { cursor: pointer; font-weight: 700; color: var(--brand-primary); }
.sw-sched { border-top: 1px solid var(--brand-border); margin-top: 10px; padding-top: 10px; }
.sw-sched h4 { margin: 16px 0 2px; }
.sw-sched-hint { color: var(--brand-text-soft); font-size: .88rem; margin: 0 0 6px; }
.sw-sched-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sw-sched-mode { display: block; border: 2px solid var(--brand-border); border-radius: var(--brand-radius); padding: 12px; cursor: pointer; font-weight: 400; }
.sw-sched-mode input { margin-right: 6px; }
.sw-sched-mode span { display: block; font-size: .85rem; color: var(--brand-text-soft); }
.sw-sched-selected { border-color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 8%, transparent); }
.sw-sched-recur { border: 2px solid var(--brand-border); border-radius: var(--brand-radius); padding: 12px; margin-top: 14px; }
.sw-sched-recur > summary { cursor: pointer; font-weight: 700; }
.sw-sched-num { width: 90px !important; display: inline-block; }

/* ---------- Registration / feedback ---------- */
.sw-register { display: flex; justify-content: center; padding: 8vh 5vw; }
.sw-register-card { width: 100%; max-width: 520px; }
.sw-register-desc { color: var(--brand-text-soft); }
.sw-rating { display: flex; gap: 10px; margin: 10px 0; }
.sw-rating-star { font-weight: 600; cursor: pointer; }

/* ---------- Live room ----------
   Viewport-pin lives on body.sw-room-body ONLY (Webinar.cshtml is the only page with that
   class — Layout=null there, no shared _Layout markup). Do NOT scope this to `html` — the
   Dashboard and every other page shares the html element and would inherit the overflow
   clip, hiding all content below the fold (observed 7/27/26 Dashboard regression).
   Stage (slide iframe) fills the left grid cell at 100% width; only the chat/resources
   panel scrolls (see .sw-room-feed / .sw-room-resources below). */
body.sw-room-body { background: #0d0f16; color: #eef0f8; margin: 0; font-family: "Segoe UI", system-ui, sans-serif; height: 100vh; overflow: hidden; }
.sw-room { display: grid; grid-template-columns: 1fr 320px; grid-template-rows: 100vh; height: 100vh; overflow: hidden; }
.sw-room-stage { position: relative; display: grid; grid-template-rows: 164px minmax(0, 1fr); background: #000; overflow: hidden; min-height: 0; min-width: 0; }
.sw-presenter-strip { grid-row: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: center; overflow: hidden; padding: 10px 14px; background: #111522; border-bottom: 1px solid rgba(255,255,255,.12); touch-action: pan-y; }
.sw-presenter-cell { position: relative; z-index: 3; height: 142px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: #1b2133; background-size: cover; background-position: center; overflow: hidden; }
.sw-avatar-canvas { width: 96px; height: 144px; max-width: 86%; max-height: calc(100% - 8px); display: block; border-radius: 8px; }
.sw-avatar-fallback { position: absolute; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-primary); color: #fff; font-size: 2rem; font-weight: 800; }
.sw-avatar-fallback[hidden] { display: none; }
.sw-presenter-name, .sw-panelist-name { position: absolute; left: 6px; right: 6px; bottom: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; color: #fff; font-size: .72rem; text-shadow: 0 1px 2px #000; }
.sw-media-slot { position: relative; height: 116px; min-width: 0; border-radius: 8px; overflow: hidden; }
.sw-media-featured { height: 142px; border: 1px solid rgba(97,218,251,.38); background: #0b0e16; }
.sw-media-empty { border: 1px dashed rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.sw-media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); }
.sw-panelist-tile { position: relative; height: 116px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: #0b0e16; overflow: hidden; }
.sw-panelist-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #0b0e16; }
.sw-panelist-local { outline: 2px solid var(--brand-accent); }
.sw-slide-frame, .sw-video-frame { width: 100%; height: 100%; border: 0; display: block; }
.sw-slide-frame { pointer-events: none; }
.sw-video-wrap { display: none; width: 100%; height: 100%; position: relative; grid-row: 2; }
.sw-slide-frame { grid-row: 2; }
.sw-video-done { position: absolute; bottom: 22px; right: 22px; }
.sw-room-preloader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(13,15,22,.92); z-index: 90; gap: 14px; text-align: center; padding: 24px; }
.sw-room-preloader[hidden] { display: none; }
.sw-room-preloader.sw-waiting-room { background: radial-gradient(circle at center, rgba(36,48,76,.95), rgba(13,15,22,.98)); }
.sw-waiting-panel { width: min(680px, calc(100vw - 48px)); display: grid; gap: 12px; justify-items: center; }
.sw-waiting-eyebrow { color: var(--brand-accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: .78rem; }
.sw-waiting-panel h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; color: #fff; }
.sw-waiting-attendee { margin: 0; color: #c9cee1; font-size: 1.05rem; }
.sw-waiting-countdown { min-width: 180px; padding: 12px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 1.7rem; font-weight: 800; }
.sw-spinner { width: 46px; height: 46px; border: 4px solid rgba(255,255,255,.15); border-top-color: var(--brand-accent); border-radius: 50%; animation: sw-spin 1s linear infinite; }
@keyframes sw-spin { to { transform: rotate(360deg); } }
/* Right pane — flex column, min-height:0 so the feed flex child with overflow:auto below actually scrolls instead of stretching the parent past the viewport. */
.sw-room-side { display: flex; flex-direction: column; background: #161a26; border-left: 1px solid #262c40; min-height: 0; overflow: hidden; }
.sw-room-info { padding: 16px; border-bottom: 1px solid #262c40; }
.sw-room-info h2 { margin: 0 0 8px; font-size: 1.05rem; }
.sw-live-pill { color: #ff5a5a; font-weight: 800; font-size: .8rem; margin-right: 12px; }
.sw-attendee-count { color: #9aa1b8; font-size: .85rem; }
.sw-room-feed { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 12px 16px; font-size: .9rem; }
.sw-room-feed[hidden] { display: none; }
/* Chat|Resources tab strip on the right pane — sits above the feed and the resources list. */
.sw-room-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid #262c40; }
.sw-room-tab { flex: 1; padding: 8px 10px; background: transparent; color: #9aa1b8; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-size: .85rem; font-weight: 600; }
.sw-room-tab:hover { color: #eef0f8; }
.sw-room-tab-active { color: #eef0f8; border-bottom-color: var(--brand-accent); }
.sw-tab-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--brand-accent); color: #0f121e; font-size: .7rem; font-weight: 700; }
/* Resources tab body — sticky list of clickable links surfaced by the presentation. Reuses padding + font-size from .sw-room-feed for consistency (DRY). */
.sw-room-resources { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 12px 16px; font-size: .9rem; }
.sw-room-resources[hidden] { display: none; }
.sw-resources-empty { color: #9aa1b8; font-style: italic; }
.sw-resources-list { list-style: none; padding: 0; margin: 0; }
.sw-resources-item { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: #1e2334; }
.sw-resources-name { margin-bottom: 4px; color: #fff; font-weight: 700; }
.sw-resources-link { color: var(--brand-accent); text-decoration: underline; word-break: break-word; }
.sw-resources-link:hover { color: #ffffff; }
.sw-feed-line { margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: #1e2334; }
/* Active group question — high-visibility amber so the ask reads instantly as "type your answer HERE". */
.sw-feed-question { background: #3a3312; color: #fff6c9; border-left: 4px solid #f5c518; font-weight: 600; }
.sw-feed-system { color: #9aa1b8; }
.sw-question-box { position: relative; z-index: 45; display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid #262c40; }
.sw-question-box[hidden] { display: none; }
.sw-question-box input { flex: 1; min-width: 0; background: #1e2334; border: 1px solid #2b3047; color: #eef0f8; border-radius: 8px; padding: 8px 10px; }
.sw-room-controls { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 35; display: flex; gap: 8px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(15,18,30,.88); box-shadow: 0 18px 45px rgba(0,0,0,.35); backdrop-filter: blur(10px); flex-wrap: wrap; justify-content: center; }
.sw-ctl { background: #1e2334; border: 1px solid #2b3047; border-radius: 10px; font-size: 1.2rem; padding: 8px 12px; cursor: pointer; transition: transform .1s; }
.sw-controls-toggle { display: none; }
.sw-ctl:hover { transform: scale(1.12); }
.sw-ctl-active { outline: 2px solid var(--brand-accent); }
.sw-ctl-raised { background: var(--brand-accent); color: #111827; border-color: rgba(255,255,255,.55); }
.sw-reaction-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.sw-float-emoji { position: absolute; bottom: -40px; font-size: 2rem; animation: sw-float 3s ease-out forwards; }
@keyframes sw-float { to { transform: translateY(-70vh) scale(1.4); opacity: 0; } }
.sw-toast { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 2147483000; width: min(440px, calc(100vw - 32px)); background: #fff; color: #151821; border: 1px solid #d9dfef; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.28); padding: 14px 42px 14px 16px; font-size: .95rem; line-height: 1.35; }
.sw-toast-close { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: #5b6275; font-size: 1rem; cursor: pointer; }
.sw-mic-prompt { position: fixed; left: 50%; bottom: 108px; transform: translateX(-50%); z-index: 2147483200; width: min(460px, calc(100vw - 32px)); background: #fff; color: #151821; border: 1px solid #d9dfef; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.34); padding: 16px 42px 16px 16px; font-size: .95rem; line-height: 1.35; }
.sw-mic-prompt p { margin: 0 0 12px; }
.sw-mic-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sw-mic-close { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: #5b6275; font-size: 1rem; cursor: pointer; }
.sw-audio-modal { position: fixed; inset: 0; z-index: 2147483300; display: flex; align-items: center; justify-content: center; background: rgba(5,7,12,.55); padding: 24px; }
.sw-audio-modal[hidden] { display: none; }
.sw-audio-card { width: min(420px, calc(100vw - 40px)); border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: #fff; color: #111827; box-shadow: 0 28px 80px rgba(0,0,0,.38); padding: 24px; text-align: center; }
.sw-audio-card h2 { margin: 0 0 10px; font-size: 1.45rem; }
.sw-audio-card p { margin: 0 0 18px; color: #4b5563; line-height: 1.45; }
body.sw-room-body .asc-cb-root { left: 24px !important; right: auto !important; }
.sw-room-error { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; text-align: center; padding: 0 6vw; }

@media (max-width: 860px) {
    .sw-avatar-profile-card { grid-template-columns: 1fr; }
    .sw-avatar-profile-media img,
    .sw-avatar-empty-preview { width: min(100%, 220px); }
    .sw-room { grid-template-columns: 1fr; grid-template-rows: 55vh 45vh; }
    .sw-room-stage { grid-template-rows: 128px minmax(0, 1fr); }
    .sw-presenter-strip { gap: 8px; padding: 8px; }
    .sw-presenter-cell { height: 108px; }
    .sw-avatar-canvas { width: 72px; height: 108px; }
    .sw-media-slot, .sw-panelist-tile { height: 92px; }
    .sw-media-featured { height: 108px; }
    .sw-room-side { border-left: 0; border-top: 1px solid #262c40; }
    .sw-room-info { padding: 12px 16px 10px; }
    .sw-room-feed,
    .sw-room-resources { padding-bottom: 8px; }
    .sw-question-box { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); align-items: stretch; }
    .sw-question-box input { min-height: 42px; font-size: 16px; }
    .sw-question-box .sw-btn { min-height: 42px; flex: 0 0 auto; }
    .sw-room-controls { left: auto; right: max(12px, env(safe-area-inset-right)); bottom: calc(66px + env(safe-area-inset-bottom)); transform: none; display: grid; grid-template-columns: 48px; gap: 8px; padding: 8px; max-width: calc(100vw - 24px); }
    .sw-room-controls .sw-ctl { width: 48px; height: 48px; padding: 0; display: grid; place-items: center; font-size: 1.2rem; }
    .sw-room-controls:not(.sw-controls-open) .sw-ctl:not(.sw-controls-toggle) { display: none; }
    .sw-room-controls.sw-controls-open { grid-template-columns: repeat(3, 48px); }
    .sw-controls-toggle { display: grid; }
    body.sw-room-body.sw-group-answer-active .asc-cb-root,
    body.sw-room-body.sw-question-focused .asc-cb-root { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
    .sw-nav { gap: 12px; font-size: .9rem; }
    .sw-logo span { display: none; }
}

/* ---------- CCL HelpTip — visible ? icon next to labels that pops the XML doc summary on hover/focus.
   Wraps the CCL Extensions.HelpTip() output. Same class family works across every consumer app.  ---------- */
.asc-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--brand-secondary, #eef);
    color: var(--brand-primary, #235);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    position: relative;
    vertical-align: middle;
    user-select: none;
}
.asc-tip:focus { outline: 2px solid var(--brand-primary, #235); outline-offset: 2px; }
.asc-tip-body {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    min-width: 240px;
    max-width: 340px;
    padding: 8px 10px;
    background: #1c2233;
    color: #f7f8fb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    box-shadow: 0 6px 20px rgba(0,0,0,.22);
    white-space: normal;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease-out;
    z-index: 20;
}
.asc-tip:hover .asc-tip-body,
.asc-tip:focus .asc-tip-body { opacity: 1; pointer-events: auto; }
.asc-tip-body::before {
    content: '';
    position: absolute;
    left: 50%; top: -5px;
    transform: translateX(-50%) rotate(45deg);
    width: 8px; height: 8px;
    background: #1c2233;
}

/* ---------- CCL VoicePickerWidget — one shared voice-picker + Preview button.
   Every consumer app (ChatbotWidget admin, VideoBuilder, Create Webinar) renders through this
   class family, so styling changes here land everywhere.  ---------- */
.asc-voice-picker { display: block; margin: 8px 0; }
.asc-voice-picker-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--brand-primary, #235);
}
.asc-voice-picker-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.asc-voice-picker-select {
    flex: 1 1 260px;
    min-width: 220px;
    padding: 8px 10px;
    border: 1px solid #ccd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}
.asc-voice-picker-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.asc-voice-picker-hint {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
    line-height: 1.35;
}
.asc-voice-picker-status {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    min-height: 1em;
}
.asc-voice-picker-status--err { color: #b3261e; }
