/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
:root {
  --main-dark: rgb(0, 54, 96);
  --main-light: rgb(0, 125, 195);
  --secondary-dark: rgb(218, 26, 50);
  --secondary-light: rgb(228, 109, 95);
  --background-light: rgb(255, 255, 255);
  --background-dark: rgb(50,50,50);
  
  /* Plotly Chart Colors (Grabbed via JS) */
  --BAL-FZ: rgba(100,0,0,1);
  --BAL-40: rgba(153,0,0,1);
  --BAL-29: rgba(204,0,0,1);
  --BAL-19: rgba(255,153,0,1);
  --BAL-12p5: rgba(255,200,0,1);
  --BAL-LOW: rgba(0,204,0,1);

  /* =========================================
   FLUID TYPOGRAPHY SCALE
   Mobile (320px) to Desktop (1150px)
   ========================================= */
   /* clamp( minSize, calc(y-intercept + slope * 100vw), maxSize )
  
  /* Step -1: Small Text (Captions/Footers) -> 12px to 14px */
  --text-sm: clamp(0.75rem, 0.7018rem + 0.241vw, 0.875rem);
  
  /* Step 0: UI Text (Slider labels, badges, small buttons) -> 14px to 16px */
  --text-md: clamp(0.875rem, 0.8268rem + 0.241vw, 1rem);
  
  /* Step 1: Body Text (Paragraphs, main inputs, dropdowns) -> 16px to 18px */
  --text-base: clamp(1rem, 0.9518rem + 0.241vw, 1.125rem);
  
  /* Step 2: Subheadings (h3, section titles) -> 20px to 24px */
  /* --text-lg: clamp(1.25rem, 1.1536rem + 0.4819vw, 1.5rem); */
  /* Step 2: Subheadings (h3, section titles) -> 18px to 22px */
  --text-lg: clamp(1.125rem, 1.0286rem + 0.4819vw, 1.375rem);
  
  /* Step 3: Main Headings (h1, app title) -> 28px to 36px */
  /* --text-xl: clamp(1.75rem, 1.5572rem + 0.9639vw, 2.25rem); */
  /* Step 3: Main Headings (h1, app title) -> 25px to 30px */
    --text-xl: clamp(1.5625rem, 1.442rem + 0.6024vw, 1.875rem);
}

html {
  /* font-size: 62.5%;  */
  min-width: 400px;
}

body {
  font-size: var(--text-base);  
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  color: var(--main-dark); 
  margin: 0;
  padding: 0;
  background-color: var(--background-light);
}

[hidden], .ghost {
  display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700; 
  font-family: UnitRounded, sans-serif;
}
h3 { 
  font-size: var(--text-lg); 
  line-height: 1.3;  
  letter-spacing: -.1rem; 
  margin-bottom: 0.5rem; 
  margin-top:15px;
}
p, ul, ol, table { margin-bottom: 0.75rem; }
a { color: var(--secondary-dark); text-decoration: underline; cursor: pointer; }

/* =========================================
   2. CORE LAYOUT & GRID
   ========================================= */
.container {
  position: relative;
  width: 90%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box; 
  font-size: var(--text-base);
}

.column, .columns {
  width: 100%;
  float: left;
  box-sizing: border-box; 
  /* margin-left: 4%; */
}

.row.column, .large.input {
  width: 100%; 
  margin-left:0;
  display: flex;
  flex-direction: column;
  gap:10px;
  /* margin-bottom: 15px; */
}

.twelve.columns { width: 100%; margin-left: 0; margin-bottom: 0; }

.results.row, .data.row , .data.stay.row{
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.data.stay.row {
  flex-direction: row;
}

.results.column {
  background-color: var(--main-dark);
  color: var(--background-light);
  border: 15px solid var(--main-dark);
  border-radius: 3pt;
  display: flex;
  flex-direction: column;
  gap:10px;
  margin-top: 20px;
}

.data.column {
  /* margin-bottom: 5rem; */
  color: var(--main-dark);
  /* margin-bottom: 15px; */
}

#spacer { min-height: 10rem; }

/* =========================================
   3. HEADER & FOOTER
   ========================================= */
.mobile-menu-btn {
    display: none; /* Hidden on large screens */
}
.navbar-actions-container {
    position: relative;
    display: flex;
    align-items: center;
    /* flex-grow: 1; */
    align-self: stretch;
}
.navbar {
  background-color: var(--main-dark);
  color: var(--background-light);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 999; /* Forces the navbar and its shadow to sit above Plotly */
}

.navbar-titles {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#home, #interface_type {
  color: var(--background-light);
  font-weight: bolder;
  text-decoration: none;
  font-size: var(--text-xl);
  /* line-height: 3rem; */
  letter-spacing: 0.5px;
}
#interface_type { font-size: var(--text-lg); font-weight: 600; padding-left: 5px; }

.navbar-actions { 
  display: flex; 
  flex-direction: row; 
}

.botbar {
  width: 100%;
  position: fixed;
  bottom: 0;
  background-color: var(--main-dark);
  color: var(--background-light);
  display: flex;
  flex-direction: column;
  z-index: 998;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}
#botbar_info { 
  display: flex; 
  flex-direction: row; 
  gap: 50px; 
  align-items: center;
  padding: 10px 20px; 
}
#botbar_disclaimer { 
  flex-grow: 1; 
  white-space: pre-line; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap:10px;
  font-size: var(--text-sm);
}
#botbar_icon { flex-grow: 1; padding: 3px; }
#botbar_icon > img { float: right; }
#botbar_disclaimer >p {
  margin:0;
}
/* Base style for the new button (Hidden on Desktop) */
.botbar-mobile-btn {
    display: none; 
    width: 100%;
    height: 32px;
    background-color: var(--secondary-dark); /* Red highlight */
    color: white;
    border: none;
    /* padding: 12px 0; */
    font-size: var(--text-md); /* Using your new fluid scale! */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.botbar-mobile-btn:active {
    background-color: var(--secondary-light);
}


/* =========================================
   4. BUTTONS & HEADER ACTIONS
   ========================================= */
.button, button {
  min-width: 36px;
  display: inline-block;
  height: 38px;
  color: var(--main-dark);
  text-align: center;
  font-size: var(--text-base);
  font-weight: 600;
  background-color: var(--background-light);
  border-radius: 4px;
  border: 1px solid var(--main-dark);
  cursor: pointer;
  box-sizing: border-box; 
  transition: all 0.2s ease;
}

button:hover, button:focus {
  /* box-shadow: 0 0 5px var(--secondary-light);
  border: 1px solid var(--secondary-dark); */
  outline: 0; 
}
button:active { color: var(--secondary-dark); }

.nav-btn, .proceed-btn, .cancel-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: white;
  border: 1px solid transparent;
  padding: 8px 12px;
  font-size: var(--text-base);
  font-weight: 500;
}
.nav-btn svg {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0; /* Prevents the flexbox from squishing the icon */
}

.nav-btn-text {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.nav-btn-text::after {
  content: attr(data-text);
  font-weight: bold;
  height: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
}
.nav-btn:hover { background-color: var(--secondary-dark); color: var(--main-dark); }
.nav-btn:hover .nav-btn-text { font-weight: bold; }

.proceed-btn, .cancel-btn {
  background-color: var(--main-dark);
  color: var(--background-light);
  flex:1;
  justify-content: center;
  border: none;
}
.cancel-btn {
  background-color: var(--secondary-dark);
}
.proceed-btn:hover {
  font-weight: bold;
  background-color: var(--main-light);
}
.cancel-btn:hover {
  font-weight: bold;
  background-color: var(--secondary-light);
}

.increment-button {
  float: left;
  /* display: table-cell; */
  width: 41%;
  height: 3.5rem;
  margin: 0 6% 0rem 6%;
  font-size: var(--text-base);
}
.increment-button:first-of-type { margin-left: 0; }
.input-increment-buttons {
  /* width: 48%;
  display: table-cell; */
  flex-grow: 1;
  flex-basis: 0;
}

/* =========================================
   5. INPUTS & FORMS
   ========================================= */
.print-only-chart {
    display: none; /* Hide the image on screen */
    width: 100%;
    max-width: 100%;
    height: auto;
}
.print-only-header {
    display: none; 
    flex-direction: row;
    justify-content: space-between;
}
input[type="number"],
input[type="text"],
select {
  padding: 6px 10px;
  background-color: var(--background-light);
  border: 1px solid var(--main-light);
  border-radius: 4px;
  box-sizing: border-box; 
  font-family: inherit;
  font-size: var(--text-base);
  width: 100%;
  height: 100%;
}
label {
  display: block;
  /* margin-bottom: 0.5rem;  */
  font-family: UnitRounded, sans-serif;
  font-weight: 400}

input[type="number"]:focus, input[type="text"]:focus, select:focus {
  box-shadow: 0 0 5px var(--secondary-light);
  border: 1px solid var(--secondary-dark);
  outline: 0; 
}

/* Form Layout Wrappers */
.input-row, .input-row-small {
  display: flex; 
  margin-left: 2%;
  flex-grow: 1; 
  flex-basis: 0;}
.input-title, .input-title-small { 
  flex-grow: 1; 
  flex-basis: 0;
  font-size:var(--text-base);
  vertical-align: middle;
}
.input-text {flex-grow:1; flex-basis: 0; display: flex; flex-direction: column; justify-content: center;}
.input-simple {flex-grow:1; flex-basis: 0;}
.input-simple input[type="number"] { height: 100%; }

.input-text, .input-group, .input-simple, .output, #BAL, #vegtype, #vegdefinition, .increment-button { height: 3.5rem; }
.input-group {
  display: flex;
  flex-grow: 1;
  flex-basis: 0;
}
.input-group input[type="number"] {
  border-radius: 4px 0 0 4px;
  flex-grow: 1;
  margin-bottom: 0;
}
.input-group span {
  background-color: var(--background-light);
  border: 1px solid var(--main-dark);
  color: var(--main-dark);
  border-radius: 0 4px 4px 0;
  padding: 3px 6px;
  text-align: center;
  flex-shrink: 0;
  display:flex;
  justify-content: center;
  flex-direction: column;
  font-size:var(--text-base);
}

input[type="checkbox"], input[type="radio"] {
  transform: scale(2.5);
  /* margin: 20px 30px 0 30px; */
  margin:1rem;
  vertical-align: middle;
  float: right;
  accent-color: var(--secondary-dark);
}

/* Outputs */
.output { display: inline-block; width: 100%; pointer-events: none; }
.output input[type='text'] { height: 100%; }
.output-text { display: inline-block; width: 100%; }
.output-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-basis: 0;
  justify-content: flex-end;
}
#BAL { display: flex; align-items: center; justify-content: center; width:98% }

/* Group the label and icon on the same line */
.input-title-small, .input-title {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between text and icon */
    /* margin-bottom: 4px; */
}

/* Style the icon to be unobtrusive */
.help-icon {
    /* color: #888;  */
    cursor: help;
    /* position: relative; */
    display: flex;
    transition: color 0.2s ease;
    justify-content: center;
    align-items: center;
    border-width: 0px;
}

.help-icon:hover,
.help-icon:focus {
    /* color: #333; Darkens when interacted with */
    color : var(--secondary-dark);
    outline: none;
}

/* The hidden tooltip box */
.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: left;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    
    /* Position the tooltip above the icon */
    position: absolute;
    z-index: 10;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    
    transition: opacity 0.2s ease;
}
/* Add the little arrow pointing down to the icon */
.tooltip-text::after {
    content: "";
    position: absolute;
    z-index:9999;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show the tooltip on hover or keyboard focus */
.help-icon:hover .tooltip-text,
.help-icon:focus-within .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* =========================================
   6. NOUISLIDER CUSTOM STYLES
   ========================================= */
.input-slider-noUI { width: 65.33%; float: left; margin: 1rem 0 3.5rem 0; border: none; }
.noUi-base { z-index: unset; }
.noUi-connect { background: var(--secondary-dark) !important; }
.noUi-target { background: var(--secondary-light); border-radius: 4px; box-shadow: none; border: none; height: 6px; }

.noUi-horizontal .noUi-handle {
  width: 16px;
  height: 16px;
  right: -8px;
  top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--secondary-dark);
  box-shadow: none;
  cursor: pointer;
  z-index: 20;
}
.noUi-handle::before, .noUi-handle::after { display: none; }
.noUi-pips-horizontal { padding: 10px 0; height: auto; top: 0; z-index: 3; }
.noUi-value-horizontal {
  transform: translateX(-50%);
  font-family: "Open Sans", sans-serif;
  font-size: var(--text-md);
  color: var(--main-dark);
  font-weight: 700;
}
.noUi-marker-horizontal.noUi-marker-large {
  width: 8px;
  height: 8px;
  background: white !important;
  border: 2px solid var(--secondary-light);
  border-radius: 50%;
  margin-left: -4px;
  top: -1px;
}

/* =========================================
   7. MODALS, TOASTS & FLOATING BUTTONS
   ========================================= */
/* .modal-background {
  position: fixed;
  z-index: 10000;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
} */

.modal-window {
  border: none;
  padding: 20px;
  background-color: var(--background-light);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  margin: auto;
  color: var(--main-dark);

  /* --- FLUID DIMENSION MECHANICS --- */
  width: fit-content;
  min-width: 320px;
  max-width: clamp(45ch, 90vw, 800px);
  max-height: 65vh;
}
.modal-window::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
.modal-window[open] {
  display: flex;
  animation: popIn 0.2s ease-out forwards;
}
/* Header styling */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  /* padding: 16px 0px 0px 24px; */
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

/* Close button styling */
.close-btn {
    background: none;
    border: none;
    font-size: var(--text-base);
    font-weight: bold;
    color: var(--main-dark);
    cursor: pointer;
    transition: color 0.2s ease;
    min-width: 0;
}

.close-btn:hover {
    color: var(--secondary-dark);
}

/* Scrollable content area for the long docs */
.modal-body {
    padding: 0px 24px;
    overflow-y: auto; /* Adds a scrollbar only if the text is too long */
    flex-grow: 1;
    font-size: var(--text-md);
}


.toast {
  position: fixed;
  bottom: 100px; 
  left: 50%;
  transform: translateX(-50%) translateY(20px); 
  background-color: #323232; 
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: var(--text-base);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1001; 
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  max-width: 95vw; 
  min-width: 65vw;           
  overflow-wrap: break-word;  
  word-break: break-all;      
  text-align: center;         
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.floating-btn {
  position: fixed;
  bottom: 120px; 
  right: 30px; 
  width: 60px; height: 60px;
  background-color: var(--secondary-dark);
  color: white;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
  transition: transform 0.2s ease, background-color 0.2s ease;
  border: none;
}
.floating-btn:hover { background-color: var(--secondary-light); transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4)}
.floating-btn:active { transform: translateY(1px); }



/* =========================================
   8. ANIMATIONS
   ========================================= */
.animate { animation: fadeIn 0.3s; }
.changeValue { animation: highlight-flash 0.7s; }

@keyframes highlight-flash {
  0%, 40% { box-shadow: 0 0 5px var(--secondary-light); border: 1px solid var(--secondary-dark); }
  100% { box-shadow: none; border: 1px solid var(--main-dark); }
}
@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; }
}
@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   9. SPECIFIC VEGETATION UI TWEAKS
   ========================================= */
