/* =========================================
   TRAVEL HOUSE – REISIJATE VALIK
========================================= */

/* Rippmenüü */
.form-search .th-travellers-dropdown .field-dropdown-panel {
    width: 380px;
    min-width: min(380px, 90vw);
    max-width: calc(100vw - 24px);
    border: 1px solid #e5eaed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(19, 53, 65, .12);
    overflow: hidden;
}

/* Sisu */
.form-search .th-travellers {
    padding: 22px !important;
}

/* Täiskasvanud ja lapsed */
.form-search .th-travellers-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid #e9edf0;
}

.form-search .th-travellers-row strong {
    display: block;
    color: #153844;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.form-search .th-travellers-row small {
    display: block;
    margin-top: 4px;
    color: #8a98a7;
    font-size: 12px;
    font-weight: 400;
}

/* Arvu muutmise nupud */
.form-search .th-travellers-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.form-search .th-travellers-counter button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #d8e0e5;
    border-radius: 9px;
    background: #fff;
    color: #153844;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: all .2s ease;
}

.form-search .th-travellers-counter button:hover:not(:disabled) {
    background: #f3f8fa;
    border-color: #51bfdf;
    color: #153844;
}

.form-search .th-travellers-counter button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.form-search .th-travellers-counter output {
    min-width: 20px;
    text-align: center;
    color: #153844;
    font-size: 15px;
    font-weight: 650;
}

/* Laste vanused */
.form-search .th-travellers-age-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 0;
}

.form-search .th-travellers-age-row label {
    color: #153844;
    font-size: 13px;
    font-weight: 500;
}

.form-search .th-travellers-age-row select {
    width: 145px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #d8e0e5;
    border-radius: 9px;
    background-color: #fff;
    color: #153844;
    font-size: 13px;
    cursor: pointer;
}

.form-search .th-travellers-age-row select:focus {
    outline: none;
    border-color: #51bfdf;
    box-shadow: 0 0 0 3px rgba(81, 191, 223, .13);
}

/* Lisainfo */
.form-search .th-travellers-note {
    margin: 0;
    padding: 16px 0;
    color: #71828c;
    font-size: 12px;
    line-height: 1.5;
}

/* Salvesta nupp */
.form-search .th-travellers-save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #143642;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.form-search .th-travellers-save:hover {
    background: var(--th-color-muted);
    transform: translateY(-0px);
}

/* Mobiil */
@media (max-width: 767px) {
    .form-search .th-travellers-dropdown .field-dropdown-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .form-search .th-travellers {
        padding: 18px !important;
    }

    .form-search .th-travellers-row {
        gap: 10px;
        padding: 13px 0;
    }

    .form-search .th-travellers-row strong {
        font-size: 14px;
    }

    .form-search .th-travellers-counter {
        gap: 7px;
    }

    .form-search .th-travellers-counter button {
        width: 32px;
        height: 32px;
    }

    .form-search .th-travellers-age-row select {
        width: 135px;
    }
}



/* Travel House – lapse vanuse dropdown */
/* Travel House – reisijate arvu dropdown */
.form-search .field:has([data-th-travellers]) .field-dropdown-panel {
    min-width: 350px;
    width: max(350px, 100%);
    max-width: calc(100vw - 24px);
}
.form-search .th-age-dropdown {
    position: relative;
    width: 100%;
    max-width: 180px;
    min-width: 0;
}

.form-search .th-age-dropdown > select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-search .th-age-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #dce4e8;
    border-radius: 10px;
    color: #153844;
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.form-search .th-age-trigger:hover,
.form-search .th-age-dropdown.is-open .th-age-trigger {
    border-color: #e47736;
}

.form-search .th-age-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.form-search .th-age-dropdown.is-open .th-age-arrow {
    transform: rotate(225deg);
}

.form-search .th-age-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid #e0e6e9;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(21, 56, 68, .14);
}

.form-search .th-age-menu[hidden] {
    display: none !important;
}

.form-search .th-age-option {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #153844;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.form-search .th-age-option:hover {
    background: #f1f3f4;
}

.form-search .th-age-option.is-selected {
    background: #fcf0e9;
    color: #e47736;
    font-weight: 600;
}

.form-search .th-age-option.is-selected::after {
    content: "✓";
    float: right;
}

@media (max-width: 767px) {
    .form-search .th-age-dropdown {
        max-width: 100%;
    }
}
