/* =====================================================
   BIASHARAHUB – CLASSIMA STYLE LOCATION HOVER MENU
   Region → District → Ward
   Desktop only
===================================================== */

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {

    /* Allow nested menus to extend beyond their parents */
    .rtcl-location-filter,
    .rtcl-location-filter .panel-block,
    .rtcl-location-filter .filter-list {
        overflow: visible !important;
    }

    /* Location list positioning */
    .rtcl-location-filter .filter-list li.is-parent.has-sub {
        position: relative !important;
    }

    /* Hide nested menus until their parent is hovered */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list {
        display: none !important;
        position: absolute !important;
        top: 0 !important;
        left: 100% !important;
        width: 280px !important;
        max-width: 320px;
        max-height: 420px !important;
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #ffffff !important;
        padding: 8px !important;
        margin: 0 !important;
        border: 1px solid #e8edf1 !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 25px rgba(15, 45, 82, 0.13) !important;
        z-index: 99999 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Open submenu on hover */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub:hover > ul.sub-list {
        display: block !important;
    }

    /* Nested menu items */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        border-bottom: 1px solid #f0f2f5 !important;
    }

    /* Location links */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > a {
        display: block;
        padding: 10px 12px;
        border-radius: 5px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    /* BiasharaHub green hover */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub:hover > a {
        background: #f0f8f4 !important;
        color: #0E8F55 !important;
    }

    /* Right-facing arrow */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > .arrow {
        cursor: pointer;
    }

    .rtcl-location-filter
    .filter-list li.is-parent.has-sub:hover > .arrow {
        color: #0E8F55 !important;
    }

    /* Submenu scroll bar */
    .rtcl-location-filter ul.sub-list::-webkit-scrollbar {
        width: 5px;
    }

    .rtcl-location-filter ul.sub-list::-webkit-scrollbar-thumb {
        background: #cbd5df;
        border-radius: 10px;
    }
}







/* =====================================================
   BIASHARAHUB LOCATION FLYOUT POSITIONING FIX
===================================================== */

@media (min-width: 768px) and (hover: hover) {

    .rtcl-location-filter .filter-list {
        overflow: visible !important;
    }

    .rtcl-location-filter .filter-list > li.is-parent.has-sub,
    .rtcl-location-filter .filter-list li.is-parent.has-sub {
        position: relative !important;
    }

    /* Force child locations into floating panels */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list {

        position: absolute !important;
        top: -5px !important;
        left: calc(100% + 5px) !important;

        width: 280px !important;
        min-width: 280px !important;
        max-height: 400px !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        background: #ffffff !important;
        border: 1px solid #e5eaf0 !important;
        border-radius: 8px !important;

        padding: 8px !important;
        margin: 0 !important;

        box-shadow: 0 8px 25px rgba(15,45,82,0.14) !important;

        z-index: 999999 !important;
    }

    /* Keep the submenu hidden until hover */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub:not(:hover) > ul.sub-list {
        display: none !important;
    }

    /* Reveal submenu on hover */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub:hover > ul.sub-list {
        display: block !important;
    }

    /* Nested district and ward flyouts */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li {
        position: relative !important;
    }

    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list
    li.is-parent.has-sub:hover > ul.sub-list {
        display: block !important;
    }
}