/* =============================================================================
   SELL / TRADE-IN — 3-step valuation form
   Self-contained. Uses explicit hex (theme --ac-primary may be white).
   ============================================================================= */
.ac-tradein-section { background: #fff; }

.ac-tradein-layout {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1180px;
    margin: 0 auto;
}

/* =============================================================================
   STEP INDICATOR (left rail)
   ============================================================================= */

.ac-tradein-steps {
    position: sticky; top: 120px;
    display: flex; flex-direction: column;
    align-items: center; gap: 56px;
    padding-top: 8px;
}
.ac-tradein-steps-track {
    position: absolute; top: 30px; bottom: 30px; left: 50%;
    width: 2px; transform: translateX(-50%);
    background: #e5e5e9; z-index: 0;
}

.ac-tradein-stepdot {
    position: relative; z-index: 1;
    width: 52px; height: 52px; border-radius: 50%;
    border: 2px solid #e5e5e9;
    background: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .25s ease;
}
.ac-tradein-stepdot span {
    font-weight: 700; font-size: 1.05rem;
    color: #b5b5be;
    transition: color .25s ease;
}
.ac-tradein-stepdot.is-active {
    background: #1a1a2e; border-color: #1a1a2e;
    transform: scale(1.05);
}
.ac-tradein-stepdot.is-active span { color: #fff; }
.ac-tradein-stepdot.is-done {
    background: #1a1a2e; border-color: #1a1a2e;
}
.ac-tradein-stepdot.is-done span { color: #fff; }

/* =============================================================================
   FORM PANELS
   ============================================================================= */

.ac-tradein-main { min-height: 480px; max-width: 1040px; }

.ac-tradein-panel { display: none; animation: tiFade .35s ease; }
.ac-tradein-panel.is-active { display: block; }

@keyframes tiFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ac-tradein-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800; letter-spacing: -.02em;
    color: #1a1a2e;
    margin: 0 0 16px;
}
.ac-tradein-lead {
    font-size: .98rem;
    color: #6b7280;
    line-height: 1.7;
    max-width: 760px;
    margin: 0 0 36px;
}

/* =============================================================================
   FIELDS
   ============================================================================= */

.ac-tradein-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 24px;
}
.ac-tradein-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ac-tradein-grid--3 { grid-template-columns: repeat(3, 1fr); }

.ac-field { display: flex; flex-direction: column; margin-bottom: 4px; }

.ac-field > label {
    font-size: .72rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.ac-field > label span { color: var(--ac-accent); }

.ac-field input[type="text"],
.ac-field input[type="email"],
.ac-field input[type="tel"],
.ac-field input[type="number"],
.ac-field textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #dcdce2;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    color: #1a1a2e;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
.ac-field input::placeholder,
.ac-field textarea::placeholder { color: #b0b0ba; }

.ac-field input:focus,
.ac-field textarea:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}
.ac-field textarea { resize: vertical; min-height: 120px; }

/* Error state */
.ac-field.has-error input,
.ac-field.has-error textarea { border-color: var(--ac-accent); }
.ac-field-error {
    font-size: .76rem;
    color: var(--ac-accent);
    margin-top: 6px;
    min-height: 0;
}
.ac-field.has-error .ac-field-error { min-height: 16px; }

/* =============================================================================
   RADIO + CHECKBOX
   ============================================================================= */

.ac-radio-group { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.ac-radio, .ac-checkbox {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; font-size: .92rem; color: #1a1a2e;
    text-transform: none; letter-spacing: 0; font-weight: 400;
}
.ac-radio input, .ac-checkbox input {
    width: 18px; height: 18px;
    accent-color: var(--ac-accent);
    margin-top: 1px; flex-shrink: 0; cursor: pointer;
}
.ac-checkbox span { line-height: 1.5; color: #6b7280; }

/* =============================================================================
   PHOTO UPLOADS
   ============================================================================= */

.ac-tradein-uploads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin: 8px 0 32px;
}

.ac-upload { display: flex; flex-direction: column; }
.ac-upload-label {
    font-size: .72rem; font-weight: 700;
    letter-spacing: .07em; text-transform: uppercase;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.ac-upload-zone {
    position: relative;
    display: block;
    min-height: 170px;
    border: 1.5px dashed #cfcfd6;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s, background .2s;
    background: #fafafb;
}
.ac-upload-zone:hover { border-color: var(--ac-accent); background: #fff; }
.ac-upload-zone.is-drag { border-color: var(--ac-accent); background: rgba(220,30,40,.04); }

.ac-upload-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    color: #a0a0aa; text-align: center;
    font-size: .82rem; line-height: 1.5;
    padding: 16px;
}
.ac-upload-placeholder svg { color: #b8b8c0; }

.ac-upload-preview {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}
.ac-upload-zone.has-image .ac-upload-preview { display: block; }
.ac-upload-zone.has-image .ac-upload-placeholder { display: none; }
.ac-upload-zone.has-image::after {
    content: 'Change';
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(26,26,46,.85); color: #fff;
    font-size: .7rem; font-weight: 600;
    padding: 5px 12px; border-radius: 6px;
}

/* =============================================================================
   ACTIONS
   ============================================================================= */

.ac-tradein-actions {
    display: flex; align-items: center; gap: 24px;
    margin-top: 36px;
}

.ac-tradein-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: #1a1a2e; color: #fff;
    border: none; border-radius: 40px;
    padding: 16px 32px;
    font-size: .82rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .12s;
}
.ac-tradein-btn:hover { background: #000; transform: translateY(-1px); }
.ac-tradein-btn:disabled { opacity: .7; cursor: default; transform: none; }

.ac-tradein-back {
    background: none; border: none;
    font-size: .8rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: #6b7280; cursor: pointer;
    transition: color .2s;
}
.ac-tradein-back:hover { color: #1a1a2e; }

/* Spinner */
.ac-tradein-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tiSpin .7s linear infinite;
}
@keyframes tiSpin { to { transform: rotate(360deg); } }

/* =============================================================================
   SUCCESS
   ============================================================================= */

.ac-tradein-success { text-align: center; padding: 40px 0; }
.ac-tradein-success-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(46,160,67,.12); color: #2ea043;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}
.ac-tradein-success .ac-tradein-lead { margin-left: auto; margin-right: auto; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 900px) {
    .ac-tradein-layout { grid-template-columns: 1fr; gap: 24px; }
    .ac-tradein-steps {
        position: static;
        flex-direction: row; justify-content: center;
        gap: 0; width: 100%;
    }
    .ac-tradein-steps-track {
        top: 50%; bottom: auto; left: 20%; right: 20%;
        width: auto; height: 2px; transform: translateY(-50%);
    }
    .ac-tradein-stepdot { margin: 0 32px; }
}

@media (max-width: 680px) {
    .ac-tradein-grid--2,
    .ac-tradein-grid--3 { grid-template-columns: 1fr; }
    .ac-tradein-uploads { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .ac-tradein-stepdot { width: 44px; height: 44px; margin: 0 20px; }
}

@media (max-width: 440px) {
    .ac-tradein-uploads { grid-template-columns: 1fr; }
    .ac-tradein-actions { gap: 14px; }
    .ac-tradein-btn { padding: 14px 24px; }
}