/* StoreVoiceAI Onboarding — full-screen takeover wizard.
   Scoped under .svai-app to avoid leaking styles into wp-admin. */

:root {
    --svai-amber-50:  #FFF8EC;
    --svai-amber-100: #FAEEDA;
    --svai-amber-200: #FAC775;
    --svai-amber-500: #F5A623;
    --svai-amber-600: #E0931A;
    --svai-ink-900:   #1A1A1A;
    --svai-ink-700:   #2D2D2D;
    --svai-ink-500:   #51565C;
    --svai-ink-400:   #6C7178;
    --svai-ink-300:   #A7AAAD;
    --svai-bg:        #F4F1EC;
    --svai-surface:   #FFFFFF;
    --svai-surface-2: #FAFAF7;
    --svai-border:    #E6E2D9;
    --svai-border-2:  #EFEAE0;
    --svai-success:   #2E7D5B;
    --svai-success-bg:#E8F4EE;
    --svai-radius-sm: 8px;
    --svai-radius-md: 12px;
    --svai-radius-lg: 18px;
    --svai-shadow-sm: 0 1px 2px rgba(20, 14, 4, 0.04);
    --svai-shadow-md: 0 10px 30px rgba(20, 14, 4, 0.08), 0 2px 6px rgba(20, 14, 4, 0.04);
    --svai-shadow-lg: 0 30px 80px rgba(20, 14, 4, 0.12), 0 6px 16px rgba(20, 14, 4, 0.06);
    --svai-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

/* ─── Body takeover ──────────────────────────────────────────────────────── */
html.wp-toolbar {
    padding-top: 0 !important;
}
body.storevoiceai-onboarding-body,
body.storevoiceai-onboarding-body.wp-admin {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--svai-bg) !important;
    font-family: var(--svai-font);
    color: var(--svai-ink-900);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.storevoiceai-onboarding-body #wpadminbar,
body.storevoiceai-onboarding-body #adminmenumain,
body.storevoiceai-onboarding-body #adminmenuback,
body.storevoiceai-onboarding-body #adminmenuwrap,
body.storevoiceai-onboarding-body #wpfooter,
body.storevoiceai-onboarding-body .update-nag {
    display: none !important;
}

.svai-app, .svai-app * {
    box-sizing: border-box;
}

.svai-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    background:
        radial-gradient(ellipse 800px 400px at 50% -200px, rgba(245, 166, 35, 0.18), transparent 70%),
        radial-gradient(ellipse 600px 300px at 90% 100%, rgba(245, 166, 35, 0.06), transparent 70%),
        var(--svai-bg);
}

.svai-noscript {
    margin: 80px auto;
    max-width: 480px;
    padding: 24px;
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    text-align: center;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.svai-app__header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 22px 36px;
    flex-shrink: 0;
}
.svai-app__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    justify-self: start;
}
.svai-app__steps {
    justify-self: center;
    display: flex;
}
.svai-app__skip {
    justify-self: end;
}
.svai-app__brand img {
    height: 38px;
    width: auto;
    display: block;
    margin-top: 6px;
}
.svai-app__skip {
    background: transparent;
    border: 0;
    color: var(--svai-ink-400);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}
.svai-app__skip:hover {
    background: rgba(20, 14, 4, 0.05);
    color: var(--svai-ink-900);
}

/* ─── Main wrapper ───────────────────────────────────────────────────────── */
.svai-app__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 24px 48px;
    width: 100%;
}

.svai-app__footer {
    padding: 18px 24px 28px;
    text-align: center;
    font-size: 12px;
    color: var(--svai-ink-400);
    flex-shrink: 0;
}

