/* =============================================================================
   app.css - component styles of the ometer apps (overview tiles, cards,
   popups, imprint, feedback). Moved here from the CSS block in app.R.
   Loaded after theme.css and styles.css. Values come from theme.css.
   ============================================================================= */

/* Same gap between the tab bar and the tab content */
#tabs + .tab-content > .tab-pane { padding-top: 16px; }

/* Header: logo, wordmark and tagline left, tabs as text links right,
   a line below. The tabs sit at the top, level with the wordmark; the
   active tab gets a short red underline right under its text. */
.om-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
             gap: 0 24px; padding: 8px 0 0; color: var(--om-page-text);
             border-bottom: 3px solid var(--om-page-rule); }
.om-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; }
.om-logo { width: 56px; height: 56px; border-radius: var(--om-radius-card); }
.om-tagline { color: var(--om-page-text-soft); }
.om-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; align-self: flex-start; padding-top: 6px; margin-left: auto; }
.om-nav a { color: var(--om-page-text-soft); font-size: var(--fs-sub); padding: 2px 0 4px;
            border-bottom: 3px solid transparent; text-decoration: none; }
.om-nav a:hover, .om-nav a:focus { color: var(--om-page-text); text-decoration: none; }
.om-nav a:focus-visible { outline: 2px solid var(--om-page-text); outline-offset: 2px; }
.om-nav a.active { color: var(--om-page-text); font-weight: 700; border-bottom-color: var(--om-brand); }
/* Language switch (Biel): right of the tabs, same line and size */
.om-lang { align-self: flex-start; padding: 8px 0 4px; font-size: var(--fs-sub); color: var(--om-page-text-soft); }
.om-lang .active { color: var(--om-page-text); font-weight: 700; }
.om-lang-sep { margin: 0 6px; }
.om-lang a { color: var(--om-page-text-soft); text-decoration: none; }
.om-lang a:hover, .om-lang a:focus { color: var(--om-page-text); text-decoration: underline; text-underline-offset: 3px; }
/* Phone: the tabs move to the bottom bar, the language switch stays */
@media (max-width: 620px) {
  .om-nav { display: none; }
  .om-lang { margin-left: auto; align-self: center; padding: 0 0 14px; }
  .om-logo { width: 44px; height: 44px; }
}

/* Footer: one line on Nacht, items separated by a middle dot. The space
   below keeps the feedback button (fixed bottom right) off the text. */
.om-footer { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 32px; padding: 16px 0 56px;
             border-top: 1px solid var(--om-page-rule); font-size: var(--fs-note);
             color: var(--om-page-text-muted); }
.om-footer > * + *::before { content: "\00b7"; display: inline-block; margin: 0 8px; color: var(--om-page-text-muted); }
.om-footer a { color: var(--om-page-text-soft); text-decoration: underline; text-underline-offset: 3px; }
.om-footer a:hover, .om-footer a:focus { color: var(--om-page-text); }

/* Test-phase line under the header (config.R: test_notice) */
.test-notice { margin: 8px 0 4px; font-size: var(--fs-note); color: var(--om-page-text-muted); }
.test-notice > * + *::before { content: "\00b7"; display: inline-block; margin: 0 8px; }
.test-notice a { color: var(--om-page-text-soft); text-decoration: underline; text-underline-offset: 3px; }
.test-notice a:hover, .test-notice a:focus { color: var(--om-page-text); }

/* Colours, font sizes and fonts: see www/css/theme.css */

/* Value boxes: neutral, flat, slightly rounded */
.overview-tab .small-box {
  background: var(--om-surface) !important;
  color: var(--om-text) !important;
  border: 1px solid var(--om-border);
  border-radius: var(--om-radius-card);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.overview-tab .small-box .icon { color: var(--om-ink-faint) !important; }

/* Warning level -> colour of the number (server-side classes stay unchanged) */
.overview-tab .small-box.bg-light-blue .inner h3 { color: var(--om-level-ok); }
.overview-tab .small-box.bg-yellow     .inner h3 { color: var(--om-level-mild); }
.overview-tab .small-box.bg-orange     .inner h3 { color: var(--om-level-warm); }
.overview-tab .small-box.bg-red        .inner h3 { color: var(--om-level-danger); }

/* Boxes (station list, data download, info, health): flat with accent line */
.box {
  border-radius: var(--om-radius-card) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.06) !important;
  border: 1px solid var(--om-border) !important;
  border-top: 1px solid var(--om-border) !important;
}
/* myurbanclimate-style header (light) for all status variants; !important beats AdminLTE/styles.css */
.box.box-solid.box-primary > .box-header,
.box.box-primary > .box-header {
  background: var(--om-card-head-bg) !important;
  color: var(--om-text) !important;
  border-bottom: 1px solid var(--om-border);
  border-radius: var(--om-radius-card) var(--om-radius-card) 0 0;
}
.box.box-solid.box-primary > .box-header .box-title { color: var(--om-text) !important; }

