/* assets/custom.css */

/* ===== Theme tokens (tweak once, apply everywhere) ===== */

@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap");

:root {
  --bg: #f4f2f6; /* app background (Darkly-compatible) */
  --panel-bg: #f5f3f8; /* card / panel background */
  --panel-border: #3a3f4b; /* outline for graphs/panels */
  --text: #000000;
  --muted: #f4f2f6;
  --bright: #7a00e6; /* purple bright */
  --dark-color: #23004c;
  --medium-dark: #e4e4e4;

  --app-font:
    "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Main content: don't offset again */
#main-content {
  overflow-x: clip; /* prevents small overflow from causing scrollbars */
  background-color: var(--bg);
  max-width: 1600px;
  margin: 0 auto;
}

html,
body,
#root,
#app {
  font-family: var(--app-font);
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--app-font);
  font-weight: 700;
  color: var(--dark-color);
}

table,
th,
td,
p,
span,
div {
  font-family: var(--app-font);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Reset chart containers to be transparent so our panels show through */
.js-plotly-plot .plotly,
.js-plotly-plot .plotly > div {
  background: transparent !important;
}

/* ===== Generic layout primitives ===== */
.app-shell {
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  padding-left: 340px;
  transition: padding-left 0.25s ease;
}

.app-shell:has(#left-sidebar.sidebar-open) {
  padding-left: 340px;
}

.app-shell:has(#left-sidebar.sidebar-closed) {
  padding-left: 92px;
}

.section {
  padding: 40px 50px 40px 20px;
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 80%;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.eyebrow {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.section-header {
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.25;
  color: var(--dark-color);
  text-align: left;
}

/* A grid that holds multiple charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

/* Per-chart “card” with an outline */
.chart-card {
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

/* Hide legends you don’t want globally (can be overridden per chart) */
.chart-card .legend {
  font-size: 11px;
}

.gauge-row {
  aspect-ratio: 2.6 / 1;
  width: 100%;
}
/* Responsive height: grows with width but stays reasonable */
.gauge-card {
  height: clamp(160px, 24vw, 260px);
}

/* Make the Graph itself fill the card */
.gauge-card .js-plotly-plot,
.gauge-card .plot-container,
.gauge-card .svg-container {
  height: 100% !important;
  width: 100% !important;
}

.gauge-wrap {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 6px;
}

.gauges-section {
  display: grid;
  grid-template-columns: 90px repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 28px;
  row-gap: 8px;
  align-items: center;
}

.gauges-year {
  font-family: Arial Black;
  font-size: clamp(22px, 3.6vh, 34px); /* purple, like PPT */
  line-height: 1;
  justify-self: start;
}

.gauge-wrap {
  display: grid;
  grid-template-rows: 1fr auto; /* gauge row + label row */
  align-items: center;
  height: 100%;
}

.gauges-title {
  text-align: center;
  margin-bottom: 6px;
}

.gauges-title h3 {
  font-weight: 600;
  font-size: 22px;
  color: #111;
}

.gauge-wrap .js-plotly-plot,
.gauge-wrap .plot-container,
.gauge-wrap .svg-container {
  height: 100% !important; /* figure stretches to fill row height */
}

.gauge-labels-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  font-size: 14px;
  margin-top: 4px;
}

.gauge-labels-row .cell {
  white-space: nowrap;
}

/* Make radio/checkbox/inputs feel at home on dark background */
.Select__control,
.dash-dropdown,
.form-control {
  background: #0e1014 !important;
  color: var(--text) !important;
  border-color: var(--panel-border) !important;
}

.row-section {
  background: #fff;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
}

.row-section-2up {
  flex: 1 1 calc((100% - 16px) / 2);
  max-width: calc((100% - 16px) / 2);
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
}

.row-section-2up-container {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: stretch;
}

.row-section-40 {
  flex: 0 0 calc((100% - 16px) * 0.42);
  max-width: calc((100% - 16px) * 0.42);
}

.row-section-60 {
  flex: 0 0 calc((100% - 16px) * 0.58);
  max-width: calc((100% - 16px) * 0.58);
}

@media (max-width: 1350px) {
  .row-section-40,
  .row-section-60 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.iped-two-up .row-section-2up:first-child {
  flex: 0 0 calc((100% - 16px) * 0.42);
  max-width: calc((100% - 16px) * 0.42);
}

.iped-two-up .row-section-2up:last-child {
  flex: 0 0 calc((100% - 16px) * 0.58);
  max-width: calc((100% - 16px) * 0.58);
}

@media (max-width: 1350px) {
  .iped-two-up .row-section-2up {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.row-section H3 {
  font-size: 21px;
  text-align: center;
}

.row-section-2up-container H3 {
  font-size: 21px;
  text-align: center;
}

.row-title {
  text-align: center;
  font-weight: 700;
  margin: 4px 0 10px 0;
  font-size: 18px;
}

.row-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

/* ---- Make each chart "frameless" ---- */
.chart-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important; /* removes inner padding */
}

/* Plotly canvas blends with row container */
.chart-card .js-plotly-plot,
.chart-card .plotly,
.chart-card .plot-container {
  background: transparent !important;
}

/* Optional: tighten legends under donuts/bars */
.chart-card .legend {
  margin-top: 6px;
}

/* Two-column shell */
.layout-2col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

* {
  scrollbar-width: none !important;
}

/* Sidebar look */
#left-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh; /* Full viewport height */
  width: 320px;
  background-color: var(--dark-color);
  color: white;
  border-right: 10px solid var(--bright);
  padding: 40px;
  box-sizing: border-box;
  overflow-y: auto; /* Add scroll if sidebar content is long */
  z-index: 1000; /* Ensure it stays on top of main content */
  transition:
    width 0.25s ease,
    padding 0.25s ease;
}

.sidebar-edge-toggle {
  position: fixed;
  top: 50%;
  left: 320px;
  transform: translateY(-50%);
  width: 22px;
  height: 36px;
  border-radius: 0 6px 6px 0;
  border: none;
  padding: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: left 0.25s ease;
}

.sidebar-edge-toggle:hover {
  background: var(--bright);
}

#left-sidebar.sidebar-closed + .sidebar-edge-toggle,
.sidebar-edge-toggle.sidebar-closed-toggle {
  left: 72px;
}

#left-sidebar.sidebar-open {
  width: 320px;
  padding: 40px;
}

#left-sidebar.sidebar-closed {
  width: 72px;
  padding: 40px 12px;
}

#left-sidebar.sidebar-closed > *:not(.sidebar-edge-toggle) {
  display: none;
}

.sidebar-closed-nav {
  display: none;
}

#left-sidebar.sidebar-closed .sidebar-closed-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.sidebar-closed-nav-btn {
  width: 44px;
  height: 120px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  border: 1px solid #fff;
  font-size: 24px;
  font-weight: 900;
  padding: 0;
}

.sidebar-closed-nav-btn:hover {
  background: var(--muted);
  color: var(--dark-color);
}

.sidebar-toggle-button {
  width: 100%;
  margin-bottom: 20px;
}

/* Right content area */
.content {
  min-width: 0;
}

/* Layout skeleton */
.content-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.content-main {
  flex: 1;
  min-width: 0;
}
.content-pane {
  flex: 1;
  min-width: 0;
}

.sidebar-title {
  color: white;
  margin-bottom: 12px;
}
.sidebar-section-title {
  font-weight: 700;
  margin: 12px 0 6px;
}

.muted {
  color: #ccc;
}
.page-title {
  /* optional page title styling */
}

/* Image & scroll wrapper used in "Clinical Tests: Blood" */
.scroll-box {
  width: 90%;
  padding: 10px;
  overflow: auto;
}
.hero-image {
  width: 90%;
  height: auto;
  max-width: 90%;
  display: block;
  margin: 0 auto;
}

.btn-light {
  color: #fff;
  background-color: var(--bright);
  border-color: var(--bright);
  font-weight: bold;
}

.btn-light:hover {
  background-color: var(--muted);
  color: var(--dark-color);
  font-weight: bold;
}

.btn-outline-light {
  color: #fff;
  outline: #fff;
}

.btn-outline-light:hover {
  background-color: var(--muted);
  color: var(--dark-color);
  font-weight: bold;
}

.dropdown-controls {
  background-color: #23004c;
  width: 360px;
  padding: 20px;
  background-color: var(--dark-color);
  border-radius: 12px;
  margin-right: 16px;
  flex-shrink: 0;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dropdown-label {
  font-size: 16px;
  padding-bottom: 6px;
}

.dropdown-controls-button {
  width: 100%;
  padding: 10px 16px;
  color: #fff;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-filter-label {
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-filter-card {
  margin-bottom: 24px;
}

.sidebar-filter-card-closed {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 0;
}

.sidebar-filter-card-open {
  background: rgba(0, 0, 0, 0.15);
  border: solid 1px var(--bg);
  border-radius: 10px;
  padding: 12px;
}

.sidebar-filter-body {
  padding-top: 12px;
}

.sidebar-filter-card .dropdown-label {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 2px;
}

.dropdown-controls-button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-controls-button:hover {
  background-color: var(--muted);
  color: var(--dark-color);
}

.radio {
  color: #6f4bd8;
  background-color: #6f4bd8;
}

.graph-labels {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-right: 40px;
  margin-bottom: 10px;
}

.legend-pair {
  display: inline-flex;
  align-items: center;
  margin-left: 20px;
}

.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  border: 0.5px solid #333;
}

.legend-text {
  font-size: 14px;
  color: #333;
}

/* colors */
.dot4 {
  background-color: #ffffff;
}
.dot1 {
  background-color: var(--bright);
}
.dot2 {
  background-color: var(--dark-color);
}
.dot3 {
  background-color: var(--medium-dark);
}
.dot5 {
  background-color: #efedf4;
}
.dot6 {
  background-color: #000000;
}

.custom-radio-group {
  display: flex;
  gap: 20px; /* space between options */
  font-size: 14px;
}

.custom-radio-group input[type="radio"] {
  bright-color: var(--bright);
  cursor: pointer;
}

.custom-radio-group input[type="radio"]:checked + label {
  color: var(--bright);
  font-weight: 600;
}

.custom-radio-group label {
  cursor: pointer;
}

/* Make the whole dropdown control a flex container */
.Select-control {
  display: flex;
  align-items: center; /* ✅ everything vertically centered */
  min-height: 40px; /* ensure enough height */
  height: auto;
  padding: 0 8px; /* adjust spacing left/right */
}

/* Wrapper around the value/input */
.Select-multi-value-wrapper {
  flex: 1 1 auto;
  display: flex;
  align-items: center; /* ✅ center the text */
  min-width: 0; /* allows wrapping/truncating */
  line-height: 1.3;
}

/* Selected value text */
.Select-value,
.Select-placeholder {
  display: flex;
  align-items: center;
  white-space: normal; /* allow wrapping if needed */
  padding-right: 28px; /* leave space for icons */
}

/* Icons (X + arrow) */
.Select-clear-zone,
.Select-arrow-zone {
  display: flex;
  align-items: center; /* ✅ vertical centering */
  margin-left: 6px;
  flex: 0 0 auto; /* don’t stretch */
}

.note {
  padding-top: 30px;
  margin-bottom: 0px;
}

.footnote {
  padding-top: 10px;
}
.multi-footnote {
  padding-top: 0px;
}

.fixed-logo {
  position: absolute;
  top: 16px; /* adjust spacing */
  right: 40px; /* adjust spacing */
  height: 60px; /* scale logo */
  z-index: 1000; /* keep it above other content */
}

.select-hospital-text {
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  text-align: center;
  max-width: 220px;
}

.datatable-ppt {
  padding: 12px 16px;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th div,
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td div {
  display: flex;
  justify-content: center; /* center horizontally */
  align-items: center; /* center vertically */
  text-align: center;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th div {
  font-weight: 700;
  font-size: 16px;
  padding: 12px 10px;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td div {
  font-size: 16px;
  padding: 10px 8px;
}

/* Optional: soften zebra color to match PPT */
.dt-zebra-odd {
  background: #f4f2f8; /* very light purple/gray */
}

/* ---- DataTable: center headers correctly ---- */
.datatable-ppt .dash-spreadsheet-inner th {
  /* keep the native table-cell behavior */
  text-align: center;
  vertical-align: middle;
}

/* remove the empty spacer that offsets header titles */
.datatable-ppt .dash-spreadsheet-inner th .column-actions {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* center inner header wrappers without changing th display type */
.datatable-ppt .dash-spreadsheet-inner th div,
.datatable-ppt .dash-spreadsheet-inner th .column-header-name {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

/* defensive: center body cell content too */
.datatable-ppt .dash-spreadsheet-inner td div {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ---- Style ONLY the final data row ---- */
.datatable-ppt .dash-spreadsheet-inner tbody tr:last-child td {
  background-color: #ffffff;
  font-weight: 700;
  color: #120223;
  border-top: 2px solid #7a22e8 !important; /* stronger PPT-style line */
  position: relative;
  z-index: 1; /* bring above previous row */
}

.quality-datatable-ppt {
  width: 100% !important;
  max-width: none !important;
}

.three-column-number {
  font-weight: 900;
  padding: 10px 0 5px;
  font-size: 26px;
}

.three-column-head {
  font-weight: 900;
  font-size: 32px;
}

.dropdown-controls-top {
  background-color: var(--dark-color);
  color: #fff;
  width: 100%;
  padding: 20px 30px;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  margin: 0 0 16px 0; /* spacing below */
  display: flex;
  flex-wrap: wrap; /* if you add more items later */
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

.three-column-top {
  background-color: var(--dark-color);
  color: #fff;
  width: 100%;
  padding: 20px 40px;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  margin: 0 0 16px 0; /* spacing below */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.three-column-top p {
  margin-bottom: 0;
}

.three-column-top-col {
  font-size: 20px;
  width: 33%;
  text-align: center;
  line-height: 1.2;
}

.info-box {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-top: auto; /* 👈 pushes the box to the bottom */
}

.info-box-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.info-box-text {
  font-size: 18px;
  line-height: 1.4;
  color: var(--text);
}

.info-box-top-right {
  padding: 24px 50px !important;
  margin-top: 0;
  background-color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-box-title-top {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #ffffff;
}

.info-box-text-top {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 0;
  padding: 2px 0px;
}

.page-callout-bottom {
  padding: 20px 40px;
  margin: 16px 0;
}

.page-callout-bottom h2 {
  text-align: center;
  font-size: 28px;
}

.blood-callout-bottom {
  padding: 20px 40px;
  margin: 16px 0;
}

.blood-callout-bottom h2 {
  text-align: left;
  line-height: 1.3;
  padding: 20px 40px;
}

.quality-datatable-ppt {
  padding: 12px 16px;
  font-family: "Lato", sans-serif;
}

/* ---- DataTable: center headers correctly ---- */
.quality-datatable-ppt .dash-spreadsheet-inner th {
  /* keep the native table-cell behavior */
  text-align: center;
  vertical-align: middle;
}

/* remove the empty spacer that offsets header titles */
.quality-datatable-ppt .dash-spreadsheet-inner th .column-actions {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* center inner header wrappers without changing th display type */
.quality-datatable-ppt .dash-spreadsheet-inner th div,
.quality-datatable-ppt .dash-spreadsheet-inner th .column-header-name {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

/* defensive: center body cell content too */
.quality-datatable-ppt .dash-spreadsheet-inner td div {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* --- Make Quality table use the same font as the rest of the app --- */
.quality-datatable-ppt,
.quality-datatable-ppt .dash-spreadsheet-inner,
.quality-datatable-ppt .dash-spreadsheet-inner th,
.quality-datatable-ppt .dash-spreadsheet-inner td,
.quality-datatable-ppt .dash-spreadsheet-inner div {
  font-family: inherit !important; /* inherit from body / theme */
  font-variant-numeric: tabular-nums; /* cleaner numeric columns */
  font-feature-settings: "tnum" 1; /* fallback for tabular numbers */
}

/* Dash DataTable (prevents accidental monospace fallbacks) */
.dash-table-container .dash-spreadsheet,
.dash-table-container .dash-spreadsheet td,
.dash-table-container .dash-spreadsheet th {
  font-family: var(--app-font) !important;
  font-weight: 400;
}

/* Plotly SVG text (ticks, legends, titles, hovers) also inherit Lato */
.plotly .gtitle,
.plotly .xtick text,
.plotly .ytick text,
.plotly .legendtext,
.plotly .hovertext,
.plotly .annotation text {
  font-family: var(--app-font);
}

.right-side-callout {
  background-color: var(--dark-color);
  color: #fff;
  text-align: left;
  width: 300px;
  height: 100%;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px 40px;
}

.right-side-callout-wide {
  width: 400px;
  text-align: center;
  height: auto;
}

.right-side-callout li {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.right-side-callout p {
  font-size: 20px;
  text-align: center;
  line-height: 1.2;
  padding-bottom: 0;
}

.right-side-callout h4 {
  font-size: 32px;
  color: #fff;
  font-weight: 900;
}

.right-side-callout-wide h4 {
  font-size: 36px;
  line-height: 1.3;
}

.right-side-callout-number {
  font-size: 72px;
  line-height: 1;
  font-weight: 900;
  text-align: center;
}

.blood-test-table .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th div {
  font-size: 18px;
  font-weight: 800;
  border: none;
  height: 40px !important;
}

.datatable-ppt .dash-spreadsheet-inner tbody tr:last-child td {
  border-top: 2px solid var(--bright) !important;
}

.blood-test-table .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td div {
  font-size: 18px;
}

/* Lung Function */
/* Two-column grid */
.lf-grid {
  display: grid;
  grid-template-columns: minmax(360px, 30%) 1fr; /* left | right */
  gap: 28px;
  align-items: stretch; /* equal column height */
  margin: 0 auto;
}

/* LEFT: purple panel (flex column so card can pin to bottom) */
.lf-left {
  background: var(--dark-color);
  color: #fff;
  border-radius: 12px;
  padding: 28px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Left panel type */
.lf-left-h2 {
  color: #fff;
  font-weight: 900;
  line-height: 1.2;
  font-size: 28px;
  margin: 0 0 4px;
}
.lf-list {
  margin: 0 0 8px;
  padding-left: 26px;
  font-size: 20px;
  line-height: 1.35;
}
.lf-list li {
  margin: 10px 0;
}

.lf-list-icons {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lf-list-icons li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #fff;
  font-size: 20px;
  line-height: 1.35;
}

.lf-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.lf-list-icons li span {
  flex: 1;
  display: block;
}

.lf-sub {
  font-size: 18px;
  margin: 4px 0 12px;
}
.lf-bold {
  font-weight: 900;
  font-size: 24px;
  line-height: 1.3;
}

/* CTA button (don’t stretch) */
.lf-cta {
  background: var(--bright);
  border: 1px solid #000000;
  font-weight: 800;
  font-size: 20px;
  padding: 12px 22px;
  border-radius: 10px;
  width: 100%;
  text-align: center;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: auto;
  white-space: nowrap;
  align-self: flex-start;
}

.lf-cta:hover {
  background-color: var(--muted);
  color: var(--dark-color);
}

.lf-card {
  gap: 20px;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: auto; /* pin to bottom of purple panel */
  text-align: center;
}
.lf-card-title-top {
  font-weight: 900;
  font-size: 36px;
  line-height: 1;
  color: var(--dark-color);
  margin: 10px 0;
}
.lf-card-sub {
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: var(--dark-color);
  margin: 15px 0 25px;
}
.lf-card-text {
  margin: 15px 0 5px;
  font-size: 22px;
  line-height: 1.28;
  color: #111;
}

/* RIGHT column */
.lf-right {
  min-width: 0;
} /* allow shrink without overflow */
.lf-right .section-header {
  margin: 6px 0 14px;
}

.lf-donut-wrap {
  margin-block: 20px; /* top & bottom gap outside the card */
  padding-block: 18px; /* space inside the card around the pie */
}

.lf-donut-container {
  position: relative;
  width: 100%;
  height: 460px; /* pick the size you want */
  margin-block: 24px; /* space above & below the pie */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* prevent SVG from bleeding past margins */
}

.lf-donut-container .dash-graph {
  position: relative;
  z-index: 1;
}
.lf-donut-center {
  position: absolute;
  z-index: 2;
  text-align: center;
  color: var(--dark-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.lf-donut-number {
  color: var(--bright);
  font-size: 110px; /* keep your chosen size */
  font-weight: 900;
  margin: 0;
  line-height: 1;
}
.lf-donut-label {
  font-size: 24px; /* keep your chosen size */
  font-weight: 900;
  line-height: 1.2;
  margin: 4px 0 0;
}

/* Modal */
.lf-modal {
  color: var(--text);
  background-color: var(--muted);
}
.lf-modal .modal-content {
  border-radius: 16px;
  color: var(--text);
  background-color: var(--muted);
}
.lf-modal-body {
  padding: 12px 18px 12px;
}
.lf-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.lf-bullets {
  font-size: 24px;
  line-height: 1.35;
}
.lf-bullets li {
  margin: 10px 0;
}

.modal-note {
  margin: 5px;
}

.btn-outline-light {
  color: #fff;
  outline: #fff;
}

.btn-outline-light:hover {
  background-color: var(--muted);
  color: var(--dark-color);
  font-weight: bold;
}

/* --- Lung Function Modal Close Button (rounded square) --- */
.lf-close-btn {
  color: #fff;
  background-color: var(--bright);
  border-color: var(--bright);
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 10;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* hover / focus */
.lf-close-btn:hover,
.lf-close-btn:focus {
  background: var(--dark-color);
  border: var(--dark-color);
  color: #fff;
  outline: none;
  transform: scale(1.05);
}

/* pressed state */
.lf-close-btn:active {
  transform: scale(0.94);
}

.Select__control,
.dash-dropdown,
.form-control {
  background: none !important;
}

.sdoh-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 260px;
  max-width: 360px;
  flex: 0 0 340px; /* fixed-ish column on the right */
}

.sdoh-right-title {
  font-weight: 900;
  font-size: 27px;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 16px;
  color: var(--dark-color);
}

/* Base card styling – background driven by --card-bg */
.sdoh-metric-card {
  --card-bg: var(--dark-color); /* default */
  background: var(--card-bg);
  color: #ffffff;

  padding: 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 2px solid var(--panel-border);
}

/* Per-card colors */
.sdoh-metric-card-prevalence {
  --card-bg: var(--dark-color);
}
.sdoh-metric-card-hosp {
  --card-bg: var(--bright);
}
.sdoh-metric-card-ed {
  --card-bg: #555555;
}

.sdoh-metric-title {
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
}

.sdoh-metric-row {
  display: flex;
  align-items: center;
}

.sdoh-metric-col {
  flex: 1 1 auto;
  text-align: center;
}

/* Ratio pill on the right – text color follows card bg */
.sdoh-metric-col-ratio {
  flex: 0 0 70px;
  text-align: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 4px;
  margin-left: 6px;
  color: var(--card-bg);
  border: 2px solid var(--panel-border);
}

/* Reused text styles */
.metric-label {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.metric-value {
  font-size: 28px;
  font-weight: 900;
  margin-top: 4px;
}

.metric-ratio {
  font-size: 24px;
  font-weight: 900;
  margin-top: 2px;
}

.sdoh-map-panel {
  display: flex;
  flex-direction: column;
}

/* Legend + map row */
.sdoh-map-content {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: auto;
  margin-bottom: auto;
}

.sdoh-map-legend {
  flex: 0 0 230px;
  max-width: 275px;
  font-size: 16px;
  margin-left: 4px;
}
.sdoh-map-legend-column {
  flex: 0 0 230px;
  max-width: 275px;
  padding-left: 16px;
}

.sdoh-legend-title {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 12px;
}

.sdoh-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sdoh-legend-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid var(--panel-border);
  display: inline-block;
}

.sdoh-legend-q4 {
  background-color: #9a5b63;
}
.sdoh-legend-q3 {
  background-color: #ead5b2;
}
.sdoh-legend-q2 {
  background-color: #94ddf3;
}
.sdoh-legend-q1 {
  background-color: #cce5c4;
}

.sdoh-legend-label {
  font-size: 16px;
}

/* Map column */
.sdoh-map-image-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Let the SDoH map card stretch to fill remaining space next to fixed right panel */
.sdoh-map-wide {
  flex: 1 1 auto;
  max-width: none; /* override row-section-2up max-width: 50% */
}

/* SDOH map + right panel row: keep cards side-by-side */
.sdoh-row {
  flex-wrap: nowrap;
}

.gauges-section {
  display: grid;
  grid-template-columns: 80px repeat(3, minmax(0, 1fr));
  grid-template-rows: 170px auto 170px;
  column-gap: 28px;
  row-gap: 10px;
  align-items: center;
  padding: 16px;
  height: auto;
  min-height: 390px;
}

.gauges-year {
  font-family: Arial Black;
  font-size: clamp(22px, 3.6vh, 34px);
  line-height: 1;
  justify-self: start;
}

.gauge-cell {
  width: 100%;
  height: 170px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* Make the Plotly graph fully fill the cell */
.gauge-cell .js-plotly-plot,
.gauge-cell .plot-container,
.gauge-cell .svg-container {
  height: 100% !important;
  width: 100% !important;
}

/* Labels row spanning the 3 gauge columns */
.gauge-labels-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  align-items: start;
  font-size: 14px;
  margin-top: 2px;
}

.gauge-labels-row .cell {
  white-space: nowrap;
}

.gauge-label-cell {
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
  margin-top: 2px;
}

.triple-rx-table th[data-dash-column="triple_count"] {
  border-left: 2px solid #ffffff !important;
}

.triple-rx-table .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:nth-child(1) th div {
  font-size: 20px !important;
  font-weight: 800;
  height: 30px;
}

.triple-rx-table .dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:nth-child(2) th div {
  font-size: 16px !important;
  line-height: 18px !important;
  font-weight: 600;
  height: 30px;
}

.iped-volume-table .dash-spreadsheet-inner tr:first-child th:nth-child(3) {
  border-left: 2px solid #ffffff !important;
  border-right: 0 !important;
}

.iped-volume-table .dash-spreadsheet-inner tr:nth-child(2) th[data-dash-column="ED_2022"] {
  border-left: 2px solid #ffffff !important;
}

.iped-volume-table .dash-spreadsheet-inner td[data-dash-column="ED_2022"] {
  border-left: 2px solid var(--bright) !important;
}

/* First header row (IP Cases / ED Cases) */
.iped-volume-table .dash-spreadsheet-inner tr:first-child th div {
  font-size: 18px !important;
  font-weight: 800 !important;
}

/* Second header row (Market / 2022 / 2023) */
.iped-volume-table .dash-spreadsheet-inner tr:nth-child(2) th div {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.sidebar-export-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 40px;
  flex-shrink: 0;
}

.sidebar-export-button .export-label {
  position: relative;
  z-index: 1;
}

.sidebar-export-button.export-loading {
  color: #fff !important;
  background: var(--dark-color, #200043) !important;
  border-color: #fff !important;
  opacity: 1 !important;
}

.sidebar-export-button.export-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bright, #6e04e2);
  transform-origin: left;
  animation: export-fill 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes export-fill {
  0% {
    transform: scaleX(0);
    opacity: 1;
  }

  80% {
    transform: scaleX(1);
    opacity: 1;
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

.page-disclaimer {
  max-width: 1000px;
  margin: 20px auto;
  text-align: center;
  text-transform: uppercase;
  font-size: 12px;
}

.sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bright);
  color: white;
  width: 200px;
  padding: 12px 24px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  border: none;
  transition: background 0.2s;
  cursor: pointer;
}

.login-body {
  font-family: var(--app-font);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--bg);
  margin: 0;
}

.login-card {
  background: white;
  padding: 20px 40px 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
}

.login-card p {
  margin-bottom: 40px;
}

.sso-btn:hover {
  background-color: var(--dark-color);
}
.ms-icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
}
.logout-btn {
  color: #ff3b30;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  margin-top: 20px;
}

.login-logo {
  max-width: 200px;
}

.sign-out-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  margin: 50px auto 0;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
  border-radius: 6px;
}

.sign-out-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-color: var(--muted);
  -webkit-mask: url("sign-out.svg") center / contain no-repeat;
  mask: url("sign-out.svg") center / contain no-repeat;
  transition: background-color 0.15s ease;
}

.sign-out-button:hover .sign-out-icon {
  background-color: #a855f7;
}

.sign-out-button:hover {
  color: #a855f7;
}

#left-sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  box-sizing: border-box;
}

.sign-out-section {
  margin-top: auto;
  padding: 24px 0 20px;
  flex-shrink: 0;
}
