/* ============================================================
   ACUE RESEARCH REPORTS FILTER
   research-filter.css
   ============================================================ */

:root {
    --acue-blue:        #0057A8;
    --acue-blue-light:  rgba(0, 87, 168, 0.08);
    --acue-text:        #1a1a2e;
    --acue-text-muted:  #555;
    --acue-border:      #ddd;
    --acue-radius-pill: 50px;
    --acue-radius-panel:14px;
}
/*page - icons for download */
 img.wp-image-6365 { margin-right: 8px;}
/* ── Toolbar ─────────────────────────────────────────────── */

.rr-filter-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.rr-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0 16px;
}

/* ── Pill buttons ────────────────────────────────────────── */

.rr-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--royal-blue);
    background: transparent;
    color: var(--royal-blue);
    padding: 8px 18px;
    border-radius: var(--acue-radius-pill);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    white-space: nowrap;
}
.rr-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.rr-pill:hover {
    background: transparent !important;
    border-color: var(--royal-blue) !important;
    color: var(--acue-blue) !important;
    border-width: 1px;
}
.rr-pill.is-active {
    /*background: var(--royal-blue);
    border-color: var(--royal-blue);
    color: #fff;*/
    background: #fff !important;
    border-color: var(--royal-blue) !important;
    color: var(--acue-blue) !important;
    border-width: 1px;
}
.rr-pill.is-active:hover {
   /* background: var(--royal-blue) !important;
    color: #fff !important;*/
}
button.rr-cat-pill:not(.is-active):hover,
button.rr-cat-pill:not(.is-active):focus,
button.rr-pill:not(.is-active):hover,
button.rr-pill:not(.is-active):focus {
    background-color: transparent !important;
    color: var(--royal-blue) !important;
}
.rr-sort-wrap,
.rr-filter-wrap {
    position: relative;
}

/* ── Shared white panel with blue outline ────────────────── */

.rr-dark-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 500;
    background: #fff;
    border: 1.5px solid var(--royal-blue);
    border-radius: var(--acue-radius-panel);
    min-width: 220px;
    overflow: visible;
}
.rr-dark-panel.is-open {
    display: block;
}
.rr-dark-panel::before,
.rr-dark-panel::after {
    content: '';
    position: absolute;
    left: 24px;
}
.rr-dark-panel::before {
    top: -8px;
    width: 13px;
    height: 13px;
    background: #fff;
    border-left: 1.5px solid var(--royal-blue);
    border-top: 1.5px solid var(--royal-blue);
    transform: rotate(45deg);
    border-radius: 2px 0 0 0;
    z-index: 1;
}
.rr-dark-panel::after {
    top: 0px;
    width: 19px;
    height: 2px;
    background: #fff;
    z-index: 2;
}

/* ── Sort panel ──────────────────────────────────────────── */

.rr-sort-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    cursor: pointer;
    color: var(--acue-text);
    font-size: 14px;
    font-family: inherit;
    transition: background 0.12s;
    border-bottom: 1px solid var(--acue-border);
}
.rr-sort-option:last-child { border-bottom: none; }
.rr-sort-option:hover { background: var(--acue-blue-light); }

.rr-sort-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--acue-border);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s;
}
.rr-sort-radio:checked { border-color: var(--royal-blue); }
.rr-sort-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--acue-blue);
    border-radius: 50%;
}

/* ── Apply / Cancel (hidden — auto_refresh handles it) ───── */

.rr-filter-actions { display: none; }

/* ── Active filter chips bar ─────────────────────────────── */

.rr-active-bar {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    margin-bottom: 4px;
    border-bottom: none;
}
.rr-active-bar.is-visible {
    display: flex;
    margin-bottom: 8px;
}

.rr-clear-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    border: 1px solid var(--royal-blue);
    border-radius: 20px;
    padding: 4px 13px;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
    color: var(--acue-text);
    transition: border-color 0.12s, color 0.12s;
}
.rr-clear-chip:hover {
    border-color: var(--acue-blue);
    color: #fff;
}

.rr-active-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.rr-active-tag {
    font-size: 15px;
    background: var(--acue-blue-light);
    color: #000;
    border-radius: 20px;
    padding: 4px 11px;
}

/* ── Loading indicator ───────────────────────────────────── */

#rrFilterPanel.rr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--acue-border);
    border-top-color: var(--royal-blue);
    border-radius: 50%;
    animation: rr-spin 0.7s linear infinite;
    z-index: 10;
}
@keyframes rr-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── FacetWP loading state ───────────────────────────────── */

