
/* =========================================================
   BIASHARAHUB – PREMIUM SIDEBAR DESIGN
   Version 1.0 – Clean consolidated stylesheet

   Preserves:
   - Existing category emoji icons
   - Category cascading menus
   - Location cascading menus
   - Classified Listing functionality
========================================================= */


/* =========================================================
   1. GLOBAL SIDEBAR CARD DESIGN
========================================================= */

@media (min-width: 768px) {

    /* Sidebar column stays transparent */
    .sidebar-widget-area,
    .sidebar-widget-area .widget {
        background: transparent !important;
    }

    /* Individual filter cards */
    .sidebar-widget-area .rtcl-widget-filter-class {
        background: #ffffff !important;
        border: 1px solid #E6EBF0 !important;
        border-radius: 10px !important;
        box-shadow: 0 3px 14px rgba(15, 45, 82, 0.055) !important;
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        overflow: visible !important;
    }

    /* Prevent adjacent cards from adding extra spacing */
    .sidebar-widget-area .rtcl-widget-filter-class
    + .rtcl-widget-filter-class {
        margin-top: 0 !important;
    }

    /* Shared white card surfaces */
    .sidebar-widget-area .rtcl-widget-filter-class .panel-heading,
    .sidebar-widget-area .rtcl-widget-filter-class .panel-block {
        background: #ffffff !important;
    }

    /* Shared heading appearance */
    .sidebar-widget-area .rtcl-widget-filter-class .panel-heading {
        color: #0F2D52 !important;
        font-weight: 700 !important;
    }
}


/* =========================================================
   2. CATEGORY CARD
========================================================= */

@media (min-width: 768px) {

    /* Category heading */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-category-filter)
    .panel-heading {
        background: #ffffff !important;
        border: none !important;
        padding: 16px 16px 10px !important;
        color: #0F2D52 !important;
        font-weight: 700 !important;
    }

    /* Category content */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-category-filter)
    .panel-block {
        background: #ffffff !important;
        border: none !important;
        padding: 8px 16px 16px !important;
    }

    /* Category rows */
    .rtcl-category-filter .filter-list > li {
        position: relative !important;
        margin: 0 0 2px !important;
    }

    /* Category links */
    .rtcl-category-filter
    .filter-list > li > a.bh-emoji-v4-link {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 7px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 6px 23px 6px 5px !important;
        border-radius: 6px;
        line-height: 1.4 !important;
        white-space: normal !important;
        color: #40546A;
        transition: background 180ms ease, color 180ms ease;
    }

    /* Category emoji icons */
    .rtcl-category-filter .bh-emoji-v4-icon {
        flex: 0 0 26px !important;
        width: 26px !important;
        min-width: 26px !important;
        text-align: center !important;
        font-size: 20px !important;
        line-height: 1 !important;
    }

    /* Listing counts */
    .rtcl-category-filter
    .filter-list > li > a.bh-emoji-v4-link
    > span:not(.bh-emoji-v4-icon) {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        margin-left: 0 !important;
        color: #8290A0 !important;
        font-size: 13px !important;
    }

    /* Expand/collapse arrows */
    .rtcl-category-filter
    .filter-list > li > .arrow {
        position: absolute !important;
        right: 3px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 5;
    }

    /* Category hover */
    .rtcl-category-filter
    .filter-list > li > a:hover {
        background: #F0F8F4 !important;
        color: #0E8F55 !important;
    }
}


/* =========================================================
   3. LOCATION CARD
   Shared card styling only.
   Existing cascading navigation remains untouched.
========================================================= */


/* =========================================================
   4. TYPE CARD
   Shared card styling only.
   Existing radio controls remain untouched.
========================================================= */


/* =========================================================
   5. RATINGS CARD
   Shared card styling only.
   Existing rating controls remain untouched.
========================================================= */


/* =========================================================
   6. ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .rtcl-category-filter
    .filter-list > li > a {
        transition: none !important;
    }
}


/* =====================================================
   BIASHARAHUB – PREMIUM TYPE FILTER
===================================================== */

@media (min-width: 768px) {

    /* Type card spacing */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-type-filter) {
        margin-bottom: 14px !important;
    }

    /* Type heading */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-type-filter)
    .panel-heading {
        padding: 16px 16px 10px !important;
        color: #0F2D52 !important;
        font-weight: 700 !important;
    }

    /* Type content */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-type-filter)
    .panel-block {
        padding: 6px 16px 12px !important;
    }

    /* Type option spacing */
    .rtcl-widget-filter-class input[type="radio"] {
        accent-color: #0E8F55;
    }

    /* Type labels */
    .rtcl-widget-filter-class label {
        color: #40546A;
        line-height: 1.5;
    }

    /* Show More */
    .rtcl-widget-filter-class a,
    .rtcl-widget-filter-class .show-more {
        transition: color 180ms ease;
    }

    .rtcl-widget-filter-class a:hover {
        color: #0E8F55 !important;
    }
}



