/* Vendor registration wizard — extends auth.css */

.vendor-register .auth-form-header--compact {
    margin-bottom: 1.25rem;
}

.vendor-register .auth-form-header h1 {
    font-size: 1.5rem;
}

/* ─── Step progress ─── */
.vendor-register .vendor-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 0 1.5rem;
    padding: 0;
}

.vendor-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 4.5rem;
}

.vendor-step__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--auth-muted);
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    transition: all var(--auth-transition);
}

.vendor-step__label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--auth-muted);
    text-align: center;
    line-height: 1.2;
    transition: color var(--auth-transition);
}

.vendor-step.is-active .vendor-step__badge {
    color: #fff;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.vendor-step.is-active .vendor-step__label {
    color: var(--auth-primary);
}

.vendor-step.is-done .vendor-step__badge {
    color: var(--auth-primary);
    background: #ccfbf1;
    border-color: #99f6e4;
}

.vendor-step.is-done .vendor-step__label {
    color: var(--auth-text);
}

.vendor-step__line {
    flex: 1;
    height: 2px;
    min-width: 0.5rem;
    margin: 0 0.25rem;
    margin-bottom: 1.1rem;
    background: #e2e8f0;
    border-radius: 1px;
}

.vendor-step.is-done + .vendor-step__line,
.vendor-step.is-active + .vendor-step__line {
    background: linear-gradient(90deg, #99f6e4, #e2e8f0);
}

/* ─── Step panels ─── */
.vendor-step-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--auth-text);
}

.vendor-step-hint {
    margin: 0 0 1.1rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--auth-muted);
}

/* Only the active step is shown — do not set display:flex on inactive panels
   or it overrides the HTML [hidden] attribute and stacks all steps. */
.vendor-step-panel {
    display: none;
}

.vendor-step-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.vendor-step-panel .auth-field {
    margin: 0;
}

.vendor-register-form.auth-form {
    gap: 0;
    display: flex;
    flex-direction: column;
}

/* ─── Select fields inside input wrap ─── */
.vendor-register .auth-input-wrap--select select {
    width: 100%;
    padding: 0.8rem 2rem 0.8rem 1rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font: inherit;
    font-size: 0.92rem;
    background: #fafbfc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    appearance: none;
    color: var(--auth-text);
    cursor: pointer;
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
}

.vendor-register .auth-input-wrap--select select:hover {
    border-color: #cbd5e1;
}

.vendor-register .auth-input-wrap--select select:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
}

/* ─── Category picker ─── */
.sector-search-wrap {
    margin-bottom: 0.75rem;
}

.sector-search-wrap .auth-input-wrap input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.65rem;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    font: inherit;
    background: #fafbfc;
}

.sector-search-wrap .auth-input-wrap input:focus {
    outline: none;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
}

.sector-picker {
    max-height: 16.5rem;
    overflow: auto;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding: 0.65rem;
    background: #fafbfc;
    scrollbar-width: thin;
}

.sector-picker--loading {
    opacity: 0.6;
    pointer-events: none;
}

.sector-picker__empty {
    margin: 1rem 0.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.sector-group__title {
    margin: 0.85rem 0 0.5rem;
    padding: 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.sector-group:first-child .sector-group__title {
    margin-top: 0.25rem;
}

.sector-group__options {
    display: grid;
    gap: 0.45rem;
}

.sector-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--auth-transition), background var(--auth-transition), box-shadow var(--auth-transition);
}

.sector-option:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.sector-option:has(input:checked) {
    border-color: var(--auth-primary);
    background: #f0fdfa;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.15);
}

.sector-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.sector-option__radio {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.1rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transition: all var(--auth-transition);
    position: relative;
}

.sector-option__radio::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--auth-primary);
    transform: scale(0);
    transition: transform var(--auth-transition);
}

.sector-option:has(input:checked) .sector-option__radio {
    border-color: var(--auth-primary);
}

.sector-option:has(input:checked) .sector-option__radio::after {
    transform: scale(1);
}

.sector-option__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.sector-option__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-text);
    line-height: 1.3;
}

.sector-option small {
    color: var(--auth-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.sector-option.is-hidden,
.sector-group.is-hidden {
    display: none !important;
}

/* ─── Review summary ─── */
.vendor-review {
    margin: 0 0 1.15rem;
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
}

.vendor-review div {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.75rem;
    font-size: 0.9rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e2e8f0;
}

.vendor-review div:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.vendor-review dt {
    margin: 0;
    color: var(--auth-muted);
    font-weight: 500;
}

.vendor-review dd {
    margin: 0;
    font-weight: 600;
    color: var(--auth-text);
    word-break: break-word;
}

/* ─── Terms row (native checkbox — no overlay tricks) ─── */
.vendor-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.35rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--auth-muted);
}

.vendor-terms-row input[type="hidden"] {
    display: none;
}

.vendor-terms-row input[type="checkbox"] {
    position: static;
    width: 1.1rem;
    height: 1.1rem;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
    opacity: 1;
    cursor: pointer;
    accent-color: var(--auth-primary);
}

.vendor-terms-row label {
    cursor: pointer;
}

/* ─── Simple step navigation (outside form — always visible) ─── */
.vendor-nav-simple {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--auth-border);
}

.vendor-nav-simple__continue {
    flex: 1;
    display: block;
    width: 100%;
    padding: 0.9rem 1.25rem;
    border: none;
    border-radius: 10px;
    background: #0d9488;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.vendor-nav-simple__continue:hover {
    background: #0f766e;
}

.vendor-nav-simple__continue[hidden],
.vendor-nav-simple__back[hidden] {
    display: none !important;
}

.vendor-nav-simple__back {
    flex: 0 0 auto;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: #fff;
    color: var(--auth-muted);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.vendor-nav-simple__back:hover {
    background: #f8fafc;
    color: var(--auth-text);
}

/* legacy — keep if referenced elsewhere */
.vendor-step-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--auth-border);
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, var(--auth-panel) 28%);
    backdrop-filter: blur(6px);
}

.vendor-step-actions .auth-btn {
    margin-top: 0;
    flex: 1;
    min-height: 2.85rem;
}

.vendor-step-actions .auth-btn[hidden] {
    display: none !important;
}

.vendor-step-actions .auth-btn--ghost {
    flex: 0 0 auto;
    min-width: 5.5rem;
    background: #fff;
    color: var(--auth-muted);
    border: 1px solid var(--auth-border);
    box-shadow: none;
}

.vendor-step-actions .auth-btn--ghost:hover {
    background: #f8fafc;
    color: var(--auth-text);
    transform: none;
}

@media (max-width: 520px) {
    .vendor-register .vendor-steps {
        margin-bottom: 1.25rem;
    }

    .vendor-step {
        min-width: 3.5rem;
    }

    .vendor-step__label {
        font-size: 0.62rem;
    }

    .vendor-step__badge {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.72rem;
    }

    .vendor-review div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

.sector-cascade__columns {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 200px;
}

.sector-cascade__column {
    flex: 0 0 min(220px, 78vw);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: #f8fafc;
    max-height: 280px;
    display: flex;
    flex-direction: column;
}

.sector-cascade__column-title {
    margin: 0;
    padding: 0.6rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--auth-muted);
    border-bottom: 1px solid var(--auth-border);
}

.sector-cascade__list {
    list-style: none;
    margin: 0;
    padding: 0.3rem;
    overflow-y: auto;
    flex: 1;
}

.sector-cascade__option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.5rem 0.55rem;
    border-radius: 8px;
    font: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

.sector-cascade__option:hover {
    background: #e2e8f0;
}

.sector-cascade__option.is-active {
    background: #ccfbf1;
    color: #0f766e;
    font-weight: 600;
}

.sector-cascade__option-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.sector-cascade__option-sw {
    font-size: 0.75rem;
    font-weight: 500;
    color: #0f766e;
}

.sector-cascade__hint {
    margin: 0.65rem 0 0;
    font-size: 0.84rem;
    color: var(--auth-muted);
}

.sector-cascade__selection {
    margin: 0.75rem 0 0;
}

.sector-cascade__selection .vendor-sector-pill {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
    font-weight: 600;
    font-size: 0.86rem;
}

/* Smart category search (Phase 1) */
.sector-search__label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
}

.sector-search__input-wrap {
    position: relative;
}

.sector-search__input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font: inherit;
    font-size: 1rem;
    background: #fff;
}

.sector-search__input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.sector-search__hint {
    margin: 0.55rem 0 0.75rem;
    font-size: 0.84rem;
}

.sector-search__results {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 0.75rem;
}

.sector-search__option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.9rem;
    border: none;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.sector-search__option--recommended {
    background: #f0fdfa;
    border-left: 3px solid #0f766e;
}

.sector-search__option:hover,
.sector-search__option.is-active {
    background: #f0fdfa;
}

.sector-search__option-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
}

.sector-search__option-main {
    font-weight: 600;
    color: #0f172a;
}

.sector-search__recommend-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #115e59;
    background: #ccfbf1;
    border: 1px solid #5eead4;
}

.sector-search__option-sw {
    font-size: 0.84rem;
    font-weight: 500;
    color: #0f766e;
}

.sector-search__option-sub {
    font-size: 0.78rem;
    color: #64748b;
}

.sector-search__option-confidence {
    font-size: 0.72rem;
    color: #0f766e;
    font-weight: 600;
}

.sector-search__empty {
    margin: 0;
    padding: 0.85rem 0.9rem;
    font-size: 0.84rem;
    color: #64748b;
}

.sector-search__selection {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.sector-search__selection-badge {
    font-size: 0.75rem;
    color: #0f766e;
    font-weight: 600;
}

.sector-search__advanced-toggle {
    border: none;
    background: none;
    color: #0f766e;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.75rem;
    text-decoration: underline;
}

.sector-search__cascade-fallback {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.vendor-register-questions {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.vendor-register-question {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #e2e8f0;
}

.vendor-register-question:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.vendor-register-question__number {
    margin: 0 0 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
}

.vendor-register-question__title {
    margin: 0 0 0.65rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