/* ---- Overview: one grid synchronised across all three columns ----
   --ov-box: height of EVERY box (L1-L4 and M1), the only setting to change
   --ov-gap: vertical gap (= AdminLTE default 20px, do not change)
   Map = 3 box heights + 2 gaps  =>  the middle column (M1 + map) ends
   exactly at the bottom edge of L4. No vh, no aspect-ratio: everything
   depends on --ov-box.                                              */
.overview-tab { --ov-box: 152px; --ov-gap: 20px; --map-hdr: 42px; /* height of the map card header */ }
.overview-tab > .row { display: flex; flex-wrap: wrap; }
.overview-tab > .row > div[class*='col-'] { display: flex; flex-direction: column; }
@media (min-width: 768px) {
  .overview-tab > .row > .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
  .overview-tab > .row > .col-sm-6 { flex: 0 0 50%; max-width: 50%; }

  /* Left column: four boxes of equal size */
  .overview-tab > .row > .col-sm-3:first-child > .shiny-html-output { margin-bottom: var(--ov-gap); min-height: 0; }
  .overview-tab > .row > .col-sm-3:first-child > .shiny-html-output:last-child { margin-bottom: 0; }
  #Hitzegefahr, #Max_Temp_Today, #tempNextNightBox, #tempRankBox { flex: 0 0 var(--ov-box); }
  .overview-tab > .row > .col-sm-3:first-child .small-box { height: 100%; margin-bottom: 0; overflow: hidden; }

  /* Middle column: M1 exactly one box high, map = rest down to the bottom of L4 */
  #current_temperature_oldtown .small-box { height: var(--ov-box); overflow: hidden; }
  #mapRealTime_front { height: calc(3 * var(--ov-box) + 2 * var(--ov-gap) - var(--map-hdr)) !important; width: 100%; }

  /* Right column: one box over the full grid height */
  #stationsBox, #allStationsBox { flex: 1 1 0; }
}
@media (max-width: 767px) {
  /* Mobile: everything stacks with natural heights */
  .overview-tab > .row > div[class*='col-'] { flex: 0 0 100%; max-width: 100%; height: auto; }
}
/* Middle column: inner container uses the full column width */
.overview-tab .current-col > .container-fluid { width: 100%; padding-left: 0; padding-right: 0; }

.dlx-hint { color: var(--om-text-muted); font-size: 90%; margin-top: 6px; }
/* Build-up phase notice ("Daten" tab), like the warning box on myurbanclimate.ch */
.aufbau-banner { display: flex; gap: 12px; align-items: flex-start;
                  background: var(--om-notice-bg); border: 1px solid var(--om-notice-border);
                  border-left: 5px solid var(--om-level-mild); border-radius: var(--om-radius-card);
                  padding: 14px 18px; margin-bottom: 16px; }
.aufbau-banner-icon { color: var(--om-level-mild); font-size: 1.4em; line-height: 1.4;
                       flex: 0 0 auto; margin-top: 1px; }
.aufbau-banner-body p { margin: 0 0 8px; font-size: var(--fs-card-body);
                         line-height: 1.55; color: var(--om-text); }