/* =====================================================
   BIASHARAHUB – PREMIUM LOCATION FILTER
   Based on actual Classified Listing HTML
   Preserve existing cascading functionality
===================================================== */

@media (min-width: 768px) {

    /* Location card heading */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-location-filter)
    .panel-heading {
        background: #ffffff !important;
        border: none !important;
        padding: 16px 16px 10px !important;
        color: #0F2D52 !important;
        font-weight: 700 !important;
    }

    /* Location card content */
    .sidebar-widget-area
    .rtcl-widget-filter-class:has(.rtcl-location-filter)
    .panel-block {
        background: #ffffff !important;
        border: none !important;
        padding: 8px 16px 16px !important;
    }

    /* Location rows */
    .rtcl-location-filter .filter-list > li {
        position: relative !important;
        margin-bottom: 3px !important;
    }

    /* Region and district links */
    .rtcl-location-filter .filter-list li > a {
        display: block !important;
        box-sizing: border-box !important;
        padding: 8px 25px 8px 6px !important;
        border-radius: 6px !important;
        color: #40546A !important;
        line-height: 1.45 !important;
        white-space: normal !important;
        transition: background 180ms ease, color 180ms ease;
    }

    /* Listing counts */
    .rtcl-location-filter .filter-list li > a > span {
        color: #8290A0 !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    /* Expand arrows */
    .rtcl-location-filter .filter-list li > .arrow {
        position: absolute !important;
        right: 4px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 5;
    }

    /* Hover state */
    .rtcl-location-filter .filter-list li > a:hover {
        background: #F0F8F4 !important;
        color: #0E8F55 !important;
    }

    /* Show More */
    .rtcl-location-filter .rtcl-more {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: #0E8F55 !important;
        cursor: pointer;
        padding: 7px 5px !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rtcl-location-filter .filter-list li > a {
        transition: none !important;
    }
}






/* =====================================================
   BIASHARAHUB – LOCATION SPACING REFINEMENT
===================================================== */

@media (min-width: 768px) {

    /* Compact location rows */
    .rtcl-location-filter .filter-list > li {
        margin-bottom: 2px !important;
    }

    .rtcl-location-filter .filter-list li > a {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    /* Nested districts */
    .rtcl-location-filter .filter-list li > ul.sub-list {
        padding-left: 12px !important;
        margin-top: 3px !important;
    }

    /* All Locations */
    .rtcl-location-filter .filter-list > li:first-child > a {
        font-weight: 500 !important;
        color: #0F2D52 !important;
    }

    /* Show More */
    .rtcl-location-filter .rtcl-more {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
}





/* =====================================================
   BIASHARAHUB – PREMIUM LOCATION FLYOUT SUBMENU
   Visual refinement only – preserve existing positioning
===================================================== */

@media (min-width: 768px) and (hover: hover) {

    /* Floating district submenu panel */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list {
        background: #ffffff !important;
        border: 1px solid #E6EBF0 !important;
        border-radius: 10px !important;
        padding: 8px !important;
        box-shadow: 0 10px 30px rgba(15, 45, 82, 0.12) !important;
    }

    /* Remove prominent separators */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li {
        border-bottom: none !important;
        border-top: none !important;
        margin: 2px 0 !important;
        border-radius: 6px !important;
        background: transparent !important;
    }

    /* District links */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li > a {
        display: block !important;
        padding: 10px 32px 10px 12px !important;
        border: none !important;
        border-radius: 6px !important;
        background: transparent !important;
        color: #40546A !important;
        line-height: 1.4 !important;
        transition: background 180ms ease, color 180ms ease;
    }

    /* District listing counts */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li > a > span {
        color: #8290A0 !important;
        font-size: 13px !important;
    }

    /* District hover */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li > a:hover {
        background: #F0F8F4 !important;
        color: #0E8F55 !important;
    }

    /* Nested expand arrows */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li > .arrow {
        z-index: 5;
    }

    /* Show More row */
    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li.is-opener {
        padding: 5px 8px !important;
        border: none !important;
    }

    .rtcl-location-filter
    .filter-list li.is-parent.has-sub > ul.sub-list > li.is-opener .rtcl-more {
        color: #0E8F55 !important;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .rtcl-location-filter ul.sub-list a {
        transition: none !important;
    }
}
