/* ==========================================
   TUURS: TOUR SEARCH WIDGET (3-COL LAYOUT)
   ========================================== */

.tuurs-tour-search {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 0;
}

/* Форма */

.tuurs-tour-search-form {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

/* Шапка */

.tuurs-ts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ececec;
}

.tuurs-ts-toolbar-title {
    font-size: 24px;
    font-weight: 700;
    color: #263445;
}

.tuurs-ts-reset-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #57719B;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.tuurs-ts-reset-btn:hover {
    color: #415978;
}

/* ==========================================
   СЕТКА (3 колонки на десктопе)
   ========================================== */

.tuurs-ts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 36px;
}

/* ==========================================
   АККОРДЕОНЫ
   ========================================== */

.tuurs-ts-accordion {
    border: 1px solid #d8dde3;
    border-radius: 12px;
    background: #fafbfc;
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.18s ease;
}

.tuurs-ts-accordion:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.tuurs-ts-accordion-header {
    width: 100%;
    background: #f1f4f7;
    padding: 14px 18px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #2b3a4a;
    transition: background 0.2s ease, color 0.2s ease;
}

.tuurs-ts-accordion-header:hover {
    background: #e8edf2;
}

.tuurs-ts-accordion-icon {
    transition: transform 0.25s ease;
    font-size: 13px;
}

.tuurs-ts-accordion.tuurs-ts-open .tuurs-ts-accordion-header {
    background: #e2e8f3;
    color: #243349;
}

.tuurs-ts-accordion.tuurs-ts-open .tuurs-ts-accordion-icon {
    transform: rotate(180deg);
}

/* плавное открытие/закрытие */

.tuurs-ts-accordion-body {
    background: #ffffff;
    padding: 0 18px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition:
        max-height 0.28s ease,
        opacity 0.2s ease,
        transform 0.2s ease,
        padding-top 0.2s ease,
        padding-bottom 0.2s ease;
}

.tuurs-ts-accordion.tuurs-ts-open .tuurs-ts-accordion-body {
    padding-top: 16px;
    padding-bottom: 18px;
    max-height: 600px;
    /* достаточно для наших блоков */
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Текстовые элементы
   ========================================== */

.tuurs-ts-label {
    margin-bottom: 6px;
    font-size: 14px;
    color: #495667;
    font-weight: 500;
}

.tuurs-ts-help {
    font-size: 12px;
    color: #8a8f99;
    margin-top: 8px;
}

/* ==========================================
   ЧЕКБОКСЫ-«ЧИПЫ»
   ========================================== */

.tuurs-ts-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.tuurs-ts-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.tuurs-ts-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tuurs-ts-checkbox span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #c8ced4;
    background: #ffffff;
    color: #2b3a4a;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.18s ease,
        transform 0.15s ease;
}

.tuurs-ts-checkbox:hover span {
    border-color: #9aa7b5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

/* активный чип */

.tuurs-ts-checkbox input[type="checkbox"]:checked+span {
    background: #57719B;
    border-color: #57719B;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(87, 113, 155, 0.35);
}

/* фокус от клавиатуры */

.tuurs-ts-checkbox input[type="checkbox"]:focus-visible+span {
    outline: 2px solid #57719B;
    outline-offset: 2px;
}

/* ==========================================
   ДАТЫ / ОБЩИЕ ПОЛЯ
   ========================================== */

.tuurs-ts-dates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 20px;
}

.tuurs-ts-date-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccd2d8;
    background: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tuurs-ts-date-field input:focus {
    border-color: #57719B;
    box-shadow: 0 0 0 3px rgba(87, 113, 155, 0.18);
    outline: none;
}

/* ==========================================
   ЦЕНА: двойной слайдер (совпадает с HTML)
   ========================================== */

.tuurs-ts-accordion-price .tuurs-ts-accordion-body {
    padding-top: 12px;
}

.tuurs-ts-price-slider {
    position: relative;
    padding: 12px 2px 18px;
}

/* общий трек */

.tuurs-ts-price-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 18px;
    height: 4px;
    border-radius: 999px;
    background: #e1e5eb;
    overflow: hidden;
}

/* закрашенная часть между ползунками */

.tuurs-ts-price-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 100%;
    background: #57719B;
    transition: left 0.18s ease, right 0.18s ease;
}

/* два input[type=range] поверх трека */

.tuurs-ts-price-slider .tuurs-ts-price-range {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    /* двигаем только «пальцем» */
}

/* трек у каждого слайдера прозрачный,
   чтобы не рисовать второй фон */

.tuurs-ts-price-slider .tuurs-ts-price-range::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.tuurs-ts-price-slider .tuurs-ts-price-range::-moz-range-track {
    height: 4px;
    background: transparent;
}

/* ползунок */

.tuurs-ts-price-slider .tuurs-ts-price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #222;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    margin-top: -6px;
    /* выровнять по центру трека */
}

.tuurs-ts-price-slider .tuurs-ts-price-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #222;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    pointer-events: auto;
}

/* поля От / До используют общие .tuurs-ts-dates-grid/.tuurs-ts-date-field */

/* ==========================================
   КНОПКА ПОИСКА
   ========================================== */

.tuurs-ts-submit-wrapper {
    margin-top: 40px;
}

.tuurs-ts-submit-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    background: #57719B;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.tuurs-ts-submit-btn:hover {
    background: #445c7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   АДАПТИВНОСТЬ
   ========================================== */

@media (max-width: 1200px) {
    .tuurs-ts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tuurs-tour-search {
        width: 100%;
    }

    .tuurs-tour-search-form {
        padding: 22px;
    }

    .tuurs-ts-grid {
        grid-template-columns: 1fr;
    }

    .tuurs-ts-toolbar-title {
        font-size: 20px;
    }
}