/* =========================================================
   RC Clinician Filter — drawer overlay styles
   Brand: #273291 (blue), #252525 (dark text)
   ========================================================= */

/* ----------------------------------------------------------
   Filter bar (trigger + active chips + clear)
   ---------------------------------------------------------- */
.rc-filter-wrapper {
    position: relative;
}

.rc-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

/* "All Filters" button */
.rc-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #ffffff;
    border: 2px solid #273291;
    border-radius: 50px;
    color: #273291;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.rc-filter-trigger:hover,
.rc-filter-trigger[aria-expanded="true"] {
    background: #273291;
    color: #ffffff;
}

.rc-active-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background: #273291;
    color: #ffffff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.rc-filter-trigger:hover .rc-active-count,
.rc-filter-trigger[aria-expanded="true"] .rc-active-count {
    background: #ffffff;
    color: #273291;
}

/* Active filter chips */
.rc-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #eef0fb;
    border: 1.5px solid #273291;
    border-radius: 50px;
    color: #273291;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.15s;
}

.rc-chip:hover {
    background: #d9dcf5;
}

.rc-chip-remove {
    font-size: 17px;
    line-height: 1;
    opacity: 0.65;
    margin-left: 2px;
}

/* "Clear all" text link */
.rc-clear-all {
    background: none;
    border: none;
    padding: 0;
    color: #555;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rc-clear-all:hover {
    color: #273291;
}

/* Results info line */
.rc-results-info {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
}

/* ----------------------------------------------------------
   Hide filtered members
   ---------------------------------------------------------- */
.wps-widget--item.rc-hidden {
    display: none !important;
}

/* No-results message */
.rc-no-results {
    text-align: center;
    color: #555;
    padding: 48px 20px;
    font-size: 16px;
    width: 100%;
}

.rc-no-results button {
    background: none;
    border: none;
    padding: 0;
    color: #273291;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

/* ----------------------------------------------------------
   Overlay backdrop
   ---------------------------------------------------------- */
.rc-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rc-filter-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------------------------
   Filter drawer — slides in from the right
   ---------------------------------------------------------- */
.rc-filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.rc-filter-drawer.is-open {
    transform: translateX(0);
}

/* Drawer header */
.rc-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #ebebeb;
    flex-shrink: 0;
}

.rc-drawer-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
}

.rc-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.rc-drawer-close:hover {
    border-color: #273291;
    color: #273291;
}

/* Drawer scrollable body */
.rc-drawer-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------------------------
   Filter sections
   ---------------------------------------------------------- */
.rc-filter-section {
    border-bottom: 1px solid #ebebeb;
}

.rc-filter-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    text-align: left;
    font-family: inherit !important;
    transition: background 0.15s;
    line-height: 1.4;
}

.rc-filter-section-toggle:hover {
    background: #f8f8f8;
}

.rc-section-label {
    flex: 1;
}

.rc-section-chevron {
    flex-shrink: 0;
    color: #999;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.rc-filter-section.is-collapsed .rc-section-chevron {
    transform: rotate(-90deg);
}

/* Filter options list */
.rc-filter-options {
    padding: 0 24px 16px;
    display: flex;
    flex-direction: column;
}

/* Individual option row */
.rc-filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.12s;
    user-select: none;
}

.rc-filter-option:hover {
    background: #f5f7ff;
}

/* Hide native checkbox */
.rc-filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkbox box */
.rc-option-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.rc-filter-option input:checked ~ .rc-option-check {
    border-color: #273291;
    background: #273291;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3 3.7l-7.3 7.3-3.3-3.3-1.4 1.4 4.7 4.7 8.7-8.7z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.rc-option-label {
    font-size: 14px !important;
    color: #333 !important;
    flex: 1;
    line-height: 1.4;
    font-family: inherit !important;
    font-weight: 400 !important;
}

.rc-filter-option input:checked ~ .rc-option-check + .rc-option-label,
.rc-filter-option input:checked ~ .rc-option-label {
    font-weight: 600 !important;
    color: #273291 !important;
}

/* ----------------------------------------------------------
   Drawer footer
   ---------------------------------------------------------- */
.rc-drawer-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #ebebeb;
    flex-shrink: 0;
    background: #fff;
}

.rc-drawer-clear {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, color 0.2s;
    line-height: 1.4;
}

.rc-drawer-clear:hover {
    border-color: #273291;
    color: #273291;
}

.rc-drawer-apply {
    flex: 2;
    padding: 12px 16px;
    background: #273291;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    line-height: 1.4;
}

.rc-drawer-apply:hover {
    background: #1e2770;
}

/* Prevent page scroll while drawer is open */
body.rc-drawer-open {
    overflow: hidden;
}

/* ----------------------------------------------------------
   Mobile — drawer slides up from bottom
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    .rc-filter-drawer {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: 88vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .rc-filter-drawer.is-open {
        transform: translateY(0);
    }

    /* Drag handle visual hint */
    .rc-drawer-header::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: #ddd;
    }

    .rc-drawer-header {
        position: relative;
        padding-top: 28px;
    }
}