.aufbau-banner-body p:last-child { margin-bottom: 0; }
/* Card style: ALL boxes outside the overview plus the muc-card divs */
.tab-pane:not(.overview-tab) .box,
.muc-card { background: var(--om-surface); border: 1px solid var(--om-border); border-radius: var(--om-radius-card);
            box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tab-pane:not(.overview-tab) .box > .box-header,
.muc-card > .muc-card-header { background: var(--om-card-head-bg); color: var(--om-text);
                               border-bottom: 1px solid var(--om-border);
                               border-radius: var(--om-radius-card) var(--om-radius-card) 0 0; }
/* Imprint: three cards of equal height in the grid */
.imp-grid { display: flex; flex-wrap: wrap; }
.imp-grid > div[class*='col-'] { display: flex; flex-direction: column; }
.imp-grid .muc-card { flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; }
.imp-grid .muc-card .muc-card-body { flex: 1 1 auto; }
/* Disclaimer and privacy: shared card 'Impressum & Datenschutz' with the date
   of the current version; inside an accordion (native <details>/<summary>),
   styled like the cards on the rest of the page, but as a sub-level slightly
   smaller and lighter than the card header. */
.imp-legal-card { margin-top: 16px; background: var(--om-surface); border: 1px solid var(--om-border);
                   border-radius: var(--om-radius-card); box-shadow: 0 1px 3px rgba(0,0,0,.06); overflow: hidden; }
.imp-legal-header { display: flex; align-items: center; gap: 9px; padding: 10px 16px;
                     background: var(--om-card-head-bg); color: var(--om-text);
                     border-bottom: 1px solid var(--om-border);
                     font-size: var(--fs-cardtitle); font-weight: 600; }
.imp-legal-stand { padding: 10px 16px 0; font-size: var(--fs-note); color: var(--om-text-muted); }
.imp-accordion { margin: 10px 16px 16px; border: 1px solid var(--om-border);
                 border-radius: var(--om-radius-card); overflow: hidden; }
.imp-acc-item { border-bottom: 1px solid var(--om-border); }
.imp-acc-item:last-child { border-bottom: none; }
.imp-acc-header { display: flex; align-items: center; justify-content: space-between;
                   gap: 12px; padding: 8px 14px; cursor: pointer; user-select: none;
                   list-style: none; background: var(--om-subtle-bg); color: var(--om-text); }
.imp-acc-header::-webkit-details-marker { display: none; }
.imp-acc-header:hover { background: var(--om-card-head-bg); }
.imp-acc-title i { margin-right: 7px; opacity: .8; }
.imp-acc-chevron { transition: transform .2s ease; opacity: .7; flex: 0 0 auto; }
.imp-acc-item[open] > .imp-acc-header .imp-acc-chevron { transform: rotate(180deg); }
.imp-acc-item[open] > .imp-acc-header { border-bottom: 1px solid var(--om-border); }
.imp-acc-body { padding: 14px 16px; font-size: var(--fs-card-body); line-height: 1.55; }
.imp-acc-body p { margin: 0 0 9px; font-size: inherit; }
.imp-acc-body p:last-child { margin-bottom: 0; }
.imp-acc-body h5 { font-weight: 600; margin: 16px 0 5px; font-size: var(--fs-sub); }
.imp-acc-body h5:first-child { margin-top: 0; }
/* Map cards: header with title left and controls right, map without border */
.muc-map-card { overflow: hidden; }
.muc-map-card > .muc-card-header { display: flex; align-items: center;
                                   justify-content: space-between; gap: 12px;
                                   flex-wrap: wrap; padding: 8px 14px; }
.muc-map-card .muc-map-title { display: flex; align-items: center; gap: 8px; }
.muc-map-card .muc-card-header .form-group { margin-bottom: 0; }
.muc-map-card .muc-map-body { padding: 0; }
.muc-map-card .leaflet { border-radius: 0 0 var(--om-radius-card) var(--om-radius-card) !important; }
/* Info texts: coloured bullet points (warning levels) */
.doc-bullet { display: flex; align-items: baseline; gap: 9px; margin: 3px 0 3px 4px; }
.doc-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px;
           position: relative; top: 1px; }
/* One font family for everything (Lato, defined in css/theme.css).
   !important is needed because shinydashboard sets its own fonts. */
body, .content-wrapper, h1, h2, h3, h4, h5, h6,
.btn, .form-control, table.dataTable, .nav-tabs > li > a, .small-box {
  font-family: var(--om-font) !important; }

/* Type hierarchy in the cards (imprint, info texts): card title > subheading >
   body text > footnote. Replaces the inline sizes used earlier (0.85rem etc.). */
.muc-card .muc-card-body,
.tab-pane:not(.overview-tab) .box > .box-body { font-size: var(--fs-card-body); line-height: 1.55; }
.tab-pane:not(.overview-tab) .box > .box-body p,
.tab-pane:not(.overview-tab) .box > .box-body li,
.tab-pane:not(.overview-tab) .box > .box-body .doc-bullet { font-size: inherit; }
/* Subheadings in the data and info tabs (existing h3) on the same level
   as h5 in the cards */
.tab-pane:not(.overview-tab) .box > .box-body h3 { margin: 18px 0 5px; }
.tab-pane:not(.overview-tab) .box > .box-body h3:first-child { margin-top: 2px; }
.muc-card .muc-card-body p { font-size: inherit; margin: 0 0 9px; }
.muc-card .muc-card-body .imp-note,
.muc-card .muc-card-body p.text-muted { font-size: var(--fs-note); color: var(--om-text-muted); }
.muc-card > .muc-card-header { padding: 10px 16px; }
.muc-card > .muc-card-header i { margin-right: 7px; opacity: .8; }
.muc-card .muc-card-body { padding: 14px 16px; }
.muc-card .muc-card-body h5 { margin: 18px 0 5px; }
.muc-card + .muc-card { margin-top: 16px; }
/* Feedback button and dialog */
#fbBadge { position: fixed; right: 16px; bottom: 16px; z-index: 2000; }
/* Mobile: the fixed .icon-bar sits at the bottom (z 9999) -> button above it */
@media (max-width: 620px) {
  #fbBadge { right: 10px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  #fbBadge .btn { padding: 5px 12px; }
}
#fbBadge .btn { background: var(--om-surface); color: var(--om-text); border: 1px solid var(--om-border);
                border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
                font-size: var(--fs-note); padding: 6px 14px; }
#fbBadge .btn:hover { background: var(--om-subtle-bg); }
.fb-smileys .btn { font-size: var(--fs-icon-lg); line-height: 1; background: var(--om-surface); border: 1px solid var(--om-border);
                   border-radius: var(--om-radius-btn); width: 64px; height: 52px; margin: 0 6px; }
.fb-smileys .btn:hover, .fb-smileys .btn:focus { border-color: var(--om-text); background: var(--om-subtle-bg); }
/* Dialogs (feedback, popups) */
.modal-content { border-radius: var(--om-radius-dialog); }
/* Time stamp in box titles */
.box-stamp { display: block; margin: 2px 0 0; font-weight: normal; opacity: .85; font-size: var(--fs-note); }
.uhi-note { color: var(--om-text-muted); font-size: var(--fs-note); margin: 8px 2px 0; }

/* Map tooltips and popups in dark style (scale colours stay readable) */
.leaflet-tooltip.map-ttip { background: var(--om-tooltip-bg); color: var(--om-text-on-dark); border: none;
                            box-shadow: 0 2px 8px rgba(0,0,0,.4); border-radius: 6px; padding: 8px 11px; }
.leaflet-tooltip.map-ttip:before { display: none; }
.leaflet-popup-content-wrapper { background: var(--om-tooltip-bg); color: var(--om-text-on-dark); border-radius: 6px; }
.leaflet-popup-tip { background: var(--om-tooltip-bg); }
.pop-card .pop-loc { font-size: var(--fs-pop-sm); }
.pop-card .pop-temp { font-size: var(--fs-pop); font-weight: 700; margin: 3px 0; }
.pop-card .pop-uhi { font-size: var(--fs-pop-sm); }
.pop-card i { font-size: 82%; margin-right: 5px; opacity: .75; }
.pop-big .pop-loc, .pop-big .pop-uhi { font-size: var(--fs-pop-md); }
/* Click popup: label on two lines left, value large right (centred over both lines) */
.pop-big { min-width: 230px; }
.pop-big .pop-temp { display: flex; align-items: center; justify-content: space-between;
                     gap: 14px; margin: 6px 0; }
.pop-big .pop-temp-label { display: flex; align-items: center; font-size: var(--fs-pop-md);
                           font-weight: 600; line-height: 1.3;
                           text-shadow: 0 0 1px rgba(0,0,0,.35); }
.pop-big .pop-temp-label i { font-size: var(--fs-icon-lg); margin-right: 9px; }
.pop-big .pop-temp-label .pop-temp-words { display: inline-block; text-align: left; }
.pop-big .pop-temp-val { font-size: var(--fs-pop-big); font-weight: 700; white-space: nowrap;
                         margin-left: auto; text-shadow: 0 0 1px rgba(0,0,0,.35); }

/* Warning colour on the left box edge and status colours (L1/L3/L4) */
.overview-tab .small-box { border-left: 5px solid transparent; border-radius: var(--om-radius-card) !important; }
.overview-tab .small-box.bg-green  { border-left-color: var(--om-level-good); }
.overview-tab .small-box.bg-green  .inner h3 { color: var(--om-level-good); }
.overview-tab .small-box.bg-orange { border-left-color: var(--om-level-warm); }
.overview-tab .small-box.bg-red    { border-left-color: var(--om-level-danger); }
.overview-tab .box, .overview-tab .leaflet { border-radius: var(--om-radius-card) !important; }

/* Icons: small badges top right (shinydashboard uses .icon-large!) */
.overview-tab .small-box .icon, .overview-tab .small-box .icon-large {
  position: absolute !important; top: 10px !important; right: 10px !important;
  left: auto !important; bottom: auto !important;
  width: 34px; height: 34px; line-height: 34px; font-size: var(--fs-icon) !important;
  text-align: center; border-radius: 9px; z-index: 1;
  background: var(--om-ink-faint); color: var(--om-text) !important; opacity: 1;
}
.overview-tab .small-box .icon i, .overview-tab .small-box .icon-large i { font-size: var(--fs-icon); line-height: 34px; }
.overview-tab .small-box.bg-green  .icon, .overview-tab .small-box.bg-green  .icon-large { background: var(--om-level-good-tint); color: var(--om-level-good) !important; }
.overview-tab .small-box.bg-orange .icon, .overview-tab .small-box.bg-orange .icon-large { background: var(--om-level-warm-tint); color: var(--om-level-warm) !important; }
.overview-tab .small-box.bg-red    .icon, .overview-tab .small-box.bg-red    .icon-large { background: var(--om-level-danger-tint); color: var(--om-level-danger) !important; }
.overview-tab .small-box.bg-light-blue .icon, .overview-tab .small-box.bg-light-blue .icon-large { background: var(--om-ink-faint); color: var(--om-level-ok) !important; }
.overview-tab .small-box.bg-yellow .icon, .overview-tab .small-box.bg-yellow .icon-large { background: var(--om-level-mild-tint); color: var(--om-level-mild) !important; }
.ov-map-toggle .radio-inline { font-size: var(--fs-note); font-weight: 400; margin-top: 0; }
.ov-map-toggle .form-group, .ov-map-toggle .shiny-input-container { margin-bottom: 0; }
/* L2 and L4 are clickable (popup with podium and histogram) */
#tempRankBox .small-box, #Max_Temp_Today .small-box { cursor: pointer; }
#tempRankBox .small-box::after, #Max_Temp_Today .small-box::after {
  content: '\f065'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; bottom: 6px; right: 10px; font-size: var(--fs-note);
  color: var(--om-ink-soft); pointer-events: none; }
/* Podium in the popup */
.pod-title { font-weight: 600; font-size: var(--fs-cardtitle); margin: 6px 0 10px; }
.pod-wrap { display: flex; align-items: flex-end; justify-content: center; gap: 22px; margin: 4px 0 18px; }
.pod-col { text-align: center; min-width: 92px; }
.pod-temp { font-weight: 700; margin-bottom: 4px; }
.pod-bar { background: var(--om-card-head-bg); border: 1px solid var(--om-border); border-radius: var(--om-radius-card) var(--om-radius-card) 0 0;
           display: flex; align-items: flex-start; justify-content: center; }
.pod-rank { font-weight: 700; color: var(--om-text-muted); margin-top: 4px; }
.pod-date { font-size: var(--fs-note); color: var(--om-text-muted); margin-top: 4px; }
.overview-tab .small-box .inner { padding-right: 48px; }

/* Typography matched to the station box:
   statement = box title, bold | subheader = .table-sub, normal |
   explanation = .uhi-note, muted (sizes from theme.css) */
.overview-tab > .row > .col-sm-3:first-child .small-box .inner h3 { font-size: var(--fs-num); margin: 0 0 3px; }
.overview-tab .small-box .inner h3 .value-box-text,
.overview-tab .small-box .inner h3 p.value-box-text { font-size: var(--fs-statement) !important; font-weight: 700; margin: 0; }
.overview-tab .small-box .inner p { font-size: var(--fs-sub) !important; font-weight: 400; line-height: 1.3; margin: 0 0 2px; }
/* Colour: all text dark, except the statement (inherits the warning colour from h3), the status line (inline colour) and the notes (muted) */
.overview-tab .small-box .inner p:not(.vb-status):not(.vb-note):not(.value-box-text) { color: var(--om-text) !important; }
.small-box .vb-status { font-size: var(--fs-sub) !important; font-weight: 600; margin: 3px 0 0; }
.overview-tab .small-box .inner p.vb-note,
.small-box .vb-note { font-size: var(--fs-note) !important; font-weight: 400; color: var(--om-text-muted) !important; line-height: 1.35;
                      margin: 6px 0 0; padding-top: 5px; border-top: 1px dashed var(--om-border); }
.small-box .vb-note .lg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%;
                              margin: 0 3px 0 0; vertical-align: baseline; }

