/* EPS Nominations national overview (/eps-nominations) - page-specific
   styles, following the same per-page-stylesheet pattern as
   pharmacy-first.css/market-share.css. Colours/spacing reuse the tokens in
   _variables.scss (primary #0f79f3, secondary #796df6, radius 10px) rather
   than introducing new ones - this page's class names use an "en-" prefix
   (EPS Nominations) to keep its styles isolated from other pages. */

/* ---------- Hero ---------- */

.en-hero {
    position: relative;
    overflow: hidden;
    padding: 48px 40px;
    background: linear-gradient(135deg, #0f79f3 0%, #796df6 100%);
    color: #ffffff;
}

.en-hero-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.en-hero-shapes::before,
.en-hero-shapes::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.en-hero-shapes::before {
    width: 380px;
    height: 380px;
    top: -160px;
    right: -100px;
}

.en-hero-shapes::after {
    width: 240px;
    height: 240px;
    bottom: -130px;
    left: -60px;
    background: rgba(255, 255, 255, 0.06);
}

.en-hero-content {
    position: relative;
    z-index: 1;
}

.en-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.en-hero-title {
    margin-top: 18px;
    font-weight: 600;
    line-height: 1.2;
    /* The site's global `h1 { color: var(--bs-heading-color) }` rule (in
       style.css) applies directly to this element and otherwise overrides
       the white text this heading would inherit from .en-hero's gradient
       background - inheritance always loses to a rule that targets the
       element itself. */
    color: #ffffff;
}

.en-hero-subtitle {
    margin: 10px 0 0;
    max-width: 680px;
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}

.en-hero-meta {
    margin: 16px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.en-hero-stats {
    position: relative;
    z-index: 1;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

@media (max-width: 991.98px) {
    .en-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.en-hero-stat-value {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.en-hero-stat-label {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.en-hero-stat-badge {
    margin-top: 8px;
    display: inline-flex;
}

/* ---------- Cards (bg-white panels) ----------
   The site's global dark-mode rules recolour text (p, h1-h6, .text-secondary,
   .text-dark) to light shades everywhere, on the assumption that containers
   use Bootstrap's .card class, which the site overrides to a dark background
   in [data-theme="dark"]. This page instead builds its panels with the
   bg-white/border-white utility combo (not .card), which the global rules
   don't touch - leaving light text sitting on a background that's still
   white. Every such panel on this page pairs bg-white with border-white, so
   that combination is targeted directly, keeping the fix local to this page
   rather than touching the global .bg-white utility. */

[data-theme="dark"] .bg-white.border-white {
    background-color: #1b232d !important;
    border-color: #1b232d !important;
}

/* ---------- Info tooltip icon ---------- */

.en-info-icon {
    font-size: 14px;
    color: #94a3b8;
    cursor: help;
    vertical-align: -2px;
}

[data-theme="dark"] .en-info-icon {
    color: rgba(255, 255, 255, 0.55);
}

.en-info-icon-light {
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Section rhythm ---------- */

.en-section {
    margin-bottom: 40px;
}

.en-section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f79f3;
    margin-bottom: 6px;
}

.en-section-subtitle {
    color: #64748b;
    max-width: 760px;
    margin-bottom: 0;
}

[data-theme="dark"] .en-section-subtitle {
    color: rgba(255, 255, 255, 0.68);
}

/* Bootstrap ships 2/3/4/6/12-column tiers but no 5-up tier, needed for the
   national snapshot's 5 stat tiles sitting side by side. */
@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* ---------- Stat tiles ---------- */

.en-stat-tile {
    height: 100%;
    padding: 18px 20px;
    border-radius: 10px;
    background: #f8fbff;
    border: 1px solid #eef2f7;
}

[data-theme="dark"] .en-stat-tile {
    background: #172033;
    border-color: #2b3648;
}

.en-stat-tile-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

[data-theme="dark"] .en-stat-tile-label {
    color: rgba(255, 255, 255, 0.68);
}

.en-stat-tile-value {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
}

[data-theme="dark"] .en-stat-tile-value {
    color: #f1f5f9;
}

.en-stat-tile-footnote {
    margin-top: 4px;
    font-size: 12.5px;
    color: #94a3b8;
}

/* ---------- Chart cards ---------- */

.en-chart-card {
    padding: 24px;
}

@media (max-width: 575.98px) {
    .en-chart-card {
        padding: 16px;
    }
}

.en-chart-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0;
}

[data-theme="dark"] .en-chart-subtitle {
    color: rgba(255, 255, 255, 0.68);
}

.en-chart-canvas {
    margin-top: 8px;
}

.en-narrative {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f1f2fd;
    border-left: 3px solid #0f79f3;
    font-size: 14px;
    color: #334155;
}

[data-theme="dark"] .en-narrative {
    background: rgba(15, 121, 243, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Segmented toggle ---------- */

.en-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    padding: 3px;
    border-radius: 8px;
    background: #f1f5f9;
    gap: 2px;
}

[data-theme="dark"] .en-toggle {
    background: #172033;
}

.en-toggle-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    color: #64748b;
    white-space: nowrap;
    cursor: pointer;
}

[data-theme="dark"] .en-toggle-btn {
    color: rgba(255, 255, 255, 0.68);
}

.en-toggle-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] .en-toggle-btn.active {
    background: #293542;
    color: #f1f5f9;
}

/* ---------- Tables (leaderboards / ICB table) ---------- */

/* Bootstrap's .table rule paints each cell with its own opaque
   background-color (--bs-table-bg, which resolves to --bs-body-bg - a light
   colour that's never redefined for this site's custom [data-theme="dark"]
   attribute, since that's normally Bootstrap's own [data-bs-theme="dark"]
   job). That per-cell background sits on top of the dark .bg-white.border-white
   card behind it, leaving the light, dark-mode-styled text (e.g.
   .en-pharmacy-link) sitting on a light cell background again - the same
   white-on-white problem as the cards above, just one layer deeper. Redefining
   the variables on .en-table lets the dark card show through every cell. */
[data-theme="dark"] .en-table {
    --bs-table-bg: transparent;
    --bs-table-color: #f1f5f9;
    --bs-table-border-color: rgba(255, 255, 255, 0.09);
}

.en-table-search {
    max-width: 280px;
}

.en-table th[data-sort-key] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.en-table th[data-sort-key] .material-symbols-outlined {
    font-size: 16px;
    vertical-align: -3px;
    opacity: 0.35;
}

.en-table th[data-sort-key].en-sort-active .material-symbols-outlined {
    opacity: 1;
    color: #0f79f3;
}

.en-table td,
.en-table th {
    font-size: 13.5px;
}

.en-table .en-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
}

[data-theme="dark"] .en-table .en-rank {
    background: #172033;
    color: rgba(255, 255, 255, 0.72);
}

.en-table .en-pharmacy-link {
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
}

.en-table .en-pharmacy-link:hover {
    color: #0f79f3;
    text-decoration: underline;
}

[data-theme="dark"] .en-table .en-pharmacy-link {
    color: #f1f5f9;
}

.en-change-up {
    color: #2ed47e;
    font-weight: 500;
}

.en-change-down {
    color: #e74c3c;
    font-weight: 500;
}

.en-change-flat {
    color: #94a3b8;
}

.en-pagination-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.en-pagination-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.en-pagination-btn.active {
    background: #0f79f3;
    border-color: #0f79f3;
    color: #fff;
}

[data-theme="dark"] .en-pagination-btn {
    background: #172033;
    border-color: #2b3648;
    color: rgba(255, 255, 255, 0.75);
}

.en-table-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px 0;
}

/* ---------- Pharmacy search ---------- */

.en-pharmacy-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    display: none;
}

.en-pharmacy-search-results.show {
    display: block;
}

.en-pharmacy-search-results .list-group-item {
    cursor: pointer;
    font-size: 13.5px;
}

.en-pharmacy-search-results .list-group-item:hover,
.en-pharmacy-search-results .list-group-item.active {
    background: #f1f5f9;
}

/* ---------- Methodology ---------- */

.en-methodology summary {
    cursor: pointer;
    font-weight: 500;
    color: #0f172a;
    list-style: none;
}

.en-methodology summary::-webkit-details-marker {
    display: none;
}

.en-methodology summary::before {
    content: "add";
    font-family: "Material Symbols Outlined";
    margin-right: 8px;
    font-size: 18px;
    vertical-align: -4px;
    color: #0f79f3;
}

.en-methodology[open] summary::before {
    content: "remove";
}

[data-theme="dark"] .en-methodology summary {
    color: #f1f5f9;
}

.en-methodology-body {
    margin-top: 12px;
    font-size: 13.5px;
    color: #475569;
}

[data-theme="dark"] .en-methodology-body {
    color: rgba(255, 255, 255, 0.72);
}

.en-methodology-body dt {
    font-weight: 500;
    color: #0f172a;
    margin-top: 10px;
}

[data-theme="dark"] .en-methodology-body dt {
    color: #f1f5f9;
}

.en-methodology-body dd {
    margin-bottom: 0;
}

.en-methodology-body code {
    font-size: 12.5px;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
}

[data-theme="dark"] .en-methodology-body code {
    background: #172033;
}