/* ─── Stepper ────────────────────────────────────────────────────────────── */
.svai-stepper {
    display: flex;
    align-items: center;
    gap: 0;
}
.svai-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.svai-step--clickable {
    cursor: pointer;
    border: 0;
    background: none;
    outline: none;
}
.svai-step--clickable:hover .svai-step__bubble,
.svai-step--clickable:focus-visible .svai-step__bubble {
    border-color: var(--svai-amber-500);
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.15);
}
.svai-step--clickable:hover .svai-step__label {
    color: var(--svai-ink-900);
}
.svai-step__bubble {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--svai-border);
    background: var(--svai-surface);
    color: var(--svai-ink-400);
    transition: all 0.3s ease;
}
.svai-step--active .svai-step__bubble {
    background: var(--svai-ink-900);
    border-color: var(--svai-ink-900);
    color: var(--svai-surface);
}
.svai-step--done .svai-step__bubble {
    background: var(--svai-amber-500);
    border-color: var(--svai-amber-500);
    color: #fff;
}
.svai-step__label {
    font-size: 12px;
    color: var(--svai-ink-400);
    white-space: nowrap;
    transition: color 0.2s;
}
.svai-step--active .svai-step__label,
.svai-step--done .svai-step__label {
    color: var(--svai-ink-900);
    font-weight: 500;
}
.svai-step__connector {
    width: 60px;
    height: 1.5px;
    background: var(--svai-border);
    margin: 0 6px 22px;
    transition: background 0.3s ease;
}
.svai-step__connector--done {
    background: var(--svai-amber-500);
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.svai-card {
    width: 100%;
    max-width: 1080px;
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-lg);
    box-shadow: var(--svai-shadow-lg);
    overflow: hidden;
    display: flex;
    min-height: 580px;
    animation: svai-fade-in 0.4s ease;
}
@keyframes svai-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.svai-card--centered {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 40px;
    text-align: center;
    min-height: 600px;
}

/* Two-column layout */
.svai-card__aside {
    width: 340px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--svai-amber-50) 0%, var(--svai-amber-100) 100%);
    border-right: 1px solid var(--svai-amber-200);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.svai-card__aside--dark {
    background: linear-gradient(180deg, var(--svai-ink-900) 0%, var(--svai-ink-700) 100%);
    border-right-color: var(--svai-ink-700);
    color: #fff;
}
.svai-card__aside--wide {
    width: 400px;
}
/* Go-live right column: keep content at the top, comfortably spaced, rather
   than stretching the primary button to fill the height. */
.svai-card__body--golive {
    justify-content: flex-start;
    gap: 18px;
}
.svai-card__aside--dark .svai-card__title,
.svai-card__aside--dark .svai-card__subtitle {
    color: #fff;
}
.svai-card__aside--dark .svai-card__subtitle {
    color: rgba(255, 255, 255, 0.7);
}
.svai-card__body {
    flex: 1;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.svai-card__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--svai-amber-600);
}
.svai-card__aside--dark .svai-card__eyebrow {
    color: var(--svai-amber-500);
}
.svai-card__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--svai-ink-900);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.svai-card__subtitle {
    font-size: 14px;
    color: var(--svai-ink-500);
    line-height: 1.6;
    margin: 0;
}
.svai-card__body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--svai-ink-900);
}

/* Aside feature list */
.svai-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}
.svai-feature-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--svai-ink-700);
    line-height: 1.4;
}
.svai-feature-list__icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--svai-amber-500);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svai-card__aside--dark .svai-feature-list__item {
    color: rgba(255, 255, 255, 0.85);
}

.svai-aside-quote {
    margin-top: auto;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--svai-amber-200);
    border-radius: var(--svai-radius-md);
    backdrop-filter: blur(8px);
}
.svai-aside-quote p {
    font-size: 12.5px;
    font-style: italic;
    color: var(--svai-ink-700);
    line-height: 1.55;
    margin: 0 0 6px;
}
.svai-aside-quote cite {
    font-size: 11px;
    color: var(--svai-ink-400);
    font-style: normal;
}
.svai-aside-note {
    margin-top: auto;
    font-size: 12px;
    color: var(--svai-ink-400);
    line-height: 1.5;
}

