/* ================================================================
   ClinicianCore Search Results v1.0.0
   Brand: Teal #0D98BA | Navy #1A365D | Amber #F6AD55
   Font:  Albert Sans
================================================================ */

.cc-sr-wrap {
    /* Reads Elementor's Global Fonts (Site Settings → Global Fonts) first,
       Albert Sans as fallback if those vars aren't set — same pattern as
       the "Write for ClinicianCore" band. Heading elements below override
       with the primary/heading var instead of this text var. */
    --cc-sr-font-text: var(--e-global-typography-text-font-family, 'Albert Sans'), sans-serif;
    --cc-sr-font-head: var(--e-global-typography-primary-font-family, 'Albert Sans'), sans-serif;

    /* This template calls get_header()/get_footer() directly, bypassing the
       theme's normal content container that centers every other page —
       so this plugin has to constrain its own width instead. */
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    font-family: var(--cc-sr-font-text);
    color: #2D3748;
}
.cc-sr-wrap * { box-sizing: border-box; }

/* ── HERO ───────────────────────────────────────────────────── */

.cc-sr-hero {
    padding: 40px 4px 32px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 28px;
}

.cc-sr-hero__title {
    font-family: var(--cc-sr-font-head);
    font-size: 34px;
    font-weight: 800;
    color: #1A365D;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.cc-sr-hero__subtitle {
    font-size: 15px;
    color: #718096;
    margin: 0 0 24px;
    max-width: 60ch;
}

.cc-sr-wrap .cc-sr-searchform {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 640px;
    background: #fff !important;
    border: 1.5px solid #cbd5e0 !important;
    box-shadow: none !important;
    border-radius: 8px;
    padding: 4px 4px 4px 16px;
    transition: border-color .15s, box-shadow .15s;
}
.cc-sr-wrap .cc-sr-searchform:focus-within {
    border-color: #0D98BA !important;
    box-shadow: 0 0 0 3px rgba(13,152,186,.12) !important;
}

.cc-sr-searchform__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #a0aec0;
    margin-right: 10px;
}

