/*
 * LTRiF JomHoliday tablet/mobile search drawers
 * LTRiF keeps its JomHoliday sidebar only on wide desktop screens.
 */

.ltrif-results-tools,
.ltrif-filter-panel,
.ltrif-filter-backdrop {
    display: none;
}

/*
 * Applied JomHoliday filters use one consistent LTRiF treatment.
 * Clear All remains a destructive red action.
 */
#jomholiday-items
    .ltrif-applied-filters
    .ltrif-applied-filter-chip {
    border-color: #69ae37 !important;
    background-color: #69ae37 !important;
    color: #fff !important;
}

#jomholiday-items
    .ltrif-applied-filters
    .ltrif-applied-filter-chip:hover,
#jomholiday-items
    .ltrif-applied-filters
    .ltrif-applied-filter-chip:focus {
    border-color: #4f9828 !important;
    background-color: #4f9828 !important;
    color: #fff !important;
}

#jomholiday-items
    .ltrif-applied-filters
    .ltrif-clear-all-filters {
    border-color: #df5b62 !important;
    background-color: #df5b62 !important;
    color: #fff !important;
}

#jomholiday-items
    .ltrif-applied-filters
    .ltrif-clear-all-filters:hover,
#jomholiday-items
    .ltrif-applied-filters
    .ltrif-clear-all-filters:focus {
    border-color: #c9474f !important;
    background-color: #c9474f !important;
    color: #fff !important;
}

/*
 * Search Accommodation field arrangement on desktop and in the drawer.
 */
.ltrif-filter-search .ltrif-hidden-search-field {
    display: none !important;
}

.ltrif-filter-search .ltrif-keyword-search {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #aeb5ba;
}

.ltrif-filter-search .ltrif-keyword-search .my-3 {
    margin-top: 0 !important;
}

.ltrif-filter-search .ltrif-keyword-help {
    display: none !important;
}

/*
 * Cover the browser/theme indicator and draw one conventional dropdown
 * chevron. The dedicated wrapper makes this reliable in Chrome, Safari
 * and Firefox, in both the desktop sidebar and responsive drawer.
 */
.ltrif-filter-search .ltrif-select-control {
    position: relative;
    width: 100%;
}

.ltrif-filter-search .ltrif-select-control::before {
    position: absolute;
    z-index: 1;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 34px;
    background: #fff;
    content: "";
    pointer-events: none;
}

