/* ===== THE BEST трансфер — кастомные стили ===== */
:root {
    --brand: #F47B20;        /* основной оранжевый */
    --brand-dark: #e06a12;
    --brand-soft: #fff3ea;   /* светлый фон под оранжевый */
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
}

body { font-family: 'Roboto', sans-serif; color: var(--ink); }

/* Навигация: десктоп / мобайл */
.desktop-nav { display: none; }
.mobile-nav  { display: flex; }
@media (min-width: 1024px) {
    .desktop-nav { display: flex; }
    .mobile-nav  { display: none; }
}

/* Брендовые утилиты */
.text-brand        { color: var(--brand); }
.bg-brand          { background-color: var(--brand); }
.bg-brand:hover    { background-color: var(--brand-dark); }
.bg-brand-soft     { background-color: var(--brand-soft); }
.border-brand      { border-color: var(--brand); }
.ring-brand        { box-shadow: 0 0 0 2px var(--brand); }

/* Заглушки для ещё не загруженных картинок */
.img-ph {
    background: #f1f3f5;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
img.is-broken {
    background: #f1f3f5;
    object-fit: contain;
    padding: 6px;
}

/* Поле формы с подписью внутри (Откуда / Куда и т.п.) */
.field {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 14px;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244,123,32,.12); }
.field label { font-size: 11px; color: var(--muted); display: block; }
.field input,
.field textarea,
.field select {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--ink);
    background: transparent;
    padding: 2px 0 0;
}

/* Карточка тарифа */
.tariff {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 6px 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background .15s;
    background: #fff;
}
.tariff:hover { border-color: #d1d5db; }
.tariff.active { border-color: var(--brand); background: var(--brand-soft); }
.tariff .chev { position: absolute; top: 6px; right: 8px; color: #c0c4cc; font-size: 11px; }

/* Аккордеон выпадашек в форме */
.collapse { display: none; }
.collapse.open { display: block; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; }
.faq-a { display: none; padding: 0 0 16px 34px; color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-toggle { color: var(--brand); transition: transform .2s; }

/* Модалка */
.modal { position: fixed; inset: 0; z-index: 50; display: none; }
.modal.open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-card {
    position: relative;
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 460px;
    margin: 5vh auto;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

/* Кнопки */
.btn-primary {
    background: var(--brand);
    color: #fff;
    border-radius: 999px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    transition: background .15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline {
    border: 1.5px solid var(--brand);
    color: var(--brand);
    border-radius: 999px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    background: #fff;
}

/* Кастомный скролл выпадающего списка машин */
.car-select { max-height: 220px; overflow-y: auto; }

/* ===== Нативные контролы в стиле сайта ===== */
select,
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    cursor: pointer;
}
/* Отдельностоящие (вне .field) поля даты/времени/селекта */
.input-soft {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    width: 100%;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.input-soft:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244,123,32,.12); }

/* Кастомная стрелка для select */
select.input-soft,
.field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
/* Иконка календаря/часов оранжевая */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .55;
    filter: invert(48%) sepia(89%) saturate(1200%) hue-rotate(346deg) brightness(101%) contrast(96%);
}

/* ===== Выпадающий список моделей у тарифа ===== */
.tariff-wrap { position: relative; }
.chev-btn {
    position: absolute; top: 5px; right: 7px;
    color: #c0c4cc; font-size: 11px; line-height: 1;
    padding: 4px; border-radius: 6px;
}
.chev-btn:hover { color: var(--brand); background: var(--brand-soft); }
.tariff-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    z-index: 20;
    padding: 4px;
    max-height: 200px;
    overflow-y: auto;
}
.tariff-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--ink);
}
.tariff-menu button:hover { background: var(--brand-soft); }
.tariff-menu button.active { color: var(--brand); font-weight: 600; }

/* ===== Строки доп. услуг с галочкой ===== */
.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 4px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.service-row:last-child { border-bottom: none; }
.service-row .check { color: transparent; transition: color .15s; }
.service-row.active { color: var(--brand); }
.service-row.active .check { color: var(--brand); }

