﻿/* BizProCall — signup wizard (#signup)
 *
 * Loaded only on the auth SPA. Depends on auth.css variables and base components.
 */

.auth-wizard,
.auth-wizard__form,
.auth-wizard__pane {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.auth-wizard__nav {
    margin-bottom: 24px;
}

.auth-wizard__progress-track {
    position: relative;
    height: 3px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.auth-wizard__progress-fill {
    display: block;
    height: 100%;
    width: var(--wizard-progress, 25%);
    border-radius: inherit;
    background: var(--auth-accent);
    transition: width 0.2s ease;
}

.auth-wizard__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-wizard__step-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    text-align: center;
}

.auth-wizard__step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: var(--auth-surface-card);
    box-sizing: border-box;
}

.auth-wizard__step-num {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: var(--auth-text-muted);
}

.auth-wizard__step-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--auth-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.auth-wizard__step-pill.is-active .auth-wizard__step-dot {
    width: 24px;
    height: 24px;
    border-color: var(--auth-accent);
    background: var(--auth-accent);
}

.auth-wizard__step-pill.is-active .auth-wizard__step-num {
    color: var(--auth-accent-text);
}

.auth-wizard__step-pill.is-active .auth-wizard__step-label {
    color: var(--auth-accent);
}

.auth-wizard__step-pill.is-complete .auth-wizard__step-dot {
    border-color: var(--auth-accent);
    background: rgba(246, 178, 33, 0.15);
}

.auth-wizard__step-pill.is-complete .auth-wizard__step-num {
    color: var(--auth-accent);
}

.auth-wizard__step-pill.is-complete .auth-wizard__step-label {
    color: #94a3b8;
}

.auth-wizard__pane {
    padding-top: 4px;
}

.auth-wizard__pane[hidden] {
    display: none !important;
}

.auth-wizard__plan-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.auth-wizard__plan-pill {
    flex: 0 1 auto;
    padding: 7px 12px;
    border: 1px solid var(--auth-border-strong);
    border-radius: 999px;
    background: var(--auth-input-bg);
    color: var(--auth-text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auth-wizard__plan-pill:hover {
    color: var(--auth-text);
    border-color: var(--auth-border);
}

.auth-wizard__plan-pill:focus-visible {
    outline: none;
    border-color: rgba(246, 178, 33, 0.65);
    box-shadow: 0 0 0 3px var(--auth-ring);
}

.auth-wizard__plan-pill.is-active {
    border-color: rgba(246, 178, 33, 0.65);
    background: rgba(246, 178, 33, 0.12);
    color: var(--auth-accent);
}

.auth-wizard__plan-details {
    position: relative;
    min-width: 0;
}

.auth-wizard__plan-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: rgba(12, 18, 32, 0.55);
    min-width: 0;
}

.auth-wizard__plan-panel[hidden] {
    display: none !important;
}

.auth-wizard__plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(246, 178, 33, 0.12);
    color: var(--auth-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-wizard__plan-head {
    display: grid;
    gap: 4px;
}

.auth-wizard__plan-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth-wizard__plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.auth-wizard__plan-price {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: var(--auth-accent);
}

.auth-wizard__plan-period {
    font-size: 14px;
    color: var(--auth-text-muted);
}

.auth-wizard__plan-licenses {
    margin: 0;
    font-size: 13px;
    color: var(--auth-text-muted);
}

.auth-wizard__plan-licenses i {
    margin-right: 6px;
    color: #64748b;
}

.auth-wizard__plan-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #cbd5e1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auth-wizard__plan-tagline {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--auth-accent);
}

.auth-wizard__plan-features {
    margin-top: 2px;
}

.auth-wizard .plan-feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-wizard .plan-feature-list__group {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-wizard .plan-feature-list__item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.auth-wizard .plan-feature-list__group:last-child .plan-feature-list__item {
    border-bottom: 0;
}

.auth-wizard .plan-feature-list__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.auth-wizard .plan-feature-list__summary::-webkit-details-marker {
    display: none;
}

.auth-wizard .plan-feature-list__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: #e2e8f0;
}

.auth-wizard .plan-feature-list__count {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: rgba(148, 163, 184, 0.85);
}

.auth-wizard .plan-feature-list__chevron {
    color: rgba(148, 163, 184, 0.75);
    font-size: 10px;
    transition: transform 0.15s ease;
}

.auth-wizard .plan-feature-list__item[open] .plan-feature-list__chevron {
    transform: rotate(90deg);
}

.auth-wizard .plan-feature-list__features {
    margin: 0 0 6px;
    padding: 0 0 0 12px;
    list-style: none;
    border-left: 1px solid rgba(246, 178, 33, 0.22);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.auth-wizard .plan-feature-list__feature {
    position: relative;
    padding: 2px 0 2px 8px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.92);
}

.auth-wizard .plan-feature-list__feature::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--auth-accent);
    font-weight: 700;
}