.ltrif-filter-search .ltrif-select-control::after {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 14px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #5f6870;
    border-bottom: 2px solid #5f6870;
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

.ltrif-filter-search .ltrif-select-control select {
    width: 100% !important;
    padding-right: 36px !important;
    background-color: #fff !important;
    background-image: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.ltrif-filter-search .ltrif-occupancy-grid {
    display: grid;
    margin-bottom: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ltrif-filter-search .ltrif-occupancy-grid .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.ltrif-filter-search .ltrif-occupancy-grid select,
.ltrif-filter-search .ltrif-occupancy-grid .select2-container {
    width: 100% !important;
}

.ltrif-filter-search .ltrif-checkbox-grid {
    display: grid;
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 5px;
}

.ltrif-filter-search .ltrif-checkbox-grid > label,
.ltrif-filter-search .ltrif-checkbox-grid > legend {
    grid-column: 1 / -1;
    margin-bottom: 3px;
}

.ltrif-filter-search .ltrif-checkbox-grid .form-check {
    min-width: 0;
    margin: 0;
    padding-bottom: 0 !important;
}

.ltrif-filter-search .ltrif-checkbox-grid .form-check-label {
    line-height: 1.25;
}

@media (max-width: 1599.98px) {
    /*
     * Give listings and property details the full content width and remove
     * the desktop sidebar. The modules needed by the drawer are moved to
     * document.body by JavaScript before they are displayed.
     */
    body.ltrif-drawer-ready.com-jomholiday.view-items
        #ac-1528971561366,
    body.ltrif-drawer-ready.com-jomholiday.view-item
        #ac-1528971561366 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body.ltrif-drawer-ready.com-jomholiday.view-items
        #ac-5hhc89qmq,
    body.ltrif-drawer-ready.com-jomholiday.view-item
        #ac-5hhc89qmq {
        display: none !important;
    }

    body.ltrif-drawer-ready .ltrif-results-tools {
        display: flex;
        margin: 10px 0 14px;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    #jomholiday-item > .ltrif-results-tools {
        margin-top: 0;
        margin-bottom: 16px;
    }

    .ltrif-open-panel {
        display: inline-flex;
        min-height: 44px;
        padding: 10px 18px;
        border: 1px solid #4f9828;
        border-radius: 5px;
        background: #69ae37;
        color: #fff;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 0 1 auto;
        font: inherit;
        font-weight: 600;
        line-height: 1.2;
        cursor: pointer;
    }

    .ltrif-open-panel:hover,
    .ltrif-open-panel:focus {
        border-color: #397d1d;
        background: #4f9828;
        color: #fff;
    }

    .ltrif-open-locations {
        border-color: #69ae37;
        background: #fff;
        color: #4f9828;
    }

    .ltrif-open-locations:hover,
    .ltrif-open-locations:focus {
        border-color: #4f9828;
        background: #f0f8eb;
        color: #397d1d;
    }

    .ltrif-filter-backdrop {
        position: fixed;
        z-index: 10990;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.52);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .ltrif-filter-backdrop.is-open {
        opacity: 1;
    }

    .ltrif-filter-panel {
        position: fixed;
        z-index: 11000;
        top: 0;
        right: 0;
        display: flex;
        width: min(480px, 100%);
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        background: #fff;
        box-shadow: -8px 0 28px rgba(0, 0, 0, 0.22);
        flex-direction: column;
        transform: translateX(102%);
        transition: transform 0.25s ease;
    }

    .ltrif-filter-panel.is-open {
        transform: translateX(0);
    }

    .ltrif-filter-panel__header {
        display: flex;
        min-height: 68px;
        padding: 12px 18px;
        border-bottom: 1px solid #dfe4e8;
        background: #fff;
        align-items: center;
        justify-content: space-between;
        flex: 0 0 auto;
    }

    .ltrif-filter-panel__header h2 {
        margin: 0;
        color: #26323d;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.2;
    }

    .ltrif-close-panel {
        display: inline-flex;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #26323d;
        align-items: center;
        justify-content: center;
        font-size: 36px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
    }

    .ltrif-close-panel:hover,
    .ltrif-close-panel:focus {
        color: #4f9828;
    }

    .ltrif-filter-panel__body {
        height: calc(100vh - 68px);
        height: calc(100dvh - 68px);
        min-height: 0;
        max-height: calc(100vh - 68px);
        max-height: calc(100dvh - 68px);
        padding: 16px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 0;
    }

    body.ltrif-filter-panel-open {
        overflow: hidden !important;
    }

    body.ltrif-drawer-ready:not(.ltrif-filter-panel-open)
        .ltrif-filter-search,
    body.ltrif-drawer-ready:not(.ltrif-filter-panel-open)
        .ltrif-filter-locations {
        display: none !important;
    }

    #ltrif-filter-panel .ltrif-filter-search,
    #ltrif-filter-panel .ltrif-filter-locations {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    #ltrif-filter-panel .ltrif-filter-search > *,
    #ltrif-filter-panel .ltrif-filter-locations > * {
        width: 100% !important;
        max-width: none !important;
    }

    #ltrif-filter-panel .module-title {
        display: none;
    }

    .ltrif-panel-view {
        min-height: 0;
        overflow: visible;
    }

    .ltrif-panel-view[hidden] {
        display: none !important;
    }

    .ltrif-filter-panel input,
    .ltrif-filter-panel select,
    .ltrif-filter-panel textarea,
    .ltrif-filter-panel .select2-container {
        max-width: 100% !important;
    }

    /*
     * These remain published for desktop but are absent from tablet/mobile.
     */
    body.ltrif-drawer-ready .ltrif-popular-rentals,
    body.ltrif-drawer-ready .ltrif-search-information {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .ltrif-filter-panel {
        width: 100%;
    }

    .ltrif-filter-panel__header {
        min-height: 62px;
        padding: 9px 12px 9px 16px;
    }

    .ltrif-filter-panel__header h2 {
        font-size: 20px;
    }

    .ltrif-filter-panel__body {
        height: calc(100vh - 62px);
        height: calc(100dvh - 62px);
        max-height: calc(100vh - 62px);
        max-height: calc(100dvh - 62px);
        padding: 12px;
    }

    body.ltrif-drawer-ready .ltrif-results-tools {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ltrif-open-panel {
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }

    .ltrif-filter-search .ltrif-occupancy-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .ltrif-filter-search .ltrif-checkbox-grid {
        column-gap: 8px;
    }

    /*
     * Keep the overlays on JomHoliday listing-card images in separate
     * bands on phones. JomHoliday's inline 360-tour positioning otherwise
     * collides with the review text and score on narrow cards.
     */
    #jomholiday-items .view.overlay.zoom {
        position: relative;
    }

    #jomholiday-items .view.overlay.zoom .tour {
        position: absolute;
        top: 48px;
        left: 8px;
        max-width: calc(100% - 16px);
        padding: 6px 9px !important;
        font-size: 0.78rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    #jomholiday-items
        .card-img-overlay.w-100.d-flex.align-items-end {
        padding: 6px !important;
    }

    #jomholiday-items
        .card-img-overlay.w-100.d-flex.align-items-end
        .mdi-heart-plus-outline {
        margin: 3px !important;
    }

    #jomholiday-items
        .card-img-overlay.w-100.d-flex.align-items-end
        .hotel-rating {
        font-size: 0.86rem;
        white-space: nowrap;
    }

    #jomholiday-items
        .card-img-overlay.w-100.d-flex.align-items-end
        .ratings {
        margin: 0 3px 1px auto !important;
        align-items: center !important;
    }

    #jomholiday-items .ratings .score-left {
        margin-right: 6px !important;
        font-size: 0.74rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    #jomholiday-items .ratings .score {
        padding: 8px !important;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ltrif-filter-panel,
    .ltrif-filter-backdrop {
        transition: none;
    }
}

/*
 * Keep JomHoliday Select2 dropdowns above the drawer.
 */
.select2-container--open,
.select2-container--open .select2-dropdown,
body > .select2-container--open {
    z-index: 11050 !important;
}
/* Hide homepage hero strapline on phones */
@media (max-width: 575.98px) {
    .carousel-caption h5 {
        display: none !important;
    }
}