/* Тонкий скроллбар для выпадашек */
.car-select::-webkit-scrollbar,
.tariff-menu::-webkit-scrollbar { width: 6px; }
.car-select::-webkit-scrollbar-thumb,
.tariff-menu::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }

/* ===================================================== */
/* Дропдаун (десктоп) → модальная шторка снизу (мобайл)  */
/* ===================================================== */
.dd { position: relative; }
.dd-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.12);
    padding: 14px;
}
.dd-panel.open { display: block; }
.dd-head, .dd-apply { display: none; }
.dd-head button { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 15px; }

/* Десктоп: обычный абсолютный дропдаун */
@media (min-width: 1024px) {
    .dd-panel.open {
        position: absolute;
        top: calc(100% + 6px);
        left: 0; right: 0;
        z-index: 30;
    }
}

/* Мобайл: шторка снизу + затемнение */
.dd-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
@media (max-width: 1023px) {
    .dd-backdrop.open { display: block; }
    .dd-panel.open {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 61;
        border-radius: 22px 22px 0 0;
        max-height: 85vh;
        overflow-y: auto;
        padding: 18px;
        animation: ddUp .2s ease;
    }
    .dd-head  { display: flex; margin-bottom: 10px; }
    .dd-apply { display: block; margin-top: 14px; }
}
@keyframes ddUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Опция-радио (text слева, кружок справа) */
.opt {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 2px; cursor: pointer;
}
.opt input { display: none; }
.opt .ind {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #d1d5db; flex-shrink: 0; position: relative;
    transition: border-color .15s;
}
.opt input:checked ~ .ind { border-color: var(--brand); }
.opt input:checked ~ .ind::after {
    content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--brand);
}
.opt input:checked ~ .txt { color: var(--brand); }
.opt .txt { color: var(--ink); }

/* Поля-пилюли (дата/время) */
.pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--muted);
    width: 100%;
    background: #fff;
}
.pill:disabled { background: #fafafa; color: #c0c4cc; }

/* Состояние «выключено» для полей даты/времени */
.is-disabled { background: #fafafa; color: #c0c4cc !important; pointer-events: none; }

/* ===================================================== */
/* Кастомный календарь и выбор времени                   */
/* ===================================================== */
.picker-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 79; }
.picker-pop {
    display: none;
    position: absolute;
    z-index: 80;
    width: 290px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
    padding: 16px;
}
.picker-pop.open { display: block; }

@media (max-width: 1023px) {
    .picker-backdrop.open { display: block; }
    .picker-pop.open {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: auto;
        border-radius: 22px 22px 0 0;
        animation: ddUp .2s ease;
    }
}

/* Шапка календаря */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-weight: 600; text-transform: capitalize; }
.cal-nav { width: 32px; height: 32px; border-radius: 9px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.cal-nav:hover { background: var(--brand-soft); color: var(--brand); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    border-radius: 9px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.cal-day:hover { background: var(--brand-soft); }
.cal-day.muted { color: #d1d5db; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--brand); }
.cal-day.sel { background: var(--brand); color: #fff; }

/* Выбор времени — две колонки-барабана */
.tp { display: flex; gap: 8px; justify-content: center; }
.tp-col {
    height: 190px; overflow-y: auto; width: 76px; text-align: center;
    border: 1px solid var(--line); border-radius: 12px; padding: 4px 0;
}
.tp-label { font-size: 11px; color: var(--muted); text-align: center; margin-bottom: 4px; }
.tp-item { padding: 8px 0; margin: 2px 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tp-item:hover { background: var(--brand-soft); }
.tp-item.sel { background: var(--brand); color: #fff; font-weight: 600; }
.tp-col::-webkit-scrollbar { width: 5px; }
.tp-col::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 5px; }

/* Кружок-галочка для доп. услуг */
.service-row .ind {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: 11px; flex-shrink: 0;
    transition: all .15s;
}
.service-row.active .ind { background: var(--brand); border-color: var(--brand); color: #fff; }
.service-row.active { color: var(--brand); }
