/* Distance Selling Pharmacies national report (/dsp-report) - page-specific
   styles, following the same per-page-stylesheet pattern as
   eps-nominations.css/pharmacy-first.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 a "dr-"
   prefix (DSP Report) to keep its styles isolated from other pages. */

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

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

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

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

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

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

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

.dr-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;
}

.dr-hero-title {
    margin-top: 18px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
}

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

.dr-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;
}

.dr-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) {
    .dr-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

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

/* ---------- Cards (bg-white panels) ---------- */

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

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

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

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

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

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

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

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

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

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

@media (min-width: 992px) {
    .col-lg-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ---------- Segmented toggle (range selector / leaderboard tabs) ---------- */

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

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

.dr-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"] .dr-toggle-btn {
    color: rgba(255, 255, 255, 0.68);
}

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

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

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

[data-theme="dark"] .dr-table {
    --bs-table-bg: transparent;
    --bs-table-color: #f1f5f9;
    --bs-table-border-color: rgba(255, 255, 255, 0.09);
}

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

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

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

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

.dr-table .dr-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"] .dr-table .dr-rank {
    background: #172033;
    color: rgba(255, 255, 255, 0.72);
}

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

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

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

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

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

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

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

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

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

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

/* ---------- Key insights ---------- */

.dr-insight-tile {
    height: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
}

.dr-insight-icon {
    flex-shrink: 0;
    font-size: 20px;
    color: #0f79f3;
    background: rgba(15, 121, 243, 0.1);
    border-radius: 8px;
    padding: 6px;
}

/* ---------- Map ---------- */

.dr-map {
    height: 480px;
    border-radius: 8px;
    overflow: hidden;
}

.dr-map .maplibregl-popup-content {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
}

.dr-map-popup-title {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.dr-map-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
}

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

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

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

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

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

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

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

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

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

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

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

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

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