/**
 * Tour Search - Custom Field Styles
 * Minimal CSS for Tour-specific fields (Duration stepper, Tour Type dropdown)
 * The container, layout, labels, icons, and button are styled by parent theme.
 *
 * @since 4.0.0
 */

/* ============================================================
   TOUR SEARCH FORM OVERRIDES
   ============================================================ */

/* Remove form-group bottom margin inside tour search */
.search-form .form-group {
    margin-bottom: 0;
}

/* Remove has-icon dropdown padding (belt-and-suspenders) */
.search-form form .has-icon .dropdown {
    padding-left: 0;
}

/* Increase pill max-width for tour search */
.st-banner-search-form.style_2 #nav-st_tours .st-search-form-el {
    max-width: 930px;
}

/* Location and Guest input styling */
.st-banner-search-form.style_2 .st-search-form-el .st-search-el .search-form .field-detination .st-form-dropdown-icon .render input,
.st-banner-search-form.style_2 .st-search-form-el .st-search-el .search-form .field-guest .st-form-dropdown-icon .render input {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: var(--grey-color, #5E6D77);
    width: 210px;
    height: 32px;
    border: none;
}

/* Search form label styling */
.search-form form label {
    margin-bottom: 0;
    display: block;
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    color: var(--heading-color);
}

/* Location field left margin */
.search-form .field-detination {
    margin-left: 20px;
}

/* ============================================================
   DURATION STEPPER - Custom +/- buttons inside render area
   ============================================================ */
.field-duration .duration-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-duration .stepper-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #DEDEDE;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-color, #5E6D77);
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.field-duration .stepper-btn:hover {
    background: #f5f5f5;
    border-color: var(--heading-color, #1a1a1a);
    color: var(--heading-color, #1a1a1a);
}

.field-duration .stepper-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.field-duration .stepper-display {
    font-size: 14px;
    font-weight: 400;
    color: var(--grey-color, #5E6D77);
    min-width: 40px;
    text-align: center;
    white-space: nowrap;
}

/* ============================================================
   TOUR TYPE DROPDOWN - Items styling
   ============================================================ */
.field-tour-type .dropdown-menu {
    background: #FFFFFF;
    border: 1px solid #DEDEDE;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.08), 0px 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 15px 10px;
    min-width: 200px;
    margin-top: 16px !important;
}

.field-tour-type .dropdown-menu .item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    border-radius: 8px;
}

.field-tour-type .dropdown-menu .item:hover {
    background: #f5f7fa;
}

.field-tour-type .dropdown-menu .item.active {
    background: #f0f0f0;
    font-weight: 500;
}

/* ============================================================
   TOUR TYPE - Divider after field (pseudo-element)
   ============================================================ */
.field-tour-type:after {
    content: "";
    height: 20px;
    width: 1px;
    display: block;
    background: #DEDEDE;
    border: none;
    position: absolute;
    right: 0;
}

/* ============================================================
   DURATION - Divider after field (pseudo-element)
   ============================================================ */
.field-duration:after {
    content: "";
    height: 20px;
    width: 1px;
    display: block;
    background: #DEDEDE;
    border: none;
    position: absolute;
    right: 0;
}

/* ============================================================
   FIELD POSITIONING - Ensure relative for pseudo-element dividers
   ============================================================ */
.field-tour-type,
.field-duration {
    position: relative;
    padding: 0 20px;
    min-height: 82px;
}

/* Tour Type render text styling */
.field-tour-type .st-form-dropdown-icon .render {
    cursor: pointer;
}

.field-tour-type .tour-type-display {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: var(--grey-color, #5E6D77);
}

/* ============================================================
   MOBILE RESPONSIVE - Tour search fields stacked (≤991px)
   ============================================================ */
@media screen and (max-width: 991px) {

    /* Remove location left margin when stacked */
    .search-form .field-detination {
        margin-left: 0;
    }

    /* Consistent padding and separators for stacked fields */
    .destination-search.st-search-destination-tour,
    .field-tour-type.form-group,
    .field-duration.form-group {
        padding: 15px 10px 15px 20px;
        border-bottom: 1px solid #DEDEDE;
    }

    /* Guest field — last before button, no border-bottom */
    .field-guest.form-group {
        padding: 15px 10px 15px 20px;
    }

    /* Hide vertical dividers on mobile (replaced by border-bottom) */
    .field-tour-type:after,
    .field-duration:after {
        display: none;
    }

    /* Reset min-height for stacked layout */
    .field-tour-type,
    .field-duration {
        min-height: auto;
    }
}

/* ============================================================
   LOCATION AUTOCOMPLETE DROPDOWN
   ============================================================ */

/* Dropdown container */
.field-detination .render {
    position: relative;
}

.tour-location-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 280px;
    background: #FFFFFF;
    border: 1px solid #DEDEDE;
    border-radius: 12px;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.08), 0px 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1050;
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}

/* Individual result items */
.tour-location-dropdown-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.tour-location-dropdown-item:hover,
.tour-location-dropdown-item.active {
    background: #f5f7fa;
}

/* Location name (bold) */
.tour-location-dropdown-item .tour-location-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--heading-color, #1a1a1a);
    line-height: 20px;
}

/* Subtitle: hierarchy path or "From tour titles" */
.tour-location-dropdown-item .tour-location-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: var(--grey-color, #5E6D77);
    line-height: 16px;
    margin-top: 2px;
}

/* No results message */
.tour-location-dropdown-empty {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--grey-color, #5E6D77);
}

/* ============================================================
   MOBILE RESPONSIVE - Location Dropdown (≤991px)
   ============================================================ */
@media screen and (max-width: 991px) {
    .tour-location-dropdown {
        min-width: 100%;
    }
}