/* ─── Training screen ────────────────────────────────────────────────────── */
.svai-training {
    width: 100%;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.svai-training__orb {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--svai-amber-50);
    border: 2px solid var(--svai-amber-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--svai-amber-500);
    position: relative;
    box-shadow: 0 0 0 12px rgba(245, 166, 35, 0.06);
}
.svai-training__orb::before,
.svai-training__orb::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--svai-amber-500);
    opacity: 0;
    animation: svai-pulse 2.4s ease-out infinite;
}
.svai-training__orb::after {
    animation-delay: 1.2s;
}
@keyframes svai-pulse {
    0%   { transform: scale(1);   opacity: 0.45; }
    100% { transform: scale(1.6); opacity: 0; }
}
.svai-training__heading {
    text-align: center;
}
.svai-training__heading h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--svai-ink-900);
}
.svai-training__heading p {
    font-size: 14px;
    color: var(--svai-ink-400);
    margin: 0;
}
.svai-training__list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.svai-training__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    opacity: 0.4;
    transform: translateY(6px);
    transition: all 0.35s ease;
    font-size: 13.5px;
    color: var(--svai-ink-700);
}
.svai-training__row--visible {
    opacity: 1;
    transform: none;
}
.svai-training__row--active {
    background: var(--svai-amber-50);
    border-color: var(--svai-amber-200);
}
.svai-training__row--done {
    background: var(--svai-success-bg);
    border-color: #C4E1D2;
    color: var(--svai-ink-700);
}
.svai-training__indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--svai-border);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.svai-training__row--active .svai-training__indicator {
    background: var(--svai-amber-500);
    animation: svai-spin 0.9s linear infinite;
}
.svai-training__row--done .svai-training__indicator {
    background: var(--svai-success);
    animation: none;
}
.svai-training__indicator svg {
    width: 12px;
    height: 12px;
}
.svai-training__indicator--spin::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
}
@keyframes svai-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.svai-progress {
    width: 100%;
    max-width: 380px;
    height: 4px;
    background: var(--svai-border);
    border-radius: 999px;
    overflow: hidden;
}
.svai-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--svai-amber-500), var(--svai-amber-600));
    border-radius: 999px;
    width: 0;
    transition: width 0.6s ease;
}

/* ─── Audio player ───────────────────────────────────────────────────────── */
.svai-player {
    background: var(--svai-surface-2);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    padding: 16px 18px;
}
.svai-player + .svai-player {
    margin-top: 12px;
}
.svai-player__caption {
    font-size: 12px;
    color: var(--svai-ink-400);
    margin: 0 0 12px;
}
.svai-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 38px;
    margin-bottom: 12px;
}
.svai-wave__bar {
    flex: 1;
    min-width: 2px;
    height: 4px;
    background: var(--svai-border);
    border-radius: 2px;
    transition: height 0.12s ease, background 0.12s ease;
}
.svai-player__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.svai-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--svai-ink-900);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}
.svai-play-btn:hover {
    background: var(--svai-ink-700);
    transform: scale(1.04);
}
.svai-play-btn svg {
    width: 14px;
    height: 14px;
}
.svai-track {
    flex: 1;
    height: 3px;
    background: var(--svai-border);
    border-radius: 999px;
    overflow: hidden;
}
.svai-track__fill {
    height: 100%;
    background: var(--svai-amber-500);
    width: 0;
    border-radius: 999px;
    transition: width 0.15s linear;
}
.svai-player__time {
    font-size: 12px;
    color: var(--svai-ink-400);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.svai-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.svai-field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--svai-ink-900);
}
.svai-field__hint {
    font-size: 12px;
    color: var(--svai-ink-400);
}
.svai-field__error {
    font-size: 12px;
    color: #B32D2E;
    margin: 0;
}
.svai-input--error {
    border-color: #B32D2E !important;
    box-shadow: 0 0 0 3px rgba(179, 45, 46, 0.12) !important;
}
.svai-input,
.svai-textarea,
.svai-select {
    width: 100%;
    padding: 11px 14px;
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--svai-ink-900);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.svai-input:focus,
.svai-textarea:focus,
.svai-select:focus {
    outline: none;
    border-color: var(--svai-amber-500);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}
