/* EU261 daily statistics page. */
.statistics-page { max-width: 1120px; }
.statistics-header { margin: 0 0 24px; }
.statistics-header h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.statistics-header p { color: var(--fc-muted); margin: 8px 0 0; }
.statistics-kicker { color: var(--fc-primary) !important; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.statistics-section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.statistics-section-heading h2 { margin: 0; font-size: 1.25rem; }
.statistics-section-heading p, .statistics-empty { color: var(--fc-muted); margin: 5px 0 0; }
.map-key { align-items: center; color: var(--fc-muted); display: inline-flex; font-size: .88rem; gap: 7px; white-space: nowrap; }
.map-key i { background: #db5a42; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #b33f2e; display: inline-block; height: 8px; width: 8px; }
.europe-map-wrap { position: relative; width: 100%; max-width: 780px; margin: 0 auto; aspect-ratio: 680 / 540; overflow: hidden; }
.europe-map-view { position: absolute; inset: 0; transform-origin: 0 0; touch-action: pan-y; }
.europe-map-view.is-zoomed { cursor: grab; touch-action: none; }
.europe-map-view.is-panning { cursor: grabbing; }
.map-zoom { position: absolute; top: 10px; right: 10px; z-index: 7; display: flex; flex-direction: column; gap: 6px; }
.map-zoom__btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 1.3rem; line-height: 1; font-weight: 700; color: var(--fc-text); background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: 8px; cursor: pointer; box-shadow: 0 2px 6px rgba(6, 12, 28, .18); }
.map-zoom__btn:hover { border-color: var(--fc-primary); color: var(--fc-primary); }
.map-zoom__btn:focus-visible { outline: 2px solid var(--fc-primary); outline-offset: 2px; }
.map-zoom__btn--reset { font-size: 1.05rem; }
.europe-map-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.europe-map-markers { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-marker { cursor: pointer; fill: #db5a42; stroke: #fff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: transform .12s ease, fill .12s ease; }
.map-marker:hover, .map-marker:focus-visible, .map-marker.is-active { fill: #8c2d22; transform: scale(1.6); }
.map-marker:focus-visible { outline: none; stroke: #ffd9a8; stroke-width: 2; }
.map-popup { position: absolute; z-index: 6; min-width: 148px; max-width: 240px; padding: 10px 12px; background: var(--fc-panel); color: var(--fc-text); border: 1px solid var(--fc-border); border-radius: 9px; box-shadow: 0 10px 28px rgba(6, 12, 28, .28); font-size: .9rem; }
.map-popup[hidden] { display: none; }
.map-popup__name { font-weight: 600; line-height: 1.32; margin-bottom: 7px; }
.map-popup__link { color: var(--fc-primary); font-weight: 600; text-decoration: none; }
.map-popup__link:hover, .map-popup__link:focus-visible { text-decoration: underline; }
.statistics-table-section, .statistics-chart-section { margin-top: 22px; }
.statistics-table-wrap { overflow-x: auto; }
.statistics-table { border-collapse: collapse; min-width: 760px; width: 100%; }
.statistics-table th, .statistics-table td { border-bottom: 1px solid var(--fc-border); padding: 11px 12px; text-align: right; }
.statistics-table thead th { color: var(--fc-muted); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.statistics-table th:first-child { text-align: left; }
.statistics-table tbody tr:last-child th, .statistics-table tbody tr:last-child td { border-bottom: 0; }
.chart-controls { border: 0; display: flex; flex-wrap: wrap; gap: 9px 17px; margin: 0 0 16px; padding: 0; }
.chart-controls legend { color: var(--fc-muted); font-size: .88rem; margin-bottom: 7px; padding: 0; }
.chart-controls label { align-items: center; cursor: pointer; display: inline-flex; font-size: .92rem; gap: 5px; }
.chart-controls input { accent-color: var(--fc-primary); }
.chart-wrap { height: 360px; position: relative; }
.chart-wrap canvas { height: 100%; width: 100%; }
.chart-status { color: var(--fc-muted); font-size: .86rem; min-height: 1.4em; margin-top: 7px; }
.visually-hidden { height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.statistics-error { margin: 0 auto; max-width: 650px; text-align: center; }

/* Methodology / coverage note */
.statistics-note { margin-top: 22px; }
.statistics-note h2 { margin: 0 0 8px; font-size: 1.15rem; }
.statistics-note p { color: var(--fc-muted); margin: 0 0 8px; max-width: 78ch; }
.statistics-note p:last-child { margin-bottom: 0; }
.statistics-note strong { color: var(--fc-text); }

/* Ranking tables (airlines / airports) reuse .statistics-table */
.statistics-rank-section { margin-top: 22px; }
.statistics-table td.eu-num, .statistics-table th.eu-num { font-variant-numeric: tabular-nums; }
.eu-iata { color: var(--fc-muted); font-weight: 400; }

/* Ranking histograms */
.hist-section { margin-top: 22px; }
.hist { margin-top: 2px; }
.hist-controls-wrap { margin: 0 0 14px; }
.hist-controls-wrap > summary { align-items: center; color: var(--fc-primary); cursor: pointer; display: inline-flex; font-size: .9rem; font-weight: 600; gap: 6px; list-style: none; }
.hist-controls-wrap > summary::-webkit-details-marker { display: none; }
.hist-controls-wrap > summary::before { content: "\25B8"; font-size: .8em; }
.hist-controls-wrap[open] > summary::before { content: "\25BE"; }
.hist-toolbar { display: flex; gap: 8px; margin: 12px 0 10px; }
.hist-btn { background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: 7px; color: var(--fc-text); cursor: pointer; font: inherit; font-size: .85rem; padding: 5px 12px; }
.hist-btn:hover { border-color: var(--fc-primary); color: var(--fc-primary); }
.hist-btn:focus-visible { outline: 2px solid var(--fc-primary); outline-offset: 2px; }
.hist-controls { display: grid; gap: 6px 14px; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); max-height: 220px; overflow-y: auto; padding: 4px 2px; }
.hist-controls label { align-items: center; cursor: pointer; display: inline-flex; font-size: .88rem; gap: 6px; min-width: 0; }
.hist-controls input { accent-color: var(--fc-primary); flex: none; }
.hist-controls span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-canvas-wrap { width: 100%; }
.hist-canvas-wrap canvas { display: block; width: 100%; }
.hist-fig { margin: 0 0 12px; }
.hist-fig figcaption { color: var(--fc-muted); font-size: .86rem; font-weight: 600; margin-bottom: 4px; }
.hist-tip { background: var(--fc-panel); border: 1px solid var(--fc-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(6, 12, 28, .24); color: var(--fc-text); font-size: .84rem; line-height: 1.35; max-width: 260px; padding: 8px 10px; pointer-events: none; position: fixed; z-index: 60; }
.hist-tip[hidden] { display: none; }
.hist-tip__name { font-weight: 700; margin-bottom: 2px; }
.hist-tip__red { color: #d03b3b; }
.hist-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; color: var(--fc-muted); font-size: .84rem; }
.hist-legend__item { align-items: center; display: inline-flex; gap: 7px; }
.hist-sw { border-radius: 3px; display: inline-block; flex: none; height: 12px; width: 12px; }
.hist-sw--red { background: #d03b3b; }
.hist-sw--yellow { background: #e0a000; }
:root[data-theme="dark"] .hist-sw--red { background: #e66767; }
:root[data-theme="dark"] .hist-sw--yellow { background: #f2b134; }
:root[data-theme="dark"] .hist-tip__red { color: #e66767; }

@media (max-width: 620px) { .statistics-section-heading { display: block; } .map-key { margin-top: 10px; } .chart-wrap { height: 280px; } .hist-controls { max-height: 190px; } }