.auth-wizard__pay-card {
    margin-top: 16px;
    position: relative;
}

.auth-wizard__summary,
.auth-wizard__pay-card {
    padding: 14px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: rgba(12, 18, 32, 0.55);
    min-width: 0;
}

.auth-wizard__summary-title,
.auth-wizard__pay-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.auth-wizard__pay-note {
    margin: -6px 0 14px;
    font-size: 12px;
    color: var(--auth-text-muted);
}

.auth-wizard__pay-element {
    margin-top: 4px;
}

.auth-wizard__pay-element[hidden] {
    display: none;
}

.auth-wizard__pay-express {
    margin-bottom: 2px;
}

.auth-wizard__pay-express[hidden],
.auth-wizard__pay-divider[hidden] {
    display: none;
}

.auth-wizard__pay-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: var(--auth-text-muted);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-wizard__pay-divider::before,
.auth-wizard__pay-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-wizard__pay-error {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(244, 96, 96, 0.45);
    border-radius: 8px;
    background: rgba(244, 96, 96, 0.1);
    color: #ffc9c9;
    font-size: 13px;
    line-height: 1.45;
}

.auth-wizard__pay-error[hidden] {
    display: none;
}

/* Processing overlay — shown while Stripe confirms the payment. */
.auth-wizard__pay-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    background: rgba(9, 14, 26, 0.82);
    color: var(--auth-text, #e2e8f0);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    padding: 20px;
}

.auth-wizard__pay-loading[hidden] {
    display: none;
}

.auth-wizard__pay-loading-text {
    opacity: 0.9;
}

.auth-wizard__pay-spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--auth-accent, #4f8cff);
    animation: auth-wizard-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .auth-wizard__pay-spinner {
        animation-duration: 1.6s;
    }
}

.auth-wizard__summary-list {
    margin: 0;
    display: grid;
    gap: 10px;
}

.auth-wizard__summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-wizard__summary-row dt {
    margin: 0;
    color: var(--auth-text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.auth-wizard__summary-row dd {
    margin: 0;
    text-align: right;
    color: var(--auth-text);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auth-wizard__summary-row--total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--auth-border);
}

.auth-wizard__summary-row--total dt,
.auth-wizard__summary-row--total dd {
    font-size: 15px;
    font-weight: 700;
    color: var(--auth-accent);
}

.auth-wizard__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    margin-top: 5px;
}

.auth-wizard__actions .auth-btn {
    width: auto;
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
    height: 46px;
    font-size: 15px;
    box-sizing: border-box;
}

.auth-wizard__actions .auth-btn--ghost {
    flex: 0 1 38%;
}

.auth-wizard__actions .auth-btn--primary,
.auth-wizard__actions [data-auth-wizard-pay] {
    flex: 1 1 62%;
}

.auth-wizard__actions:not(:has([data-auth-wizard-back]:not([hidden]))) .auth-btn--primary,
.auth-wizard__actions:not(:has([data-auth-wizard-back]:not([hidden]))) [data-auth-wizard-pay] {
    flex: 1 1 100%;
    width: 100%;
}

.auth-wizard__actions [hidden] {
    display: none !important;
}

/* —— Tablet & mobile —— */

@media (max-width: 899px) {
    .auth-layout:has(.auth-wizard) {
        min-height: auto;
    }

    .auth-layout:has(.auth-wizard) .auth-hero {
        padding: 24px var(--auth-gutter) 12px;
    }

    .auth-layout:has(.auth-wizard) .auth-hero__title {
        margin-top: 16px;
        font-size: clamp(1.45rem, 6vw, 1.85rem);
    }

    .auth-layout:has(.auth-wizard) .auth-hero__lead {
        font-size: 14px;
        line-height: 1.5;
    }

    .auth-layout:has(.auth-wizard) .auth-stack {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .auth-stack__inner--wizard {
        min-width: 0;
    }

    .auth-wizard .auth-card__title,
    .auth-wizard .auth-card__subtitle {
        display: none;
    }

    .auth-layout:has(.auth-wizard) .auth-signup {
        margin-top: 20px;
    }

    .auth-layout:has(.auth-wizard) .auth-trust {
        margin-top: 16px;
    }
}

@media (max-width: 575.98px) {
    .auth-wizard__summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .auth-wizard__summary-row dd {
        text-align: left;
    }

    .auth-wizard__actions .auth-btn {
        height: 44px;
        font-size: 14px;
    }

    .auth-wizard__plan-pill {
        font-size: 11px;
        padding: 8px 11px;
    }
}

@media (max-width: 380px) {
    .auth-wizard__step-label {
        font-size: 9px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.25;
    }

    .auth-wizard__plan-price {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-wizard__progress-fill,
    .auth-wizard__plan-pill {
        transition: none;
    }
}