.svai-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.svai-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.svai-radio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.svai-radio:hover {
    border-color: var(--svai-amber-200);
}
.svai-radio--selected {
    border-color: var(--svai-amber-500);
    background: var(--svai-amber-50);
}
.svai-radio input[type="radio"] {
    margin: 2px 0 0;
    accent-color: var(--svai-amber-500);
    flex-shrink: 0;
}
.svai-radio span {
    font-size: 13px;
    line-height: 1.5;
    color: var(--svai-ink-700);
}

/* Channel chooser */
.svai-channel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.svai-channel {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--svai-radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.svai-channel:hover {
    background: rgba(255,255,255,0.6);
}
.svai-channel--selected {
    background: var(--svai-surface);
    border-color: var(--svai-amber-500);
    box-shadow: var(--svai-shadow-sm);
}
.svai-channel__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.svai-channel__heading svg {
    width: 16px;
    height: 16px;
    color: var(--svai-ink-400);
    flex-shrink: 0;
}
.svai-channel--selected .svai-channel__heading svg {
    color: var(--svai-amber-600);
}
.svai-channel__heading span {
    font-size: 14px;
    font-weight: 600;
    color: var(--svai-ink-900);
}
.svai-channel__desc {
    font-size: 12px;
    color: var(--svai-ink-400);
    padding-left: 26px;
    margin: 0;
    line-height: 1.5;
}

/* Segmented control (escalation) */
.svai-segmented {
    display: flex;
    gap: 6px;
    background: var(--svai-surface-2);
    padding: 4px;
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-sm);
}
.svai-segmented__btn {
    flex: 1;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    color: var(--svai-ink-500);
    cursor: pointer;
    transition: all 0.15s;
}
.svai-segmented__btn:hover {
    color: var(--svai-ink-900);
}
.svai-segmented__btn--selected,
.svai-segmented__btn--selected:hover {
    background: var(--svai-amber-500);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(245, 166, 35, 0.4);
}

.svai-escalation-card {
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    padding: 18px 20px;
    background: var(--svai-surface-2);
}
.svai-escalation-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--svai-ink-900);
}
.svai-escalation-card p {
    font-size: 12px;
    color: var(--svai-ink-400);
    margin: 0 0 14px;
}

/* Toggle switch row (Step 3 — working hours) */
.svai-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--svai-border-2);
}
.svai-switch-row__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--svai-ink-900);
}
.svai-switch-row__hint {
    display: block;
    font-size: 12px;
    color: var(--svai-ink-400);
    margin-top: 3px;
    line-height: 1.45;
}
.svai-switch {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 27px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #CDC8BD;
    cursor: pointer;
    transition: background 0.18s ease;
}
.svai-switch:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.2);
}
.svai-switch__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}
.svai-switch--on {
    background: var(--svai-amber-500);
}
.svai-switch--on .svai-switch__thumb {
    transform: translateX(19px);
}

/* Weekly availability picker (Step 3 — shown when "Only transfer during
   working hours" is enabled). */
.svai-hours {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--svai-border-2);
}
.svai-hours__row {
    display: grid;
    grid-template-columns: 56px 110px 1fr;
    align-items: center;
    gap: 16px;
}
.svai-hours__day {
    font-size: 13px;
    font-weight: 600;
    color: var(--svai-ink-900);
}
.svai-hours__off {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--svai-ink-900);
    cursor: pointer;
    user-select: none;
}
.svai-hours__off-box {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--svai-amber-500);
    cursor: pointer;
}
.svai-hours__times {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.svai-hours__time {
    font: inherit;
    font-size: 13px;
    color: var(--svai-ink-900);
    background: var(--svai-surface-2);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 120px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.svai-hours__time:focus {
    outline: none;
    border-color: var(--svai-amber-500);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}
.svai-hours__dash {
    color: var(--svai-ink-400);
}

/* Preview card (Step 2) */
.svai-preview {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--svai-amber-200);
    border-radius: var(--svai-radius-md);
    padding: 16px;
    backdrop-filter: blur(8px);
}
.svai-preview__caption {
    font-size: 11px;
    color: var(--svai-ink-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
}
.svai-preview__person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.svai-preview__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--svai-amber-500);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.svai-preview__person strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--svai-ink-900);
}
.svai-preview__person small {
    font-size: 11px;
    color: var(--svai-ink-400);
}
.svai-preview__bubble {
    background: var(--svai-surface);
    border: 1px solid var(--svai-border-2);
    border-radius: var(--svai-radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--svai-ink-700);
    line-height: 1.55;
}

