/* GenBI chart tooltip and map overlay. Shared by the dashboard and the share page.
   Variables fall back to the dashboard's defaults on pages that don't set them. */
/* A map fades in once Plotly has drawn it, as the canvas charts animate in. */
.genbi-map-overlay .plot-container { opacity: 0; transition: opacity .35s ease; }
.genbi-map-overlay.is-drawn .plot-container { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .genbi-map-overlay .plot-container { transition: none; } }
/* ══════ CHART TOOLTIP ══════ */
.chart-tooltip{position:fixed;z-index:300;pointer-events:none;padding:0;border-radius:var(--radius-md, 1rem);background:hsl(0 0% 5%);border:1px solid var(--glass-border, hsla(0 0% 100% / 0.07));box-shadow:0 8px 32px rgba(0,0,0,0.5);font-family:'Inter',system-ui,sans-serif;font-size:12px;color:hsl(0 0% 96%);opacity:0;transition:opacity .15s ease;white-space:nowrap;max-width:300px;overflow:hidden;}
.chart-tooltip.visible{opacity:1;}
.chart-tooltip-label{font-size:11px;color:var(--text-tertiary, hsl(0 0% 35%));margin-bottom:4px;}
.chart-tooltip-value{font-weight:600;font-size:15px;font-family:'Inter',system-ui,sans-serif;}
.chart-tooltip-bar{height:3px;border-radius:2px;margin-top:6px;min-width:40px;}
.tt-header{padding:8px 14px;border-bottom:1px solid rgba(255,255,255,0.06);font-size:11px;color:rgba(255,255,255,0.4);text-transform:uppercase;letter-spacing:0.04em;}
.tt-body{padding:10px 14px;}
.tt-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0;}
.tt-row-label{display:flex;align-items:center;gap:6px;font-size:12px;color:rgba(255,255,255,0.6);}
.tt-row-value{font-size:13px;font-weight:600;color:#fff;}
.tt-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.tt-pct{font-size:11px;color:var(--text-tertiary, hsl(0 0% 35%));font-weight:400;margin-left:4px;}
.tt-divider{height:1px;background:rgba(255,255,255,0.06);margin:6px 0;}
.tt-rank{font-size:11px;color:rgba(255,255,255,0.3);margin-top:2px;}
.tt-bar-wrap{height:4px;background:rgba(255,255,255,0.06);border-radius:2px;margin-top:8px;overflow:hidden;}
.tt-bar-fill{height:100%;border-radius:2px;transition:width .2s ease;}
/* Text edited in place: chart titles, and captions on the share page. */
.editable-text { cursor: text; border-radius: 4px; }
.editable-text:hover:not(.is-editing) { outline: 1px dashed rgba(127,127,127,0.55); outline-offset: 3px; }
.editable-text:focus-visible { outline: 2px solid #0891b2; outline-offset: 3px; }
.editable-text.is-editing-over { position: relative; color: transparent !important; }
.editable-text-field { font: inherit; letter-spacing: inherit; line-height: inherit; color: inherit; background: rgba(127,127,127,0.10); border: 1px solid #0891b2; border-radius: 6px; outline: none; box-sizing: border-box; box-shadow: 0 0 0 3px rgba(8,145,178,0.18); }
.editable-text-field.is-overlay { position: absolute; left: -6px; top: 50%; transform: translateY(-50%); width: calc(100% + 12px); min-width: 16ch; height: calc(100% + 8px); padding: 0 5px; margin: 0; }
.editable-text-field.is-multiline { display: block; width: 100%; min-height: 64px; padding: 6px 8px; resize: vertical; margin: 0; }
.editable-text-field.is-multiline.is-overlay { min-height: 0; resize: none; padding: 6px 10px; overflow-y: auto; }
/* The insight icon steps aside while its caption is edited. */
.editable-text.is-editing .insight-type-dot { display: none !important; }
/* The "i" beside a chart's title: hover (on devices that hover), keyboard focus
   or a tap opens what the chart plots and its description; Esc closes it.
   Where the popover sits is up to each page. */
/* Hidden here, at low specificity, and nowhere else: a page's own rule for
   where the popover sits must not hide it, or it would beat the rules below
   that show it, since page styles load after this file. */
.chart-info .chart-info-pop{display:none;}
.chart-info-btn{width:20px;height:20px;padding:0;border-radius:50%;border:1px solid var(--glass-border, hsla(0 0% 100% / 0.07));background:transparent;color:var(--text-tertiary, hsl(0 0% 35%));cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;}
.chart-info-btn svg{width:16px;height:16px;}
.chart-info-btn:hover,.chart-info.open .chart-info-btn{color:var(--text-primary, hsl(0 0% 96%));border-color:var(--text-tertiary, hsl(0 0% 35%));}
@media (hover:hover){.chart-info:hover:not(.hush) .chart-info-pop{display:block;}}
.chart-info-btn:focus-visible + .chart-info-pop,.chart-info.open .chart-info-pop{display:block;}
.chart-info.hush .chart-info-pop{display:none;}
.chart-info-plain{display:block;font-weight:600;margin-bottom:2px;}
.chart-info-plain[hidden]{display:none;}
@keyframes infoFadeIn{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:translateY(0);}}
