/* The HTML Dashboard's page chrome (#133). A visual's own look comes from its page description, not from here. */
* { box-sizing: border-box; }
body { margin: 0; background: #f3f1f2; color: #32435B;
       font-family: 'Source Sans Pro', 'Segoe UI', helvetica, arial, sans-serif; }
#status { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; z-index: 1001;
          padding: 8px 16px; font-size: 14px; background: #32435B; color: #fff; border-radius: 18px;
          box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
body[data-state="ready"] #status, body.started #status { display: none; }
body[data-state="error"] #status { display: block; position: static; transform: none; margin: 24px; background: none;
                                   box-shadow: none; color: #B8433F; white-space: pre-wrap; }

/* A build's notice line (#340): a thin banner in the page's static HTML, above the page the runtime draws (under an
   edition's strip). It has no close control, stays in view while the page scrolls (under the loading bar, tooltips
   and menus), and prints. Indigo on Turquoise at 18% (the Staff Preview banner's tint). */
.dashboard-notice { position: sticky; top: 0; z-index: 999; margin: 0; padding: 5px 16px; font-size: 13px;
                    font-weight: 600; line-height: 1.3; text-align: center; color: #32435B; background: #DFF6F3;
                    border-bottom: 1px solid #4DCCBD; }
.home .dashboard-notice { margin: -32px -32px 24px; }
.home .home-note { margin: -8px 0 16px; font-size: 16px; }

/* The toolbar above the page: the settings menu (Print to PDF). */
.toolbar { display: flex; justify-content: flex-end; padding: 8px 12px 0; }
.settings { position: relative; }
.settings-button { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
                   color: #32435B; background: #fff; border: 1px solid #E4DDDF; border-radius: 50%; cursor: pointer;
                   box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.settings-button:hover, .settings-button[aria-expanded="true"] { border-color: #32435B; }
.settings-menu { position: absolute; right: 0; top: 38px; z-index: 1002; min-width: 160px; padding: 4px 0;
                 background: #fff; border: 1px solid #E4DDDF; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.settings-menu[hidden] { display: none; }
.settings-menu button { display: block; width: 100%; padding: 8px 14px; font: inherit; font-size: 14px; text-align: left;
                        color: #32435B; background: none; border: 0; cursor: pointer; }
.settings-menu button:hover, .settings-menu button:focus-visible { background: #f3f1f2; }
/* The reader's page zoom (page_zoom.js), left of the gear: zoom out, the zoom drawn now (click: 100%), zoom in, Fit. */
.page-zoom { display: flex; align-items: center; margin-right: 8px; background: #fff; border: 1px solid #E4DDDF;
             border-radius: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); overflow: hidden; }
.page-zoom button { height: 30px; padding: 0 10px; font: inherit; font-size: 13px; color: #32435B; background: none;
                    border: 0; cursor: pointer; }
.page-zoom button:hover:not(:disabled), .page-zoom button:focus-visible { background: #f3f1f2; }
.page-zoom button:disabled { color: #B9B1B4; cursor: default; }
.page-zoom .page-zoom-level { min-width: 52px; font-variant-numeric: tabular-nums; }
.page-zoom .page-zoom-fit { border-left: 1px solid #E4DDDF; }
.page-zoom .page-zoom-fit[aria-pressed="true"] { font-weight: 600; }

/* Loading: a bar across the top of the window and a status line, shown while a refresh runs (after a moment, so a
   quick one doesn't flash); visuals still waiting shimmer (a page not seen before) or dim (a new choice). */
.loading-bar, .loading-text { display: none; }
body[data-state="loading"] .loading-bar { display: block; position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 1001; overflow: hidden; background: rgba(77, 204, 189, .25); }
body[data-state="loading"] .loading-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%;
  background: #4DCCBD; animation: loading-slide 1.1s ease-in-out infinite; }
body[data-state="loading"] .loading-text { display: block; position: fixed; left: 50%; bottom: 24px; z-index: 1001;
  transform: translateX(-50%); padding: 8px 16px 8px 36px; font-size: 14px; color: #fff; background: #32435B;
  border-radius: 18px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); opacity: 0; animation: appear .2s ease-out .3s forwards; }
body[data-state="loading"] .loading-text::before { content: ''; position: absolute; left: 14px; top: 50%; width: 12px;
  height: 12px; margin-top: -8px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes loading-slide { from { left: -30%; } to { left: 100%; } }
@keyframes appear { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.v.pending { border-radius: 3px; background: linear-gradient(90deg, #f6f4f5 25%, #ece8ea 50%, #f6f4f5 75%);
             background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.v.stale { opacity: .45; transition: opacity .2s .15s; }

.stage { padding: 12px 0; overflow: hidden; }
.page { position: relative; margin: 0 auto; background: #fff; transform-origin: top left;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.v { position: absolute; overflow: hidden; }
.v p { margin: 0; }
.v img { width: 100%; height: 100%; display: block; }
.v.unsupported { outline: 1px dashed #C0AFB3; color: #C0AFB3; font-size: 10px; padding: 2px 4px; }
.card-title { line-height: 1.2; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-value { line-height: 1.25; white-space: pre-wrap; }
/* A headline card's trend (#170, card_trend.js): its figure over the last three fiscal years, under the card. */
.v.has-trend { cursor: pointer; }
.v.has-trend:focus-visible { outline: 2px solid #4DCCBD; outline-offset: -2px; }
.card-trend { position: absolute; z-index: 100000; pointer-events: none; box-sizing: border-box; padding: 8px 12px 6px;
              background: #fff; border: 1px solid #32435B; border-radius: 4px; box-shadow: 0 4px 12px rgba(50, 67, 91, .2);
              color: #32435B; font-family: 'Source Sans Pro', 'Segoe UI', helvetica, arial, sans-serif; font-size: 12px; }
.trend-title { font-weight: 600; margin-bottom: 6px; }
.trend-status { padding: 4px 0; }
.trend-columns { display: flex; gap: 14px; align-items: flex-end; }
.trend-column { flex: 1 1 0; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.trend-value { font-weight: 600; white-space: nowrap; margin-bottom: 2px; }
.trend-label { white-space: nowrap; margin-top: 3px; }
.card-reference { line-height: 1.3; margin-top: 3px; white-space: pre-wrap; }
.v img.card-image { display: block; width: auto; height: auto; margin: 4px 0; }

/* Data visuals (#135): the frame's title and subtitle, then the body the renderer fills. */
.v-title { line-height: 1.3; flex: none; padding-bottom: 2px; overflow-wrap: anywhere; }
.v-subtitle { line-height: 1.3; flex: none; padding-bottom: 2px; }
.v-body { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
.v-body.grid-body { overflow: auto; }
.v-body svg { display: block; overflow: visible; }
.v.zoomable .v-body { touch-action: pan-x pan-y; }  /* the browser scrolls the page; two fingers reach the chart */
.v.zoomed .v-body { cursor: grab; touch-action: none; }
.v.zoomed .v-body.panning { cursor: grabbing; }
.zoom-reset { position: absolute; top: 4px; right: 4px; z-index: 5; padding: 2px 8px; font: inherit; font-size: 11px;
              color: #32435B; background: #fff; border: 1px solid #C0AFB3; border-radius: 3px; cursor: pointer; opacity: .9; }
.zoom-reset:hover { border-color: #32435B; }
/* Figures / Variance % (#174): a chart's own toggle in its top right corner, clear of its title and its zoom Reset. */
.variance-toggle { position: absolute; top: 4px; right: 4px; z-index: 6; display: flex; }
.variance-toggle button { font: inherit; font-size: 11px; line-height: 1.2; padding: 2px 8px; color: #32435B;
                          background: #fff; border: 1px solid #C0AFB3; cursor: pointer; }
.variance-toggle button + button { border-left: 0; }
.variance-toggle button:first-child { border-radius: 3px 0 0 3px; }
.variance-toggle button:last-child { border-radius: 0 3px 3px 0; }
.variance-toggle button[aria-pressed="true"] { color: #fff; background: #32435B; border-color: #32435B; cursor: default; }
.v.has-variance-toggle .v-title { padding-right: 150px; }
.v.has-variance-toggle .zoom-reset { top: 28px; }
.v-body svg text { dominant-baseline: auto; }
/* A visual whose selection reaches another one: its points and rows say they can be clicked. */
.v.selectable .mark, .v.selectable .legend-item.clickable { cursor: pointer; }
.v.selectable .pbi-grid tbody tr:not(.total) { cursor: pointer; }
.v.selectable .pbi-grid tbody tr:not(.total):hover > td { box-shadow: inset 0 0 0 9999px rgba(77, 204, 189, .14); }
.v.selectable .mark:hover { filter: brightness(1.12); }
/* Hover linking: within a visual that holds the hovered label, everything else steps back. */
.v.linking .mark:not(.linked) { opacity: .3; transition: opacity .12s; }
.v.linking .pbi-grid tr.linked > td { box-shadow: inset 0 0 0 9999px rgba(77, 204, 189, .14); }
.v-body.legacy-card { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pbi-grid { border-collapse: collapse; line-height: 1.25; }
.pbi-grid th { font-weight: inherit; vertical-align: top; overflow: hidden; }
.pbi-grid td { vertical-align: top; overflow: hidden; text-overflow: clip; }
.pbi-grid img { width: auto; height: auto; }
.pbi-grid tbody tr { cursor: default; }
.legend-item.dimmed { opacity: .4; }
/* A banded row (a light neutral fill in Power BI) is ruled off rather than filled (visual.js's isNeutralBand): the
   row above's bottom border, so it prints as a line; an inset box-shadow printed as a frame round every cell. */
.pbi-grid tr:has(+ tr.band) > td { border-bottom: 1px solid #32435B !important; }
.matrix-toggle { border: 0; background: none; padding: 0 4px 0 0; margin: 0; font: inherit; color: inherit;
                 cursor: pointer; width: 14px; text-align: left; }
.v.button { display: flex; cursor: pointer; }
/* A button that does something (a page tab, Previous/Next, Back) says so on hover: a Turquoise wash over its own fill,
   as a clickable table row has, so it shows on a white tab and an Indigo one alike. A decorative button has no role. */
.v.button[role] { transition: box-shadow .12s; }
.v.button[role]:hover { box-shadow: inset 0 0 0 9999px rgba(77, 204, 189, .22); }
.v.button:not([role]) { cursor: default; }
.drill-bar { position: absolute; top: 2px; right: 2px; z-index: 2; display: flex; gap: 2px; opacity: 0;
             transition: opacity .15s; }
.v:hover .drill-bar, .drill-bar:focus-within { opacity: 1; }
.drill-bar button { font: inherit; font-size: 12px; line-height: 1; padding: 2px 5px; color: #32435B;
                    background: #fff; border: 1px solid #C0AFB3; border-radius: 2px; cursor: pointer; }
.drill-bar button:disabled { opacity: .4; cursor: default; }
.drill-bar button:hover:not(:disabled), .variance-toggle button:hover:not([aria-pressed="true"]) {
  border-color: #32435B; background: #f3f1f2; }
.v.render-error { outline: 1px dashed #C0AFB3; display: flex; align-items: center; justify-content: center; }
.render-error-text { font-size: 11px; color: #605E5C; }

.v.slicer { display: flex; flex-direction: column; }
.slicer-header { line-height: 1.3; margin-bottom: 3px; }
.slicer-select, .slicer-date { width: 100%; padding: 3px 6px; border: 1px solid #C0AFB3; border-radius: 2px;
                               background: #fff; font: inherit; cursor: pointer; transition: border-color .12s; }
/* A dropdown says it opens on hover: its border goes Indigo. */
.slicer-select:hover, .slicer-date:hover { border-color: #32435B; }
.slicer-list { overflow: auto; flex: 1 1 auto; }
.slicer-range { display: flex; gap: 10px; }
.slicer-range-part { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 5px; }
.slicer-range-caption { flex: none; font-size: 11px; color: #605E5C; }
.slicer-item { display: flex; align-items: center; gap: 6px; line-height: 1.5; cursor: pointer; }
.slicer-item:hover { background: #f3f1f2; }

.tooltip { position: fixed; z-index: 1000; display: none; pointer-events: none; background: #fff; color: #32435B;
           border: 1px solid #C0AFB3; border-radius: 3px; padding: 6px 9px; font-size: 12px; line-height: 1.4;
           box-shadow: 0 2px 6px rgba(0, 0, 0, .15); max-width: 320px; }
.tooltip-title { font-weight: 700; margin-bottom: 2px; }
.tooltip-line { display: flex; gap: 12px; justify-content: space-between; }
.tooltip-text { white-space: pre; }
.tooltip-label { color: #605E5C; }
.tooltip-value { font-weight: 700; white-space: nowrap; }

/* The KPI Targets table's history popover (#171): opened by a click on a KPI's row, never printed (.no-print). */
.pbi-grid tbody tr.explorable { cursor: pointer; }
.pbi-grid tbody tr.explorable:hover > td, .pbi-grid tbody tr.explorable[aria-expanded="true"] > td {
  box-shadow: inset 0 0 0 9999px rgba(77, 204, 189, .14); }
.kpi-history { position: absolute; z-index: 100000; padding: 10px 14px 8px; background: #fff; color: #32435B;
               border: 1px solid #32435B; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); font-size: 12px; }
.kpi-history-title { margin: 0 28px 2px 0; font-size: 14px; font-weight: 600; }
.kpi-history-note { margin: 0 0 6px; }
.kpi-history-loading { min-width: 200px; padding: 6px 0; }
.kpi-history-legend { display: flex; gap: 14px; margin-bottom: 2px; }
.kpi-history .legend-item { display: inline-flex; align-items: center; gap: 5px; }
.kpi-history .swatch { display: inline-block; width: 10px; height: 10px; }
.kpi-history .typed-goal { margin: 2px 0; }
.kpi-history svg { display: block; overflow: visible; font-family: inherit; }
.kpi-history-close { position: absolute; top: 4px; right: 6px; padding: 0 4px; font-size: 18px; line-height: 1;
                     color: #32435B; background: none; border: 0; cursor: pointer; }

.home { padding: 32px; }
.home h1 { font-family: 'Calisto MT', Georgia, serif; }
.report-types a { color: #32435B; font-size: 18px; line-height: 2; }

.print-stack .page { margin: 0 0 16px; }

@media print {
  @page { margin: 0; }
  body { background: #fff; }
  .no-print, .zoom-reset, .tooltip, .loading-bar, .loading-text { display: none !important; }
  /* The notice prints, once, above the first sheet, its tint kept. */
  .dashboard-notice { position: static; padding: 3px 12px; font-size: 9pt; -webkit-print-color-adjust: exact;
                      print-color-adjust: exact; }
  .stage { padding: 0; }
  .page { box-shadow: none; }
  /* A sheet is 1280px wide, past a portrait page's width even at the browser's fit, which cut its right edge: drawn
     at 60%, it fits Letter and A4 in portrait, one sheet per page (the tallest, 1740px, fits Letter). The window's
     zoom (page_zoom.js) is the screen's only. */
  .page { zoom: .6; transform: none !important; margin: 0 !important; }
  /* A row's or a button's hover tint is an inset box-shadow, which can print as a frame: none on paper. */
  .pbi-grid td, .v.button[role] { box-shadow: none !important; }
  /* A campaign's creative is its own sheet, after its results (#175), however the page was printed. */
  .page:not(:last-child) { break-after: page; }
  /* Print to PDF: every page's sheet, one per printed page. */
  .printing-all .print-stack .page { margin: 0; break-after: page; break-inside: avoid; }
  .printing-all .print-stack .page:last-child { break-after: auto; }
}