/* Widget preview (Step 3) */
.svai-widget-preview {
    background: var(--svai-surface-2);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    padding: 22px;
}
.svai-widget-preview__caption {
    font-size: 11px;
    color: var(--svai-ink-400);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.svai-widget-preview__row {
    display: flex;
    justify-content: flex-end;
}
.svai-widget-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--svai-ink-900);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--svai-shadow-md);
}
.svai-widget-pill svg {
    width: 14px;
    height: 14px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.svai-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}
.svai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--svai-radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}
.svai-btn svg {
    width: 14px;
    height: 14px;
}
.svai-btn--primary {
    background: var(--svai-ink-900);
    color: #fff;
    flex: 1;
}
/* Full-width button that does NOT stretch vertically. Use inside flex-column
   containers where `flex:1` would otherwise blow the button up to fill height. */
.svai-btn--block {
    width: 100%;
    flex: 0 0 auto;
}
.svai-btn--primary:hover {
    background: var(--svai-ink-700);
    transform: translateY(-1px);
    box-shadow: var(--svai-shadow-md);
}
.svai-btn--ghost {
    background: transparent;
    color: var(--svai-ink-500);
    border-color: var(--svai-border);
}
.svai-btn--ghost:hover {
    background: var(--svai-surface-2);
    color: var(--svai-ink-900);
}
.svai-btn--amber {
    background: var(--svai-amber-100);
    color: var(--svai-ink-900);
    border-color: var(--svai-amber-200);
    width: 100%;
}
.svai-btn--amber:hover {
    background: var(--svai-amber-200);
}
.svai-btn--accent {
    background: var(--svai-amber-500);
    color: var(--svai-ink-900);
}
.svai-btn--accent:hover {
    background: var(--svai-amber-600);
    color: #fff;
}
.svai-btn--success {
    background: var(--svai-success-bg);
    color: var(--svai-success);
    border-color: #C4E1D2;
}
.svai-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.svai-text-btn {
    background: none;
    border: 0;
    color: var(--svai-ink-400);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px;
    font-family: inherit;
}
.svai-text-btn:hover {
    color: var(--svai-ink-900);
}

/* Inline button loading spinner — uses currentColor so it reads on both the
   dark primary button and the grey text link. */
.svai-btn--loading {
    cursor: default;
    pointer-events: none;
    gap: 8px;
}
.svai-btn__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    opacity: 0.85;
    animation: svai-spin 0.7s linear infinite;
    flex-shrink: 0;
    vertical-align: -2px;
}
.svai-text-btn.svai-btn--loading {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.svai-footnote {
    font-size: 11px;
    color: var(--svai-ink-400);
    text-align: center;
    margin: 2px 0 0;
}

/* ─── Go-live screen ─────────────────────────────────────────────────────── */
.svai-minutes {
    text-align: center;
    padding: 22px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(245, 166, 35, 0.08);
    border-radius: var(--svai-radius-md);
}
.svai-minutes__number {
    font-size: 56px;
    font-weight: 600;
    color: var(--svai-amber-500);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.svai-minutes__label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 6px 0 2px;
}
.svai-minutes__hint {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
}
.svai-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.svai-checklist__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.82);
}
.svai-checklist__item svg {
    width: 13px;
    height: 13px;
    color: var(--svai-amber-500);
    flex-shrink: 0;
}
/* Go-live: next-step cards filling the right column. */
.svai-nextsteps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.svai-nextstep {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    background: var(--svai-surface);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.svai-nextstep:hover {
    border-color: var(--svai-amber-200);
    background: var(--svai-amber-50);
    transform: translateY(-1px);
    box-shadow: var(--svai-shadow-sm);
}
.svai-nextstep:hover .svai-nextstep__arrow {
    color: var(--svai-amber-600);
    transform: translateX(2px);
}
.svai-nextstep--primary {
    background: var(--svai-ink-900);
    border-color: var(--svai-ink-900);
}
.svai-nextstep--primary:hover {
    background: var(--svai-ink-700);
    border-color: var(--svai-ink-700);
}
.svai-nextstep--primary .svai-nextstep__title { color: #fff; }
.svai-nextstep--primary .svai-nextstep__desc  { color: rgba(255, 255, 255, 0.7); }
.svai-nextstep--primary .svai-nextstep__icon  { background: var(--svai-amber-500); color: #fff; }
.svai-nextstep--primary .svai-nextstep__arrow { color: #fff; }
.svai-nextstep--primary:hover .svai-nextstep__arrow { color: var(--svai-amber-500); }

.svai-nextstep__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--svai-amber-100);
    color: var(--svai-amber-600);
}
.svai-nextstep__icon svg {
    width: 18px;
    height: 18px;
}
.svai-nextstep__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.svai-nextstep__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--svai-ink-900);
    line-height: 1.3;
}
.svai-nextstep__desc {
    font-size: 12.5px;
    color: var(--svai-ink-400);
    line-height: 1.45;
}
.svai-nextstep__arrow {
    color: var(--svai-ink-300);
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}
.svai-nextstep__arrow svg {
    width: 16px;
    height: 16px;
}