.cc-sr-wrap .cc-sr-searchform__input {
    flex: 1 1 auto;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-family: var(--cc-sr-font-text);
    font-size: 14.5px;
    color: #2D3748 !important;
    padding: 10px 0;
    min-width: 0;
}
.cc-sr-wrap .cc-sr-searchform__input::placeholder { color: #a0aec0; }

.cc-sr-wrap .cc-sr-searchform__clear {
    flex-shrink: 0;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    color: #a0aec0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.cc-sr-wrap .cc-sr-searchform__clear:hover { color: #718096; }

.cc-sr-wrap .cc-sr-searchform__submit {
    flex-shrink: 0;
    background: #0D98BA !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px;
    font-family: var(--cc-sr-font-text);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    cursor: pointer;
    transition: background .15s;
}
.cc-sr-wrap .cc-sr-searchform__submit:hover { background: #0a7a96 !important; }

/* ── BODY LAYOUT ────────────────────────────────────────────── */

.cc-sr-body {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

/* ── SIDEBAR ────────────────────────────────────────────────── */

.cc-sr-sidebar {
    flex: 0 0 260px;
    width: 260px;
}

.cc-sr-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 18px;
}

.cc-sr-wrap .cc-sr-sidebar__title {
    font-family: var(--cc-sr-font-head) !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #1A365D !important;
    white-space: nowrap;
    margin: 0;
}

.cc-sr-wrap .cc-sr-clear-all {
    font-size: 12.5px;
    color: #0D98BA !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    display: none;
}
.cc-sr-wrap .cc-sr-clear-all:hover { color: #0a7a96 !important; }

.cc-sr-facet { margin-bottom: 26px; }

.cc-sr-wrap .cc-sr-facet__title {
    font-family: var(--cc-sr-font-text) !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #718096 !important;
    margin: 0 0 10px;
}

.cc-sr-facet__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cc-sr-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    cursor: pointer;
    font-size: 13.5px;
    color: #3d4a5c;
}
.cc-sr-check input {
    flex-shrink: 0;
    accent-color: #0D98BA !important;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.cc-sr-check__label { flex: 1 1 auto; }
.cc-sr-check__count {
    flex-shrink: 0;
    font-size: 11.5px;
    color: #a0aec0;
}

.cc-sr-wrap .cc-sr-show-more {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #0D98BA !important;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 0;
}
.cc-sr-wrap .cc-sr-show-more:hover { color: #0a7a96 !important; }

/* ── MAIN ───────────────────────────────────────────────────── */

.cc-sr-main { flex: 1 1 auto; min-width: 0; }

.cc-sr-toparea {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.cc-sr-meta { font-size: 13.5px; color: #718096; }

.cc-sr-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #718096; white-space: nowrap; }
.cc-sr-sort label { white-space: nowrap; }
.cc-sr-wrap .cc-sr-sort__select {
    font-family: var(--cc-sr-font-text);
    font-size: 13px;
    color: #1A365D !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: none !important;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
}
.cc-sr-wrap .cc-sr-sort__select:focus { border-color: #0D98BA !important; }

/* ── CONTENT-TYPE PILL ROW ──────────────────────────────────── */

.cc-sr-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    position: relative;
}

.cc-sr-wrap .cc-sr-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0 !important;
    background: #fff !important;
    color: #3d4a5c !important;
    font-family: var(--cc-sr-font-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none !important;
    transition: border-color .15s, color .15s, background .15s;
}
.cc-sr-wrap .cc-sr-pill span { color: #a0aec0; font-weight: 600; font-size: 12px; }
.cc-sr-wrap .cc-sr-pill:hover {
    border-color: #0D98BA !important;
    color: #0D98BA !important;
    background: #fff !important;
}
.cc-sr-wrap .cc-sr-pill.active {
    background: #0D98BA !important;
    border-color: #0D98BA !important;
    color: #fff !important;
}
.cc-sr-wrap .cc-sr-pill.active span { color: rgba(255,255,255,.85); }

.cc-sr-pill-more { position: relative; }
.cc-sr-wrap .cc-sr-pill-more.has-active .cc-sr-pill--more {
    border-color: #0D98BA !important;
    color: #0D98BA !important;
}
.cc-sr-pill-more__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(26,54,93,.12);
    padding: 8px;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
    min-width: 180px;
}
.cc-sr-pill-more.open .cc-sr-pill-more__menu { display: flex; }
.cc-sr-pill-more__menu .cc-sr-pill { width: 100%; justify-content: space-between; }

/* ── RESULTS LIST ───────────────────────────────────────────── */

.cc-sr-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 120px;
    background: #f7fafc;
    border-radius: 14px;
    padding: 20px;
    transition: opacity .15s;
}

.cc-sr-result {
    display: flex;
    gap: 18px;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow .2s, transform .2s;
}
.cc-sr-result:hover {
    box-shadow: 0 6px 20px rgba(26,54,93,.08);
    transform: translateY(-1px);
}

.cc-sr-result__media {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}
.cc-sr-result__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-sr-result__icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.cc-sr-result__icon svg { width: 30px; height: 30px; }

.cc-sr-result__body { flex: 1 1 auto; min-width: 0; }

.cc-sr-result__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.cc-sr-wrap .cc-sr-result__title {
    font-family: var(--cc-sr-font-head) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0;
}
.cc-sr-wrap .cc-sr-result__title a { color: #1A365D !important; text-decoration: none; }
.cc-sr-wrap .cc-sr-result__title a:hover { color: #0D98BA !important; }

.cc-sr-result__badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 100px;
    background: #e3f4f8;
    color: #0D98BA;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cc-sr-result__excerpt {
    font-size: 13.5px;
    line-height: 1.6;
    color: #4a5568;
    margin: 0 0 10px;
}

.cc-sr-result__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    flex-wrap: wrap;
}
.cc-sr-result__topics { color: #0D98BA; }
.cc-sr-result__date { color: #a0aec0; flex-shrink: 0; }

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

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

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

.cc-sr-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.cc-sr-wrap .cc-sr-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 !important;
    background: #fff !important;
    color: #4a5568 !important;
    font-family: var(--cc-sr-font-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: none !important;
    transition: all .15s;
}
.cc-sr-wrap .cc-sr-page-btn:hover {
    border-color: #0D98BA !important;
    color: #0D98BA !important;
    background: #fff !important;
}
.cc-sr-wrap .cc-sr-page-btn.active,
.cc-sr-wrap .cc-sr-page-btn.active:hover {
    background: #0D98BA !important;
    border-color: #0D98BA !important;
    color: #fff !important;
}
.cc-sr-wrap .cc-sr-page-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }

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

@media (max-width: 900px) {
    .cc-sr-body { flex-direction: column; }
    .cc-sr-sidebar { width: 100%; flex: 0 0 auto; }
}

@media (max-width: 560px) {
    .cc-sr-hero__title { font-size: 26px; }
    .cc-sr-searchform { flex-wrap: wrap; padding: 10px; }
    .cc-sr-searchform__submit { width: 100%; margin-top: 8px; }
    .cc-sr-result { flex-direction: column; }
    .cc-sr-result__media { width: 100%; height: 160px; }
    .cc-sr-result__top { flex-direction: column; }
}
