/* Shared fullscreen button + box fullscreen (js/box-fullscreen.js).
   One square button on every page, light and dark; the colour follows the
   header it sits on. */
.nm-fs-btn,
button.nm-fs-btn,
.card-full .card-header .btn.nm-fs-btn,
html[data-mode] .card-full .card-header .btn.nm-fs-btn {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  border-width: 1px !important;
  border-style: solid !important;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.nm-fs-btn:focus-visible { outline: 2px solid var(--B5, #3D6CB8); outline-offset: 2px; }

/* a box never grows to its chart's width: after leaving fullscreen the chart
   still has the fullscreen width for a moment, and a grid/flex track sized by
   content would keep it (the CPI cards spread over the whole row) */
.nm-fs-box { min-width: 0; }
.nm-fs-box .highcharts-container { max-width: 100%; }

/* the box in fullscreen: whole box, page background, chart takes the rest */
.nm-fs-box:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 18px 22px !important;
  box-sizing: border-box !important;
  background: #f4f6f9;
}
html[data-mode="dark"] .nm-fs-box:fullscreen { background: #1a1d21; }
.nm-fs-box:fullscreen > * { flex-shrink: 0; }
.nm-fs-box:fullscreen .nm-fs-fill {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  width: 100% !important;
}
.nm-fs-box:fullscreen::backdrop { background: #f4f6f9; }
html[data-mode="dark"] .nm-fs-box:fullscreen::backdrop { background: #1a1d21; }
