/*
Theme Name: Kadence Child
Template: kadence
Version: 1.2
*/
@import url("../kadence/style.css");

/* =========================
 ОСНОВНАЯ СЕКЦИЯ
========================= */
.map-hero-section {
 position: relative;
 width: 100vw;
 left: 50%;
 transform: translateX(-50%);
 min-height: 85vh;
 height: auto;
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: visible;
}
.map-bg-wrapper {
 position: absolute;
 inset: 0;
 z-index: 1;
}
.map-bg-wrapper::after {
 content: '';
 position: absolute;
 inset: 0;
 background: radial-gradient(circle, rgba(0, 0, 0, 0) 30%, rgba(17, 24, 39, 0.25) 100%), 
 rgba(15, 23, 42, 0.08);
 z-index: 10;
 pointer-events: none;
}
.map-bg-wrapper #taxi-map {
 width: 100%;
 height: 100%;
 position: relative;
 z-index: 1;
}
.map-content-overlay {
 position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* =========================
   КАРТОЧКА КАЛЬКУЛЯТОРА
========================= */
.taxi-calc-container {
    width: 100%;
    max-width: 380px;
    margin: 0;
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), 0 20px 50px rgba(0, 0, 0, 0.12);
}
.taxi-calc-header { padding: 10px 20px 0; }
.taxi-calc-header h3 { font-size: 17px !important; }
.taxi-calc-header p { margin: 3px 0 0 !important; color: #6b7280 !important; font-size: 12px; }
.taxi-calc-form { padding: 8px 20px 8px !important; }
.taxi-calc-form p, .taxi-calc-form br { display: none !important; margin: 0 !important; padding: 0 !important; }

/* =========================
   ТИП ЗАКАЗА (НОВОЕ)
========================= */
.taxi-order-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.taxi-order-type-btn {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all .2s ease;
}
.taxi-order-type-btn:hover {
    border-color: #ffb703;
}
.taxi-order-type-btn.active {
    border-color: #ffb703;
    background: #fff8ec;
    color: #111827;
}

/* БЛОК МАРШРУТА */
/* =========================
   БЛОК МАРШРУТА (Откуда / Куда)
========================= */

.taxi-route-block {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.taxi-route-block::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 32px;
    width: 2px;
    height: 22px;
    background: #111827;
    z-index: 1;
}

.taxi-route-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.taxi-route-badge {
    position: relative;
    z-index: 2;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taxi-route-badge--b {
    background: #111827;
}

.taxi-route-item .taxi-input-wrapper {
    flex: 1 1 auto;
}

.taxi-calc-container button.taxi-swap-btn {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 10px rgba(0,0,0,.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    z-index: 3;
    color: #6b7280 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    transition: all .2s ease;
}

.taxi-calc-container button.taxi-swap-btn:hover {
    border-color: #ffb703 !important;
    color: #ffb703 !important;
    background: #ffffff !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

.taxi-calc-container button.taxi-swap-btn svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
}

/* ИНПУТЫ */
.taxi-client-fields { padding: 0 0 10px 0 !important; display: flex; flex-direction: column; gap: 8px !important; }
.taxi-input-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px !important; }
.taxi-input-wrapper { position: relative; display: flex; align-items: center; width: 100%; margin: 0 !important; padding: 0 !important; }
.taxi-input-wrapper input, .taxi-input-wrapper select {
    width: 100%; padding: 0 14px !important; background: #f9fafb !important; border: 1px solid #e5e7eb !important;
    border-radius: 10px !important; color: #111827 !important; font-size: 12px !important; font-weight: 500;
    height: 36px !important; line-height: 36px !important; box-sizing: border-box; transition: all .2s ease;
}
.taxi-input-wrapper input:focus, .taxi-input-wrapper select:focus { background: #fff !important; border-color: #ffb703 !important; box-shadow: 0 0 0 3px rgba(255, 183, 3, .15) !important; outline: none !important; }

/* АВТОДОПОЛНЕНИЕ */
.taxi-suggestions { position: absolute; top: 100%; left: 0; margin-top: 4px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; max-height: 200px; overflow-y: auto; width: 100%; box-shadow: 0 8px 20px rgba(0,0,0,.12); z-index: 999; display: none; }
.taxi-suggestion-item { padding: 10px 14px; font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taxi-suggestion-item:hover { background: #fef3c7; color: #111827; }

/* ТАРИФЫ */
.taxi-tariff-block { margin-bottom: 8px; }
.taxi-block-label { display: block; margin: 0 0 6px 0; font-size: 10px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .3px; }
.taxi-tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.taxi-tariff { background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 10px; padding: 3px 2px 3px !important; cursor: pointer; text-align: center; transition: all .2s ease; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.taxi-tariff:hover { border-color: #ffb703; background: #fffbf0; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 183, 3, .2); }
.taxi-tariff.active { border-color: #ffb703; background: #fff8ec; box-shadow: 0 0 0 2px rgba(255, 183, 3, .2); }
.taxi-tariff img { width: 100%; height: 20px; object-fit: contain; transition: transform .2s ease; display: block; }
.taxi-tariff:hover img { transform: scale(1.1); }
.taxi-tariff-name { display: block; font-size: 7.5px !important; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.2px; white-space: nowrap; margin-top: 2px !important; }
.taxi-tariff.active .taxi-tariff-name { color: #ffb703; }
.taxi-tariff-hint { display: block; font-size: 7px !important; line-height: 1.1; font-weight: 600; color: #9ca3af; text-align: center; margin-top: 1px !important; }
.taxi-tariff-price { display: block; font-size: 9.5px !important; font-weight: 800; color: #111827; margin-top: 1px !important; min-height: 11px; }
.taxi-tariff.active .taxi-tariff-price { color: #ffb703; }

/* =========================
   КУРЬЕРСКАЯ ДОСТАВКА (НОВОЕ)
========================= */
.taxi-delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.taxi-delivery-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    text-align: center;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.taxi-delivery-option:hover {
    border-color: #ffb703;
    background: #fffbf0;
}
.taxi-delivery-option.active {
    border-color: #ffb703;
    background: #fff8ec;
    box-shadow: 0 0 0 2px rgba(255, 183, 3, .2);
}
.taxi-delivery-name {
    font-size: 11px;
    font-weight: 700;
    color: #111827;
}
.taxi-delivery-option.active .taxi-delivery-name { color: #ffb703; }
.taxi-delivery-desc {
    font-size: 9px;
    color: #6b7280;
    line-height: 1.3;
}
.taxi-delivery-rate {
    font-size: 10px;
    font-weight: 800;
    color: #111827;
    margin-top: 2px;
}
.taxi-delivery-permit-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
    text-transform: none;
    cursor: pointer;
    color: #4b5563;
}
.taxi-delivery-permit-label input { width: auto; height: auto; }

/* ДОПОЛНИТЕЛЬНЫЕ ОПЦИИ */
.taxi-calc-container button.taxi-extra-toggle {
    width: 100% !important; background: #f9fafb !important; border: 1px solid #e5e7eb !important; border-radius: 10px !important;
    padding: 5px 12px !important; margin: 0 0 6px 0 !important; display: flex !important; align-items: center !important; justify-content: space-between !important;
    cursor: pointer; font-size: 12px !important; color: #6b7280 !important; font-weight: 500 !important; transition: all .2s ease;
	position: relative !important; 
    z-index: 10 !important; 
    pointer-events: auto !important;
}
.taxi-calc-container button.taxi-extra-toggle:hover { border-color: #ffb703 !important; color: #111827 !important; }
.taxi-calc-container button.taxi-extra-toggle svg { width: 16px !important; height: 16px !important; flex: 0 0 16px !important; fill: none !important; stroke: currentColor !important; transition: transform .2s ease; }
.taxi-calc-container button.taxi-extra-toggle.open svg { transform: rotate(180deg); }
.taxi-extra-options { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px; 
    margin-bottom: 0; 
    max-height: 0; 
    opacity: 0; 
    overflow: hidden; 
    pointer-events: none; 
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease; 
}
.taxi-extra-options.open { 
    max-height: 400px; 
    opacity: 1; 
    margin-bottom: 12px; 
    pointer-events: auto; 
}
.taxi-extra-options .taxi-input-group { display: flex; flex-direction: column; gap: 6px; }
.taxi-extra-options .taxi-input-group--full { grid-column: 1 / -1; }
.taxi-extra-options label { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .2px; }

/* КНОПКА ЗАКАЗА */
.taxi-calc-container button.taxi-btn-order {
    width: 100% !important; height: 40px !important; border: none !important; border-radius: 14px !important; padding: 0 16px !important; margin: 0 !important;
    font-size: 13px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: .5px !important; cursor: pointer;
    background: linear-gradient(to right, #ffca28 0%, #ff9100 100%) !important; color: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 8px 25px rgba(255, 145, 0, 0.45) !important;
    display: flex !important; justify-content: center !important; align-items: center !important; transition: all .15s ease;
}
.taxi-calc-container button.taxi-btn-order:hover { background: linear-gradient(to right, #ffd54f 0%, #ff9e1b 100%) !important; transform: translateY(-1.5px) !important; }
.taxi-calc-container button.taxi-btn-order:disabled, .taxi-calc-container button.taxi-btn-order.taxi-btn-disabled {
    opacity: 0.95 !important; cursor: not-allowed !important; pointer-events: none !important; transform: none !important;
    box-shadow: 0 4px 15px rgba(255, 145, 0, 0.25) !important; filter: saturate(0.9) contrast(0.95);
}

/* РЕЗУЛЬТАТ */
.taxi-result-box { margin: 0 0 10px 0 !important; padding: 6px 12px !important; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; display: flex; gap: 1rem !important; align-items: center; flex-wrap: wrap; }
.taxi-res-row { display: flex; flex-direction: column; gap: 1px; }
.taxi-res-row span:first-child { font-size: 10px; color: #6b7280; text-transform: uppercase; }
.taxi-res-row strong { font-size: 13px; color: #111827; }

.taxi-result-box:has(> .taxi-result-placeholder) { 
    background: transparent; 
    border: 1px dashed #d1d5db; 
    border-radius: 12px; 
    padding: 10px 12px !important; 
    justify-content: center; 
    text-align: center; 
}

.taxi-result-placeholder { 
    font-size: 11px; 
    line-height: 1.4; 
    color: #6b7280; 
}

/* АДАПТИВНОСТЬ ПОД МОБИЛКИ */
@media (max-width: 700px) {
    .taxi-calc-container { border-radius: 16px; }
    .taxi-calc-header { padding: 14px 16px 2px; }
    .taxi-calc-form { padding: 12px 16px 14px; }
    .taxi-tariffs { grid-template-columns: repeat(3, 1fr); }
    .taxi-extra-options { grid-template-columns: 1fr; }
    .taxi-result-box { margin: 0 16px 14px; }
    .taxi-input-pair { grid-template-columns: 1fr; gap: 10px; }
}

/* Красная подсветка при неверном телефоне */
.taxi-input-wrapper input.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Тариф «Не подходит» при попытке заказа */
.taxi-tariff.input-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Количество пассажиров (обязательное поле) */

/* Количество пассажиров — компактное поле в одну строку */
.taxi-passengers-block { margin-bottom: 10px; }

/* ИЗМЕНЕНО: контейнер повторяет вид полей адреса (высота 36px, радиус 10px, фон и рамка те же) */
.taxi-passengers-field {
    display: flex;
    align-items: center;
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all .2s ease;
}
.taxi-passengers-field:focus-within {
    background: #fff;
    border-color: #ffb703;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, .15);
}

/* НОВОЕ: левая часть — иконка + текст «Пассажиры» */
.taxi-calc-container .taxi-passengers-label {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    margin: 0 !important;
    padding: 0 0 0 14px !important;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.taxi-passengers-label svg { width: 16px; height: 16px; flex: 0 0 16px; }

/* НОВОЕ: правая часть — select без собственной рамки, с разделителем и своей стрелкой */
.taxi-calc-container .taxi-passengers-field select#passengers {
    flex: 0 0 52%;
    width: 52% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 30px 0 14px !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    border: 0 !important;
    border-left: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 34px !important;
    color: #111827 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none !important;
    cursor: pointer;
}
/* пока ничего не выбрано — серый «Выберите» */
.taxi-calc-container .taxi-passengers-field select#passengers:invalid { color: #9ca3af !important; }
.taxi-passengers-field select option { color: #111827; }

/* ИЗМЕНЕНО: красная подсветка при ошибке теперь на всём поле
   (JS по-прежнему добавляет класс input-error на сам select) */
.taxi-passengers-field:has(select.input-error) {
    border-color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* =========================
   КРАСИВОЕ МОДАЛЬНОЕ ОКНО
========================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 20px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-title {
    margin: 14px 0 6px !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

.modal-text {
    font-size: 13px !important;
    color: #4b5563 !important;
    line-height: 1.5 !important;
    margin: 0 0 20px 0 !important;
    display: block !important;
}

.modal-text strong {
    color: #111827;
}

.modal-btn {
    width: 100%;
    background: linear-gradient(to right, #ffca28 0%, #ff9100 100%);
    color: #111827;
    font-weight: 700;
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: linear-gradient(to right, #ffd54f 0%, #ff9e1b 100%);
}

/* Анимация галочки */
.modal-icon { width: 56px; height: 56px; margin: 0 auto; }
.checkmark { width: 56px; height: 56px; border-radius: 50%; display: block; stroke-width: 3; stroke: #10b981; stroke-miterlimit: 10; }
.checkmark-circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 3; stroke-miterlimit: 10; stroke: #10b981; fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.checkmark-check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }