
/* =======================================================
   1. CSS VARIABLES (Design Tokens)
   ======================================================= */
:root {
  --color-elemental-navy: #001e62;
  --color-lab-blue: #0032a1;
  --color-innovation-yellow: #fcb317;
  --color-livermorium-ice: #eaf0fb;
  --color-link-blue: #3366cc;
  --color-carbon-gray: #a9aabc;
  --color-light-gray: #f4f4f4;
  --color-bg: white;
  --color-black: #1a1a1a;
  --gradient-navy-to-blue: linear-gradient(
    135deg,
    rgba(0, 30, 98, 1) 0%,
    rgba(0, 50, 161, 1) 100%
  );
  --bs-border-width: 2px;
  --bs-border-color: #a9aabc;
}

/* =======================================================
   2. FONTS & BASE RESET
   ======================================================= */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap");

html {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  font-family: "Roboto Flex", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "XOPQ" 96, "XTRA" 468,
    "YOPQ" 79, "YTAS" 750, "YTDE" -203, "YTFI" 738, "YTLC" 514, "YTUC" 712;
  line-height: 1.66;
  color: var(--color-black);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
main {
  width: 100%;
  max-width: 1300px;
  margin: 2rem auto 0;
  padding: 0 20px;
  flex: 1 0 auto;
}
footer {
  flex-shrink: 0;
}

/* =======================================================
   3. GLOBAL TYPOGRAPHY
   ======================================================= */
h1,
.h1 {
  font-family: "Roboto Flex", sans-serif;
  color: var(--color-lab-blue);
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
}
h2,
.h2 {
  font-family: "Roboto Flex", sans-serif;
  color: var(--color-elemental-navy);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
}
h3,
.h3 {
  font-family: "Roboto Flex", sans-serif;
  color: var(--color-link-blue);
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 700;
}
h4 {
  font-family: "Roboto Flex", sans-serif;
  color: var(--color-black);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
h5 {
  font-family: "Roboto Flex", sans-serif;
  color: var(--color-elemental-navy);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
p,
ul,
ol {
  font-family: "Roboto Flex", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.66;
  color: var(--color-black);
}
ul:not(.nav):not(.footer-nav) li:not(.header-nav-link):not(.footer-nav-link)::marker,
ol li::marker {
  color: var(--color-link-blue);
}
ol li::marker {
  font-weight: 500;
}
.current-reading {
    font-size: 0.85em;
    font-weight: normal;
    color: black;
}
.old-reading {
    font-size: 0.85em;
    font-weight: normal;
    color: red;
}


/* =======================================================
   4. GLOBAL LAYOUT & UTILITIES
   ======================================================= */
.main-header,
.main-footer {
  width: 100vw;
  min-height: 60px;
  display: flex;
  align-items: center;
}
.main-header {
  background: var(--gradient-navy-to-blue);
  margin-bottom: 0;
}
.main-footer {
  background: var(--color-elemental-navy);
  margin-top: 70px;
  bottom: 0;
}
.main-header-content,
.main-footer-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0;
}
.footer-left,
.header-left {
  display: flex;
  align-items: center;
}

/* Margin and spacing utilities */
h1 + h2 {
  margin-top: 2rem;
}
h2 + h3,
h3 + h4 {
  margin-top: 1rem;
}
h1 + p,
h2 + p,
h3 + p,
h4 + p {
  margin-top: 0.5rem;
}
h1 + ul,
h1 + ol,
h2 + ul,
h2 + ol,
h3 + ul,
h3 + ol,
h4 + ul,
h4 + ol {
  margin-top: 0.5rem;
}
h1 + div,
h3 + div,
h4 + div {
  margin-top: 2em;
}
h2 + div {
  margin-top: 1em;
}
.accordion h2 {
  margin-top: 2rem;
}
.h1 + .h2 {
  margin-top: 2em;
}
.h2 + .h3,
.h1 + p {
  margin-top: 1em;
}
p + .h2 {
  margin-top: 2em;
}
div + h1,
div + h2,
div + h3,
div + h4 {
  margin-top: 2rem;
}
div + p {
  margin-top: 1rem;
}
div + ul,
div + ol {
  margin-top: 1rem;
}
p + h1,
p + h2,
p + h3,
p + h4 {
  margin-top: 1rem;
}
p + p {
  margin-top: 1rem;
}
p + ul,
p + ol {
  margin-top: 1rem;
}
p + div {
  margin-top: 1rem;
}
ul + h1,
ul + h2,
ul + h3,
ul + h4,
ol + h1,
ol + h2,
ol + h3,
ol + h4 {
  margin-top: 1rem;
}
ul + p,
ol + p {
  margin-top: 1rem;
}
ul + ul,
ul + ol,
ol + ul,
ol + ol {
  margin-top: 1rem;
}
ul + div,
ol + div {
  margin-top: 1rem;
}
div + ul,
div + ol {
  margin-top: 1rem;
}

.metdat-loader-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
}
.metdat-loader-overlay.is-loading {
    display: flex;
}
.metdat-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 6px solid rgba(0, 0, 0, 0.15);
    border-top-color: rgba(0, 0, 0, 0.6);
    animation: metdat-spin 0.9s linear infinite;
}
@keyframes metdat-spin {
    to { transform: rotate(360deg); }
}

/* =======================================================
   5. NAVIGATION (Header & Footer)
   ======================================================= */
/* Header Navigation */
.llnl-weather-logo {
  height: 35px;
  margin-right: 20px;
  display: block;
}
.icon-info-link {
  display: flex;
  align-items: center;
  color: white;
  font-size: 18px;
  text-decoration: none;
  transition: color 0.2s;
  margin-right: 40px;
}
.icon-info-link:hover,
.icon-info-link:focus {
  color: var(--color-innovation-yellow);
}
.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.header-nav-link {
  font-family: "Roboto Flex", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: white;
  text-decoration: none;
  padding: 20px;
  transition: color 0.2s;
}
.header-nav-link:last-child {
  margin-right: 0;
  padding-right: 0;
}
.header-nav-link:hover,
.header-nav-link:active {
  color: var(--color-innovation-yellow);
}
.header-nav-link.active {
  color: var(--color-innovation-yellow) !important;
}
.hamburger {
  display: none;
}
.mobile-nav {
  display: none;
}
.info-pocket-content {
  background: var(--color-livermorium-ice);
  padding: 1.5rem;
  box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.3);
  position: relative;
}
.btn-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  color: var(--color-link-blue);
}
.info-pocket-inner {
  max-width: 1200px !important;
  margin: 0 auto;
}
.info-pocket-content > p {
  margin-bottom: 0;
}
.collapse#infoPocket,
.collapse#infoPocket .info-pocket-inner,
.collapse#infoPocket .info-pocket-content {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.info-pocket-content > h5 {
  margin-top: 0;
}
/* Footer Navigation */
.llnl-full-logo {
  margin-right: 20px;
  height: 26px;
}
.llns-logo,
.doe-logo {
  margin-right: 15px;
  height: 30px;
}
.nnsa-logo {
  margin-right: 0;
  height: 24px;
}
.footer-text {
  font-family: "Roboto Flex", sans-serif;
  font-size: 0.5652rem;
  font-weight: 400;
  line-height: 1.5;
  color: white;
  text-decoration: none;
  transition: color 0.2s;
  max-width: 50%;
  margin-right: 20px;
}
.footer-text a,
.footer-text a:visited {
  color: var(--color-innovation-yellow);
  text-decoration: underline;
}
.footer-text a:hover,
.footer-text a:active {
  color: white;
}
.footer-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}
.footer-nav-link {
  font-family: "Roboto Flex", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  transition: color 0.2s;
  white-space: nowrap;
}
.footer-nav-link:last-child {
  margin-right: 0;
  padding-right: 0;
}
.footer-nav-link:hover,
.footer-nav-link:active,
.footer-nav-link.active {
  color: var(--color-innovation-yellow);
}
.footer-nav-link:visited {
  color: white;
}

/* =======================================================
   6. LINKS & BUTTONS
   ======================================================= */
a {
  color: var(--color-link-blue);
  text-decoration: underline;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--color-black);
}
/* Button Styles */
.btn-toolbar {
  margin: 28px 0 40px;
}
.btn-group {
  display: inline-block;
  margin-right: 2rem;
}
.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
  color: var(--bs-btn-active-color);
  background-color: var(--color-lab-blue);
  border-color: none;
}
.btn-primary,
.btn-outline-primary {
  --bs-btn-color: var(--color-lab-blue);
  --bs-btn-bg: var(--color-livermorium-ice);
  --bs-btn-border-color: var(--color-livermorium-ice);
  --bs-btn-hover-color: white;
  --bs-btn-hover-bg: var(--color-lab-blue);
  --bs-btn-hover-border-color: var(--color-lab-blue);
  --bs-btn-focus-shadow-rgb: 13, 110, 253;
  --bs-btn-active-color: white;
  --bs-btn-active-bg: var(--color-lab-blue);
  --bs-btn-active-border-color: var(--color-lab-blue);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: var(--color-carbon-gray);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--color-carbon-gray);
  --bs-gradient: none;
  font-weight: 500;
}
.btn-group > .btn-group:not(:first-child),
.btn-group > :not(.btn-check:first-child) + .btn {
  margin-left: calc(-3 * var(--bs-border-width));
}
.btn-outline-lab-blue,
.reset-btn {
  color: var(--color-lab-blue);
  border-color: var(--color-lab-blue);
  background: transparent;
  transition: background 0.2s, color 0.2s;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
}
.btn-outline-lab-blue:hover,
.btn-outline-lab-blue:focus,
.reset-btn:hover,
.reset-btn:focus {
  background: var(--color-lab-blue);
  color: white;
}
.btn-outline-lab-blue .fa-regular,
.reset-btn .fa-regular {
  color: var(--color-lab-blue);
  transition: color 0.2s;
}
.btn-outline-lab-blue:hover .fa-regular,
.btn-outline-lab-blue:focus .fa-regular,
.reset-btn:hover .fa-regular,
.reset-btn:focus .fa-regular {
  color: white;
}

/* =======================================================
   7. ICONS
   ======================================================= */
.icon-h1 {
  margin-right: 0.875rem;
}
.icon-p {
  margin-right: 0.5rem;
}

/* =======================================================
   8. TABLES
   ======================================================= */
.table {
  --bs-table-border-color: transparent;
}
thead th {
  background: var(--color-livermorium-ice) !important;
  color: var(--color-lab-blue) !important;
}
.custom-table-scroll {
  max-height: 570px;
  height: 570px;
  overflow-y: auto;
  border-top: 2px solid var(--color-lab-blue);
  border-bottom: 2px solid var(--color-lab-blue);
}
.custom-table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--color-livermorium-ice);
  z-index: 2;
}
.custom-table-scroll table {
  margin-bottom: 0;
}
.visibleCount {
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-black);
}

/* =======================================================
   14. RESPONSIVE DESIGN (MEDIA QUERIES)
   ======================================================= */
@media (max-width: 1200px) and (min-width: 769px) {
  .main-header-content,
  .main-footer-content {
    padding-left: 20px;
    padding-right: 20px;
  }
}
.main-footer-content {
  padding-top: 20px;
  padding-bottom: 20px;
}
@media (max-width: 1024px) {
  .main-footer {
    min-height: 80px;
    margin-top: 40px;
    padding: 0 16px;
  }
  .main-footer-content {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 0;
    max-width: 100%;
  }
  .footer-left {
    margin-bottom: 12px;
    flex-wrap: wrap;
  }
  .footer-text {
    font-size: 0.7rem;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .llnl-full-logo {
    margin: 15px 0 15px 0;
    height: 22px;
  }
  .llns-logo,
  .doe-logo {
    margin-right: 10px;
    height: 24px;
  }
  .nnsa-logo {
    height: 18px;
  }
  .footer-nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .footer-nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.5rem 0.5rem 0;
    margin-right: 8px;
  }
}
@media (max-width: 768px) {
  .main-header-content {
    padding: 0 16px;
  }
  .main-nav {
    display: none;
  }
  .hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
  }
  .hamburger #hamburger-icon {
    font-weight: 900;
    font-size: 24px;
    color: white;
    transition: color 0.3s;
  }
  .hamburger.open #hamburger-icon {
    color: var(--color-innovation-yellow);
  }
  .main-header {
  position: relative;
  z-index: 1000;
  }
  .mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100vw;
    background: var(--gradient-navy-to-blue);
    flex-direction: column;
    z-index: 999;
  }
  .mobile-nav.open {
    display: flex;
  }
  .mobile-nav .header-nav-link {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
  }
  .mobile-nav .header-nav-link:last-child {
    border-bottom: none;
  }
  #infoPocket {
    margin-top: 0 !important;
  }
  .info-pocket-content h5,
  .info-pocket-content p {
    font-size: 87.5%;
  }
  /* .btn-toolbar {
    margin: 18px 0 28px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .btn-group {
    display: block;
    margin-right: 0;
    margin-bottom: 10px;
    width: 100%;
  } */
  main {
    max-width: 100%;
    padding: 0 20px;
  }
  .double-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
  }
  .double-header .reading-as-of,
  .double-header .subheader-readings-taken {
    margin-top: 0.5rem;
    margin-left: none !important;
    padding-left: none !important;
  }
  /* .reading-row {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }
  .readings-container {
    max-width: 100%;
    width: 100%;
  }
  .data-plots {
    gap: 32px;
  }
  .plot-container {
    flex: 1 1 100%;
  } */
  .weather-reporting-tool {
    flex-direction: column;
  }
  .parameters,
  .weather-report {
    max-width: 100%;
    flex: 0 0 100%;
  }
  .parameters-container {
    max-width: 100%;
    border-right: none;
    padding-right: 0;
  }
  .current-conditions-row {
    flex-direction: column;
    gap: 30px;
  }
  #aboutTabDropdown {
    margin-top: 8px;
    border: 2px solid var(--color-link-blue);
    background-color: var(--color-link-blue);
    color: white;
    font-weight: 500;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548a.75.75 0 0 1 1.06 0L10 10.97l3.424-3.423a.75.75 0 1 1 1.06 1.06l-3.954 3.954a.75.75 0 0 1-1.06 0L5.516 8.608a.75.75 0 0 1 0-1.06z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 36px;
  }
  .about-form-label {
    margin-top: 20px;
    font-weight: 500;
  }
  #myTabContent .tab-pane .h1 {
    margin-top: 30px !important;
  }
}
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}