/* Go-live upsell — amber-tinted, text + CTA side-by-side. */
.svai-upsell {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, var(--svai-amber-50) 0%, #FFF3DA 100%);
    border: 1px solid var(--svai-amber-200);
    border-radius: var(--svai-radius-md);
    padding: 16px 18px;
}
.svai-upsell__text {
    flex: 1;
    min-width: 0;
}
.svai-upsell strong {
    display: block;
    font-size: 14px;
    color: var(--svai-ink-900);
    margin-bottom: 2px;
}
.svai-upsell p {
    font-size: 12.5px;
    color: var(--svai-ink-500);
    margin: 0;
    line-height: 1.5;
}
.svai-upsell__cta {
    flex-shrink: 0;
    padding: 9px 16px;
    font-size: 13px;
}

/* Bottom row of the go-live screen — Back link + summary email. */
.svai-golive-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}
.svai-golive-footer .svai-footnote {
    margin: 0;
}

/* In-wizard confirm modal (replaces window.confirm). */
.svai-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 14, 4, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.svai-modal-overlay--visible {
    opacity: 1;
}
.svai-modal {
    width: min(460px, 100%);
    background: var(--svai-surface);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-lg);
    box-shadow: 0 30px 80px rgba(20, 14, 4, 0.32), 0 10px 24px rgba(20, 14, 4, 0.14);
    padding: 28px 28px 24px;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.svai-modal-overlay--visible .svai-modal {
    transform: scale(1) translateY(0);
}
.svai-modal__icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--svai-amber-100);
    color: var(--svai-amber-600);
    margin-bottom: 16px;
}
.svai-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--svai-ink-900);
    margin: 0 0 6px;
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.svai-modal__message {
    font-size: 14px;
    color: var(--svai-ink-500);
    line-height: 1.55;
    margin: 0 0 22px;
}
.svai-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.svai-modal__actions .svai-btn {
    flex: 0 0 auto;
    padding: 10px 18px;
}

.svai-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--svai-ink-900);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--svai-radius-sm);
    font-size: 13px;
    box-shadow: var(--svai-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
}
.svai-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.svai-toast--error {
    background: #B32D2E;
}