/* Legends and status at the bottom edge of the box */
.overview-tab .small-box .inner { display: flex; flex-direction: column; height: 100%; }
.overview-tab .small-box .inner .vb-note { margin-top: auto; }
#Max_Temp_Today .inner > p { margin-top: auto; }

/* M1: everything stacked and centred (value, title, range, time) */
#current_temperature_oldtown .small-box .inner { flex-direction: column; align-items: center;
                                                 justify-content: center; text-align: center;
                                                 gap: 1px; padding: 6px 48px; }
#current_temperature_oldtown .small-box .inner h3 { font-size: var(--fs-hero); line-height: 1.05; margin: 0; }
#current_temperature_oldtown .small-box .m1-sub { display: flex; flex-direction: column; align-items: center; }
#current_temperature_oldtown .small-box .m1-sub p { font-size: var(--fs-sub) !important; line-height: 1.3; margin: 0; }
#current_temperature_oldtown .small-box .m1-sub p.m1-range { font-size: var(--fs-note) !important; color: var(--om-text-muted) !important; margin-top: 2px; }

/* Station box: narrower location column, numbers without line breaks */
#stationsBox table.dataTable th:first-child, #stationsBox table.dataTable td:first-child { width: 40%; }
#stationsBox table.dataTable td:nth-child(2), #stationsBox table.dataTable td:nth-child(3),
#stationsBox table.dataTable th:nth-child(2), #stationsBox table.dataTable th:nth-child(3) { white-space: nowrap; }
/* Header row stays visible when scrolling; numbers and their titles right-aligned */
#stationsBox table.dataTable thead th, #allStationsBox table.dataTable thead th {
  position: sticky; top: 0; background: var(--om-surface); z-index: 2; }
#allStationsBox table.dataTable th:first-child, #allStationsBox table.dataTable td:first-child { width: 55%; }
#stationsBox table.dataTable td:not(:first-child), #stationsBox table.dataTable th:not(:first-child),
#allStationsBox table.dataTable td:not(:first-child), #allStationsBox table.dataTable th:not(:first-child) {
  text-align: right; white-space: nowrap; }

/* Right column: boxes fill their area completely */
#stationsBox, #allStationsBox { display: flex; min-height: 0; }
#stationsBox > .col-sm-12, #allStationsBox > .col-sm-12 { display: flex; width: 100%; }
#stationsBox .box, #allStationsBox .box { flex: 1; width: 100%; display: flex; flex-direction: column; margin-bottom: 0; }
#stationsBox .box-body, #allStationsBox .box-body { flex: 1; overflow: auto; min-height: 0; }
.table-sub { margin: 4px 0; font-size: var(--fs-sub); font-weight: 600; }
.table-sep { margin: 10px 0; border-top: 1px solid var(--om-border); }
/* Tables in the station box: dark text (styles.css would otherwise pass on light colours);
   --om-text is THE text colour of the whole overview */
#stationsBox .box-body, #stationsBox .box-body table,
#stationsBox .box-body table th, #stationsBox .box-body table td,
#stationsBox .table-sub { color: var(--om-text) !important; }
/* Biel box (#allStationsBox) styled the same way:
   white box body (overrides a former styles.css !important by ID),
   table rows keep their colours (inline styles) */
#allStationsBox .box { background: var(--om-surface) !important; color: var(--om-text) !important;
                       border: 1px solid var(--om-border); }
#allStationsBox .box-header { background: var(--om-surface) !important; color: var(--om-text) !important; }
#allStationsBox .table-sub, #allStationsBox .box-body,
#allStationsBox .box-body table, #allStationsBox .box-body table th,
#allStationsBox .box-body table td { color: var(--om-text) !important; }
/* Operational notice below the red bar (config.R: SITE_NOTICE) */
.site-notice { display: flex; align-items: flex-start; gap: 9px;
               margin: 0 auto; padding: 9px 16px; max-width: 1200px;
               font-size: var(--fs-note); line-height: 1.45; }
.site-notice i { margin-top: 2px; flex: 0 0 auto; }
.site-notice-warn { background: var(--om-notice-bg); border: 1px solid var(--om-level-mild);
                    color: var(--om-notice-text); }
.site-notice-info { background: var(--om-card-head-bg); border: 1px solid var(--om-border);
                    color: var(--om-text); }

/* Map box when the reference station has no data (same look as .uhi-note) */
.leaflet-control.om-ref-note { color: var(--om-text-muted); font-size: var(--fs-note); max-width: 240px; white-space: normal; }