#vegtype { flex-grow:1;}
#vegdefinition {
  width: 10%;  margin-left: 2%;
  min-width: 36px; padding: 0 3px; font-size: var(--text-base); font-weight: 700;
  flex-grow:0;
}
#vegtypetext {
  background-color: var(--main-dark);
  width: 98%; margin-bottom: 5%;
  color: var(--background-light); text-align: center;
  padding: 1%; font-size: var(--text-base);
}
#distance_table table {
  border-radius: 3pt;
  border-color: white;
  border-width: 5px;
  border-style: solid;
  border-collapse: separate !important;
  height: 6rem;
  text-align: center;
  background-color: white;
  font-size: var(--text-base);
}
.distance_key, .distance_value {
  border-color: white;
  border-radius: 3pt;
  color: var(--main-dark);
}
.distance_value {
  background-color: var(--main-dark);
  color: var(--background-light)
}

/* =========================================
   10. MEDIA QUERIES (DESKTOP & MOBILE UX)
   ========================================= */
@media (max-width: 874px) {
  .floating-btn {
    right: 16px; 
    bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); 
    width: 56px; height: 56px;
  }
  #example {
    display: none;
  }
  #distance_table table {
    font-size: var(--text-sm);
  /* 1. Show the 3-dot toggle button */
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center; /* Centers the dots vertically */
    justify-content: center;
    background: transparent;
    color: white;
    border: none;
    padding: 0 16px; /* Widen the tap target horizontally */
    cursor: pointer;
    /* Force the button to take up the entire height of the stretched container */
    height: 100%;
  }

  /* 2. Turn the actions container into a hidden dropdown */
  .navbar-actions {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--main-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    flex-direction: column; /* Stack buttons vertically */
    padding: 8px;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 150px;
  }

  /* 3. When the 'show' class is added via JS, reveal it */
  .navbar-actions.show {
      display: flex;
  }

  /* 4. Make the buttons look like dropdown items */
  .navbar-actions .nav-btn {
      width: 100%;
      justify-content: flex-start; /* Align text to the left */
      padding: 10px 12px;
  }
  /* 1. The "Collapsed/Peek" State */
  .botbar {
      /* Pushes the container off-screen, pulling it back up exactly 48px to show the button */
      transform: translateY(calc(100% - 32px)); 
  }
  /* 2. The "Expanded/Open" State (Added via JavaScript) */
  .botbar.expanded {
      transform: translateY(0); /* Slides up fully */
      box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4); /* Adds a shadow over the page */
  }  
  
  .botbar-mobile-btn {
      display: block; /* Reveal the full-width tap target */
  }
  
  #botbar_info {
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      padding: 20px;
      gap: 20px;
      /* Restricts height so it doesn't cover the entire screen */
      max-height: 70vh; 
      overflow-y: auto; /* Allows scrolling if the disclaimer text is very long */
  }
}

