body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #121212;
    color: #e0e0e0;
}

h1 {
    color: #90caf9;
    text-align: center;
}

h2 {
    color: #90caf9;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-top: 0;
    margin-bottom: 15px;
}

h3 {
    color: #90caf9;
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1px dashed #333;
    padding-bottom: 3px;
}

section {
    background-color: #1e1e1e;
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Collapsible sections (e.g. Diagnostics) -- <details>/<summary> gives free
   click-to-expand behavior with no JS needed, styled to match the look of
   a regular <section>/<h2> pairing above. */
details.collapsible-section {
    background-color: #1e1e1e;
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
details.collapsible-section summary {
    color: #90caf9;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
details.collapsible-section[open] summary {
    margin-bottom: 15px;
}
details.collapsible-section summary::-webkit-details-marker {
    display: none;
}
details.collapsible-section summary::after {
    content: '▸';
    font-size: 0.8em;
    transition: transform 0.2s ease;
    margin-left: 10px;
}
details.collapsible-section[open] summary::after {
    transform: rotate(90deg);
}
details.collapsible-section summary:hover {
    color: #bbdefb;
}

/* Style for live data values container */
.live-values {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}
.live-values div {
    margin: 1px 1px;
    text-align: center;
}
.live-values span {
    color: #25c425;

    font-size: 1.1em;
}

/*style for Min/Max*/
#fridge-stats,
#freezer-stats,
#garage-stats {
  display: flex;
  font-size: 0.9em;
  /*color: #444;*/
  margin-bottom: 1px;
}
.temp-high {
  color: red !important;
}
.temp-low {
  color: cyan !important;
}

.history-container {
    display: flex; /* Makes the container a flex container */
    justify-content: space-between; /* Pushes items to opposite ends */
    align-items: center; /* Vertically centers items */
    width: 100%; /* Ensures it takes full width to allow space-between to work */
}

  /* Optional: Basic styling for the h3 to ensure it doesn't have default margins that might interfere */
  .history-container h3 {
    margin: 0;
  }
/* Status indicators within H2 */
h2 span {
    font-style: italic;
    font-size: 0.8em;
    font-weight: normal;
    color: #bbb;
}

/* Style for chart containers */
.chart-container {
    position: relative;
    margin: 15px auto;
    height: 20vh;
    width: 90%;
    max-width: 600px;
    background-color: #222;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #333;
}

#historical-chart-container-gsheets {
    min-height: 20px;
    background-color: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    border-radius: 3px;
}

small {
    color: #aaa;
    display: block;
    text-align: right;
    margin-top: 5px;
}
/* --- Current Weather Display Styles --- */
#weather-display-container {
    font-family: Arial, sans-serif;
    background-color: #1e1e1e; /* Match section background */
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Match section shadow */
    border: 1px solid #333;
}
#weather-location {
    font-size: 1.2em;
    font-weight: bold;
    color: #90caf9; /* Match H2 color */
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}
#current-weather {
    display: flex;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap;
}
.weather-icon {
    width: 64px;
    height: 64px;
    margin-right: 15px;
}
#current-temp {
    font-size: 3em;
    color: #e0e0e0; /* Match main text color */
    margin-right: 20px;
}
#current-details {
    font-size: 0.9em;
    color: #b0bec5; /* Match H3 color */
    flex: 1;
    min-width: 160px;
}
#current-condition {
    font-weight: bold;
    margin-bottom: 4px;
}
#wind-vane-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    color: #b0bec5;
    font-size: 0.85em;
}
#wind-vane-needle {
    transition: transform 0.5s ease-out;
    /* Resolve the percentage origin against the SVG's own viewBox (0 0 100
       100) rather than this element's own shape bounding box -- without
       this, 50% means "center of the needle polygon's tiny bounding box"
       (near the top of the circle), not the compass center, so rotating by
       a real angle swings the needle out past the visible viewBox instead
       of turning in place. */
    transform-box: view-box;
    transform-origin: 50% 50%;
}
#forecast-synopsis p {
    font-size: 0.9em;
    color: #ccc;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #333;
}
#forecast-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid #333;
}
.forecast-card {
    flex: 0 0 auto;
    width: 90px;
    background-color: #2c2c2c;
    border-radius: 6px;
    padding: 8px 6px;
    text-align: center;
}
.forecast-card-label {
    font-size: 0.8em;
    color: #90caf9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forecast-card img {
    width: 40px;
    height: 40px;
    margin: 4px 0;
}
.forecast-card-temp {
    font-size: 1em;
    color: #e0e0e0;
}
.forecast-card-short {
    font-size: 0.75em;
    color: #b0bec5;
    height: 2.4em;
    overflow: hidden;
}
/* A larger container for taller charts like bar charts */
.chart-container-large {
    height: 35vh;
}

/* --- Styles for Temperature Display Cards --- */
.temp-card {
    display: flex;
    white-space: nowrap;
    flex-direction: column; /* This stacks the items vertically */
    align-items: center;
    background-color: #2c2c2c;
    border-radius: 8px;
    padding: 0px 0px;
    margin: 0px;
    border: 0px solid #333;
    min-width: 100px; 
}
.temp-card-label {
    color: #90caf9; 
    font-size: 1em;
    margin-bottom: 0px;
}
.temp-card-current {
    font-size: 1.3em; 
    color: #e0e0e0;
    line-height: 1;
}
.temp-card-stats {
    white-space: nowrap;
    font-size: 0.8em;
    color: #b0bec5; 
}

/* Nest HVAC status colors: red while heating, blue while cooling, neutral otherwise */
.hvac-heating {
    color: #ff6b6b;
    font-weight: bold;
}
.hvac-cooling {
    color: #54a0ff;
    font-weight: bold;
}
.hvac-idle {
    color: #b0bec5;
}