/* ─── Try-a-call step ────────────────────────────────────────────────────── */
.svai-trycall {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 360px;
}
.svai-trycall__state {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: svai-fade-in 0.3s ease;
}
.svai-trycall__center {
    align-items: center;
    text-align: center;
}
.svai-trycall__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--svai-amber-50);
    color: var(--svai-amber-600);
    border: 2px solid var(--svai-amber-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
}
.svai-trycall__avatar--ring {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}
.svai-trycall__name {
    font-size: 18px;
    font-weight: 600;
    color: var(--svai-ink-900);
    margin: 0;
}
.svai-trycall__sub {
    font-size: 13px;
    color: var(--svai-ink-400);
    line-height: 1.6;
    max-width: 340px;
    margin: 0;
}
.svai-trycall__prompt {
    background: var(--svai-surface-2);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    padding: 12px 16px;
    font-size: 12px;
    color: var(--svai-ink-400);
    text-align: left;
    max-width: 360px;
    width: 100%;
    line-height: 1.6;
}
.svai-trycall__prompt strong {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--svai-ink-500);
}
.svai-trycall__call-btn {
    border-radius: 999px;
    padding: 13px 30px;
    margin-top: 6px;
}
.svai-trycall__pulse {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--svai-amber-50);
    border: 2px solid var(--svai-amber-200);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.svai-trycall__pulse--live::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--svai-amber-500);
    animation: svai-trycall-pulse 1.5s ease-out infinite;
}
@keyframes svai-trycall-pulse {
    0%   { transform: scale(1);    opacity: 0.6; }
    100% { transform: scale(1.45); opacity: 0; }
}
.svai-trycall__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FDECEC;
    border: 1px solid #F3C2C2;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #B23A3A;
}
.svai-trycall__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E04848;
    animation: svai-blink 1s ease-in-out infinite;
}
@keyframes svai-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
.svai-trycall__timer {
    font-size: 30px;
    font-weight: 700;
    color: var(--svai-ink-900);
    font-variant-numeric: tabular-nums;
}
.svai-trycall__end-btn {
    border-radius: 999px;
    color: #B23A3A;
}
.svai-trycall__gift {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--svai-amber-50);
    border: 2px solid var(--svai-amber-200);
    color: var(--svai-amber-600);
    display: flex;
    align-items: center;
    justify-content: center;
}
.svai-trycall__reveal {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    animation: svai-fade-in 0.3s ease;
}
.svai-trycall__card {
    background: var(--svai-surface-2);
    border: 1px solid var(--svai-border);
    border-radius: var(--svai-radius-md);
    padding: 16px 18px;
}
.svai-trycall__card-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--svai-amber-600);
    margin-bottom: 8px;
}
.svai-trycall__summary {
    font-size: 13px;
    color: var(--svai-ink-700);
    line-height: 1.65;
    margin: 0;
}
.svai-trycall__audio {
    width: 100%;
    height: 40px;
}
.svai-trycall__transcript-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--svai-amber-600);
}
.svai-trycall__transcript-toggle svg {
    transition: transform 0.2s ease;
}
.svai-trycall__transcript {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--svai-border);
    font-size: 12px;
    color: var(--svai-ink-500);
    line-height: 1.7;
    max-height: 220px;
    overflow-y: auto;
}
.svai-trycall__line {
    margin: 0 0 6px;
}
.svai-trycall__line strong {
    color: var(--svai-ink-900);
}
.svai-trycall__spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--svai-amber-100);
    border-top-color: var(--svai-amber-500);
    animation: svai-spin 0.8s linear infinite;
}

/* ─── Policies step ──────────────────────────────────────────────────────── */
.svai-field__labelrow {
    display: flex;
    align-items: center;
    gap: 10px;
}
.svai-field__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--svai-amber-600);
    background: var(--svai-amber-50);
    border: 1px solid var(--svai-amber-200);
    border-radius: 999px;
    padding: 2px 9px;
}
.svai-field__badge svg {
    width: 11px;
    height: 11px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
    .svai-app__header {
        padding: 18px 20px;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand skip"
            "stepper stepper";
        row-gap: 12px;
    }
    .svai-app__brand { grid-area: brand; }
    .svai-app__skip  { grid-area: skip; }
    .svai-app__steps { grid-area: stepper; justify-self: center; }
    .svai-app__main { padding: 0 16px 32px; }
    .svai-stepper { transform: scale(0.85); transform-origin: top; }
    .svai-card { flex-direction: column; min-height: auto; }
    .svai-card__aside { width: 100%; border-right: 0; border-bottom: 1px solid var(--svai-amber-200); padding: 28px; }
    .svai-card__body { padding: 28px; }
    .svai-card--centered { padding: 40px 20px; }
    .svai-trycall { min-height: auto; }
}