@media (hover: none) and (pointer: coarse) {
  .floating-btn:hover { background-color: #6c757d; transform: none; }
  .floating-btn:active { background-color: #5a6268; transform: scale(0.92); }
}

@media (min-width: 874px) {
  body {  line-height: normal; }
  .container { width: 80%; }
  /* h3 { margin: 0.5rem 0; } */
  
  /* .navbar { font-size: 3rem; } */
  /* .navbar #interface_type { font-size: 1.5rem; } */
  #spacer { min-height: 9rem; }
  /* #info {font-size: 3rem;} */
  /* #home {font-size: 3rem;} */
  /* #interface_type {font-size: 2rem;} */
  .column, .columns {
    margin-left: 4%;
  }
  .column:first-of-type,
  .columns:first-of-type {
    margin-left: 0; 
  }


  .data.column                    { width: 48%}
  .results.column                 { margin-left:4% ;width: 48%; margin-top: 0; margin-bottom: 0px; }
  .row.column, .large.input       { width: 100%; margin-left:0; display: flex; flex-direction: column;}
  .results.row, .data.row, data.stay.row {flex-direction: row;}
  
  /* .input-row { padding-left: 25px; display: table; width: 100%;} */
  .input-row-small {width: 48%; float: right; margin-bottom: 0;}
  .input-slider-noUI { display: block !important; }
  .input-title, .input-text, .input-group, .input-simple, .output, .output-text, #BAL, #vegtype, #vegdefinition, .increment-button { height: 2.5rem; }
  .input-title {width: 100%}
  .input-simple { padding-left: 4%; width: 94%; }
  .input-group { padding-left: 4%; }
  .input-group span { line-height: 2rem; }
  
  /* input[type="number"], input[type="text"], select { height: 39px; } */
  input[type="checkbox"], input[type="radio"] { transform: scale(2); margin: 10px 30px 0 30px; }
  
  .reverse-ghost { display: none; }
  /* #vegtypetext { height: 5rem; } */
  .modal .container { width: 600px; }
}

/* =========================================
   11. PRINT / PDF EXPORT LAYOUT
   ========================================= */
@media print {
  :root {
    --main-dark: rgb(0, 0, 0);
    --main-light: #555555;
    --secondary-dark: rgb(0, 0, 0);
    --secondary-light: #555555;
    --background-light: rgb(255, 255, 255);
    --background-dark: rgb(0,0,0);
    
    /* Plotly Chart Colors (Grabbed via JS) */
    --BAL-FZ: rgba(70,70,70,1);
    --BAL-40: rgba(0,0,0,1);
    --BAL-29: rgba(0,0,0,1);
    --BAL-19: rgba(0,0,0,1);
    --BAL-12p5: rgba(0,0,0,1);
    --BAL-LOW: rgba(0,0,0,1);
  }

  .navbar, .botbar, .floating-btn, .input-slider-noUI, 
  .input-increment-buttons, .toast, button, #example, .help-icon{
      display: none !important;
  }

  body {
    min-width: 900px !important;
  }
  body, html, .container, .results.column, .data.column {
    background-color: white !important;
    color: black !important;
  }
  h3 { 
  font-size: var(--text-xl); 
  /* line-height: 1.3;   */
  letter-spacing: .1rem; 
  /* margin-bottom: 0.5rem;  */
  /* margin-top:15px; */
}
  * {
    box-shadow: none !important;
  }
  .results.column {
    margin-bottom: 20px !important;
    padding: 15px !important;
  }
  .large.input {
    flex-direction: row;
    margin-bottom: 10px;
  }
  .data.row, .output-container{
    flex-direction: row;
  }
  /* #vegtype {
    margin-left:4%
  } */
  input[type="number"], input[type="text"], select , .input-group span{
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; 
    border: 3px solid var(--main-dark);
    font-size: var(--text-lg);
  }
  .input-title, .output-text {
    width:40%;
    flex-grow:1;
    flex-basis:0;
    font-size: var(--text-lg);
  }
  .output {
    width:55%;
  }
  .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #example, .results.column{ page-break-inside: avoid; }
  .print-only-chart {
    display: block !important; /* Reveal the static image */
    page-break-inside: avoid;
  }
  .distance_value {
    border: 3px solid var(--main-dark);
    font-size: var(--text-lg);
  }
  .distance_key, .input-title-small {
    font-size: var(--text-lg);
  }
  
  .print-only-header {
    display: flex !important;
    /* margin-bottom: 20px; */
    /* padding-bottom: 15px; */
    padding:10px;
    border-bottom: 2px solid black;
  }
  
  .print-meta {
    display: flex;
    justify-content: space-between; 
    flex-direction: column;
    font-size: 14px;
    margin-top: 10px;
  }
  
  .print-meta p {
    margin: 0;
  }
  
  /* Ensure the modal completely vanishes if they hit Ctrl+P while it's open */
  #operatorModal {
    display: none !important;
  }
}

@page {
    size: A4 portrait; /* or 'letter portrait' */
    margin: 1.5cm;     /* Standardizes margins so they don't shift per browser */
}