body.facetwp-is-loading .facetwp-template {
    opacity: 0.45;
    transition: opacity 0.2s;
    pointer-events: none;
}
.facetwp-counter { display: none !important; }
.facetwp-depth { margin-left: 0px !important; }
.facetwp-depth.visible { background: #fff !important; }
.facetwp-facet { margin-bottom: 0px !important; }
span.facetwp-display-value { font-size: 15px !important; color: #000 !important; }

/* ── Mobile accordion headers ────────────────────────────── */

.rr-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    color: #000;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
    user-select: none;
    text-transform: uppercase;
}
.rr-acc-header:hover {
    background: none;
    color: #0057A8;
}

/* ── FacetWP checkbox overrides (mobile mount) ───────────── */

#rrFacetMount .facetwp-expand { display: none !important; }
#rrFacetMount .facetwp-counter { display: none !important; }
#rrFacetMount { transition: opacity 0.15s; }
#rrFilterPanel { padding-bottom: 0; }
#rrFilterPanel .facetwp-facet-filter_by { padding-bottom: 0; }

#rrFacetMount .facetwp-checkbox {
    background-image: none !important;
    background-color: transparent !important;
    padding-left: 0 !important;
}
#rrFacetMount .facetwp-depth .facetwp-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 28px !important;
    position: relative;
}
#rrFacetMount .facetwp-depth .facetwp-checkbox::before {
    content: '';
    display: inline-flex;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border: 1.5px solid #000;
    border-radius: 3px;
    background: #fff;
    transition: border-color 0.12s, background 0.12s;
}
#rrFacetMount .facetwp-depth .facetwp-checkbox.checked::before {
    border-color: var(--royal-blue);
    background-color: var(--royal-blue);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}
#rrFacetMount .facetwp-depth .facetwp-checkbox.facetwp-ghost,
#rrFacetMount .facetwp-depth .facetwp-checkbox.disabled {
    opacity: 0.4;
    cursor: default;
}
#rrFacetMount .facetwp-depth .facetwp-display-value { line-height: 1.3; }

/* ── FacetWP checkbox overrides (desktop mount) ─────────── */

#rrFacetMountDesktop {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    left: -9999px !important;
}
#rrFacetMountDesktop .facetwp-expand { display: none !important; }
#rrFacetMountDesktop .facetwp-counter { display: none !important; }

#rrFacetMountDesktop .facetwp-checkbox {
    background-image: none !important;
    background-color: transparent !important;
    padding-left: 0 !important;
}
#rrFacetMountDesktop .facetwp-depth .facetwp-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 28px !important;
    position: relative;
}
#rrFacetMountDesktop .facetwp-depth .facetwp-checkbox::before {
    content: '';
    display: inline-flex;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    border: 1.5px solid #000;
    border-radius: 3px;
    background: #fff;
    transition: border-color 0.12s, background 0.12s;
}
#rrFacetMountDesktop .facetwp-depth .facetwp-checkbox.checked::before {
    border-color: var(--royal-blue);
    background-color: var(--royal-blue);
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 8px;
}
#rrFacetMountDesktop .facetwp-depth .facetwp-checkbox.facetwp-ghost,
#rrFacetMountDesktop .facetwp-depth .facetwp-checkbox.disabled {
    opacity: 0.4;
    cursor: default;
}

/* ── Load More button ────────────────────────────────────── */

.rr-pager {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.facetwp-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 36px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--royal-blue);
    background: transparent;
    border: 1px solid var(--royal-blue);
    border-radius: var(--acue-radius-pill);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.facetwp-load-more:hover {
    background: var(--acue-blue);
    color: #fff;
}
#rrFilterPanel.is-open {
    display: block !important;
    min-height: 100px;
}

/* ── Desktop/Mobile visibility ───────────────────────────── */

.rr-mobile-only  { display: none !important; }
.rr-desktop-only { display: flex !important; gap: 8px; align-items: center; flex: 1; }

@media (max-width: 768px) {
    .rr-mobile-only  { display: block !important; }
    .rr-desktop-only { display: none !important; }
    #rrFilterPanel.is-open {
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        min-height: 100px;
	}
}

/* ── Desktop toolbar layout ──────────────────────────────── */

@media (min-width: 769px) {
    .rr-toolbar {
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    .rr-cat-pills {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        flex-wrap: nowrap;
    }
}

/* ── Category pill chevron ───────────────────────────────── */

.rr-cat-chev {
    margin-left: 2px;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.rr-cat-pill.is-active .rr-cat-chev {
    transform: rotate(180deg);
}
/* hide default filter svg on desktop*/
.rr-cat-pill svg:first-child {
        display: none !important;
    }
/* ── Category dropdown options ───────────────────────────── */

.rr-cat-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #000;
    border-bottom: 1px solid var(--acue-border);
    transition: background 0.12s;
}
.rr-cat-option:last-child { border-bottom: none; }
.rr-cat-option:hover { background: var(--acue-blue-light); }

/* ── Mobile responsive ───────────────────────────────────── */

@media (max-width: 768px) {
    #rrSortPanel.rr-dark-panel {
        min-width: 160px !important;
        width: auto !important;
        left: auto !important;
        right: 0 !important;
    }
    div#rrActiveBar { order: 3; }
    .rr-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        position: relative;
    }
    .rr-sort-wrap { flex: 1; }
    .rr-filter-wrap { flex: 1; }
    .rr-pill {
        width: 100%;
        justify-content: center;
    }
    .rr-active-bar { width: 100%; }
    #rrFilterPanel {
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
    }
    #rrSortPanel {
        width: 100%;
        left: 0;
        right: 0;
    }
    #rrFacetMount { margin-bottom: 0 !important; }
}
