/* ================================================================
   ClinicianCore Resource Filter v1.3.2
   Brand: Teal #0D98BA | Navy #1A365D | Amber #F6AD55
   Font:  Albert Sans

   SCOPE: This file styles ONLY the filter bar, meta row, loader,
   empty state, and pagination. Zero card styles — Elementor's own
   stylesheet handles every card property exactly as Daksh designed.
================================================================ */

/* ── FILTER BAR ─────────────────────────────────────────────── */

.cc-rf-wrap {
    position: relative;
    font-family: 'Albert Sans', sans-serif;
    margin: 0 0 2rem;
}

.cc-rf-bar {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.cc-rf-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .75rem;
}
.cc-rf-row:last-child { margin-bottom: 0; }

.cc-rf-axis {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #718096;
    width: 54px;
    flex-shrink: 0;
    padding-top: 7px;
    line-height: 1;
}

.cc-rf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-rf-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1.5px solid #cbd5e0 !important;
    background: #ffffff !important;
    color: #4a5568 !important;
    font-family: 'Albert Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.4;
    text-decoration: none !important;
}
.cc-rf-wrap .cc-rf-pill:hover {
    border-color: #0D98BA !important;
    color: #0D98BA !important;
    background: #ffffff !important;
    outline: none;
    box-shadow: none;
}
.cc-rf-wrap .cc-rf-pill.active {
    background: #0D98BA !important;
    border-color: #0D98BA !important;
    color: #fff !important;
}
.cc-rf-wrap .cc-rf-pill.active:hover {
    background: #0a7a96 !important;
    border-color: #0a7a96 !important;
    color: #fff !important;
}
.cc-rf-wrap .cc-rf-pill--doc.active {
    background: #F6AD55 !important;
    border-color: #F6AD55 !important;
    color: #fff !important;
}
.cc-rf-wrap .cc-rf-pill--doc.active:hover {
    background: #e09540 !important;
    border-color: #e09540 !important;
    color: #fff !important;
}

.cc-rf-divider { height: 1px; background: #e2e8f0; margin: .75rem 0; }

/* ── RESULTS META ───────────────────────────────────────────── */

.cc-rf-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    min-height: 24px;
}

.cc-rf-count { font-size: 13px; color: #718096; }
.cc-rf-count strong { color: #1A365D; font-weight: 600; }

.cc-rf-clear {
    font-size: 12px;
    color: #0D98BA;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Albert Sans', sans-serif;
    padding: 0;
}
.cc-rf-clear:hover { color: #0a7a96; }

/* ── CARD SHADOW + BORDER — matches Daksh's original design ── */
/* Scoped to .cc-rf-grid so it never affects other Elementor widgets */

.cc-rf-grid .elementor-post__card {
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    height: 100%;
}

.cc-rf-grid .elementor-post__card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.11);
    transform: translateY(-2px);
}

.cc-rf-grid .elementor-post__thumbnail__link {
    display: block;
    overflow: hidden;
}

.cc-rf-grid .elementor-post__thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.cc-rf-grid .elementor-post__thumbnail--placeholder {
    height: 220px;
    background: #f0f5f8;
}

.cc-rf-grid .elementor-post__text {
    padding: 18px 22px 22px !important;
}

.cc-rf-grid .elementor-post__title {
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
}

.cc-rf-grid .elementor-post__excerpt {
    margin-bottom: 16px !important;
}

.cc-rf-grid .elementor-post__read-more-wrapper {
    margin-top: 0 !important;
    padding-top: 4px !important;
}

/* ── LOADER ─────────────────────────────────────────────────── */

.cc-rf-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.55);
    pointer-events: none;
    z-index: 10;
    border-radius: 8px;
}

.cc-rf-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-top-color: #0D98BA;
    border-radius: 50%;
    animation: cc-spin .65s linear infinite;
}

@keyframes cc-spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ────────────────────────────────────────────── */

.cc-rf-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
}
.cc-rf-empty__title {
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 6px;
}
.cc-rf-empty__sub {
    font-size: 14px;
    color: #a0aec0;
    margin: 0;
}

/* ── PAGINATION ─────────────────────────────────────────────── */

.cc-rf-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.cc-rf-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    font-family: 'Albert Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}
.cc-rf-page-btn:hover    { border-color: #0D98BA; color: #0D98BA; }
.cc-rf-page-btn.active   { background: #0D98BA; border-color: #0D98BA; color: #fff; }
.cc-rf-page-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }

/* ── MOBILE ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .cc-rf-bar { padding: .875rem 1rem; }

    .cc-rf-row {
        flex-direction: column;
        gap: 6px;
    }

    .cc-rf-axis { width: auto; padding-top: 0; }
    .cc-rf-pill { font-size: 12px; padding: 5px 11px; }

    /* Override inline grid to 2 columns on tablet */
    .cc-rf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 540px) {
    .cc-rf-grid {
        grid-template-columns: 1fr !important;
    }
}
