/* Trade-In calculator — iOS-style wheels */
.dm-ti-calc {
    --dm-ti-bg: #ffffff;
    --dm-ti-soft: #f5f5f7;
    --dm-ti-text: #1d1d1f;
    --dm-ti-muted: #86868b;
    --dm-ti-line: #e5e5ea;
    --dm-ti-band: rgba(0, 113, 227, 0.10);
    --dm-ti-accent: #0071e3;
    --dm-ti-fade: #ffffff;
    margin: 0 0 48px;
    padding: 28px 20px 32px;
    background: var(--dm-ti-soft);
    border-radius: 18px;
}

[data-theme="dark"] .dm-ti-calc {
    --dm-ti-bg: #1c1c1e;
    --dm-ti-soft: #111113;
    --dm-ti-text: #f5f5f7;
    --dm-ti-muted: #98989f;
    --dm-ti-line: #2c2c2e;
    --dm-ti-band: rgba(10, 132, 255, 0.18);
    --dm-ti-accent: #0a84ff;
    --dm-ti-fade: #111113;
}

.dm-ti-calc__head {
    text-align: center;
    margin-bottom: 22px;
}

.dm-ti-calc__title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--dm-ti-text);
}

.dm-ti-calc__subtitle {
    margin: 0 auto;
    max-width: 520px;
    font-size: 0.98rem;
    line-height: 1.45;
    color: var(--dm-ti-muted);
}

.dm-ti-calc__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dm-ti-calc__col {
    background: var(--dm-ti-bg);
    border: 1px solid var(--dm-ti-line);
    border-radius: 16px;
    padding: 14px 12px 16px;
}

.dm-ti-calc__col-label {
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dm-ti-muted);
    margin-bottom: 10px;
}

.dm-ti-wheels {
    display: grid;
    grid-template-columns: 1.45fr 0.9fr;
    gap: 8px;
}

.dm-ti-wheel {
    position: relative;
    height: 220px;
    border-radius: 14px;
    background: var(--dm-ti-soft);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.dm-ti-wheel__band {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 44px;
    margin-top: -22px;
    border-radius: 10px;
    background: var(--dm-ti-band);
    border: 1px solid rgba(0, 113, 227, 0.22);
    pointer-events: none;
    z-index: 2;
}

[data-theme="dark"] .dm-ti-wheel__band {
    border-color: rgba(10, 132, 255, 0.35);
}

.dm-ti-wheel__fade {
    display: none;
}

.dm-ti-wheel__scroller {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior: contain;
    outline: none;
}

.dm-ti-wheel__scroller::-webkit-scrollbar {
    display: none;
}

.dm-ti-wheel__item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dm-ti-muted);
    opacity: 0.55;
    transform: scale(0.92);
    transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    user-select: none;
    padding: 0 6px;
    text-align: center;
    line-height: 1.15;
}

.dm-ti-wheel__item.is-active {
    color: var(--dm-ti-text);
    opacity: 1;
    transform: scale(1.04);
    font-weight: 600;
}

.dm-ti-wheel__item--pad {
    pointer-events: none;
    opacity: 0;
}

.dm-ti-calc__price {
    margin-top: 12px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dm-ti-text);
    letter-spacing: -0.02em;
}

.dm-ti-calc__result {
    margin-top: 18px;
    padding: 20px 16px;
    border-radius: 16px;
    background: var(--dm-ti-bg);
    border: 1px solid var(--dm-ti-line);
    text-align: center;
}

.dm-ti-calc__result-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--dm-ti-muted);
    margin-bottom: 6px;
}

.dm-ti-calc__result-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--dm-ti-accent);
    line-height: 1.15;
}

.dm-ti-calc__result-value.is-zero,
.dm-ti-calc__result-value.is-credit {
    color: #34c759;
}

.dm-ti-calc__result-note {
    margin: 10px auto 0;
    max-width: 480px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--dm-ti-muted);
}

.dm-ti-calc__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 980px;
    background: var(--dm-ti-accent);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.dm-ti-calc__cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .dm-ti-calc {
        padding: 22px 14px 26px;
        margin-bottom: 36px;
        border-radius: 14px;
    }

    .dm-ti-calc__title {
        font-size: 1.4rem;
    }

    .dm-ti-calc__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dm-ti-wheel {
        height: 200px;
    }

    .dm-ti-wheel__item {
        font-size: 0.9rem;
    }

    .dm-ti-calc__result-value {
        font-size: 1.7rem;
    }
}
