/* ======================================== */
/* --- Global Styles & Resets --- */
/* ======================================== */
body {
  font-family: "Montserrat", sans-serif;
  background-color: #f0f0f0;
  color: #333;
  margin: 0;
  line-height: 1.5;
}
h2,
h3,
h4 {
  color: #444;
  font-weight: 600;
}
h2 {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}
h3 {
  margin-top: 1em;
  margin-bottom: 15px;
}
h4 {
  font-size: 1.1em;
  margin-top: 1em;
  margin-bottom: 10px;
}
a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #000;
  text-decoration: underline;
}

/* ======================================== */
/* --- Reusable Utility Classes --- */
/* ======================================== */
.panel {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 15px;
}
.horizontal-scroll {
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 15px;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f0f0f0;
}
.horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}
.horizontal-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
  border: 2px solid #f0f0f0;
}

.card {
  background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
  border-radius: 12px;
  box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 7px 7px 15px #b9b9b9, -7px -7px 15px #ffffff;
}

/* ======================================== */
/* --- UNIFIED ACTION BUTTON STYLE --- */
/* ======================================== */

/* This single rule now styles ALL your main action buttons */
.common-link-button,
.resort-link,
.forecast-toggle,
.common-toggle-btn,
.download-link,
.payment-link,
.daily-forecast-card .expand-hourly-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-top: 15px;
    box-sizing: border-box;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background-color: #4a5a6a; /* Dark slate color */
    color: white !important; /* Use !important to override specific link colors */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* This single rule handles the hover state for ALL of them */
.common-link-button:hover,
.resort-link:hover,
.forecast-toggle:hover,
.common-toggle-btn:hover,
.download-link:hover,
.payment-link:hover,
.daily-forecast-card .expand-hourly-btn:hover {
    background-color: #2c3e50; /* Darker blue/slate */
    text-decoration: none;
    transform: translateY(-2px); /* Add a subtle lift effect */
}

/* ======================================== */
/* --- Standardized Panel Look --- */
/* ======================================== */
.container,
#map,
#info-panel,
.widget-container,
#avalanche-container,
#expanded-weather-details,
#expanded-hourly-forecast-container,
#hourly-forecast-container,
#seven-day-forecast-container {
  background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
  border-radius: 12px;
  box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
  margin-bottom: 20px;
  box-sizing: border-box;
}

/* ======================================== */
/* --- Layout: Main Container, Map, Info Panel --- */
/* ======================================== */
.container {
  max-width: 1600px;
  margin: 20px auto;
  display: flex;
  gap: 24px;
  padding: 24px;
}
#map {
  height: 800px;
  width: 60%;
}
#info-panel {
  min-height: 800px;
  width: 40%;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.info-title {
  font-size: 24px;
  font-weight: 600;
  margin: -5px 0 20px 0;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  color: #444;
  background-color: #f0f0f0;
}

.trail-map-section img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes extra space below the image */
    border-radius: 8px; /* Optional: adds rounded corners to match your design */
    margin-bottom: 10px; /* Optional: adds space below the map */
}

/* ======================================== */
/* --- Map Type Switcher Styles --- */
/* ======================================== */
.map-switcher-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    margin: 20px auto;
    max-width: 1600px;
    box-sizing: border-box;
    background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
    border-radius: 12px;
    box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
}


.switcher-btn {
  padding: 12px 28px;
  font-size: 1em;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  border: 2px solid transparent;
  background-color: #fff;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.switcher-btn:first-of-type {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.switcher-btn:last-of-type {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-left: 1px solid #dee2e6;
}

.switcher-btn:hover {
  background-color: #f8f9fa;
  color: #343a40;
}

.switcher-btn.active {
  background-color: #495057;
  color: #fff;
  border-color: #495057;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.custom-map-control-button {
  background-color: #fff;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 50%; /* Makes it circular */
  width: 34px;
  height: 34px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
}

.custom-map-control-button .material-symbols-outlined {
  font-size: 22px;
  color: #333;
}

.custom-map-control-button:hover {
  background-color: #f4f4f4;
}

/* ======================================== */
/* --- Lift & Run Status --- */
/* ======================================== */
/* Panel shell */
.lift-run-panel {
  padding: 16px;
  position: relative;
  color: #f2f2f2;
  max-width: 1600px;
  margin: 0 auto 20px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Toggle header */
.lr-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: inherit;
  border: none;
  padding: 6px 2px 8px;
  text-align: left;
  cursor: pointer;
}
.lr-toggle .lr-title {
  font-weight: 700;
  letter-spacing: .2px;
}
.lr-toggle .lr-counts {
  opacity: .85;
  font-weight: 600;
}
.lr-toggle .lr-caret {
  transition: transform .18s ease;
}
.lift-run-panel.is-open .lr-caret { transform: rotate(90deg); }

/* Body area */
.lr-body { margin-top: 10px; }

/* Sub-heads */
.lr-sub {
  margin: 10px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #eee;
}

/* Lists: responsive grid columns */
.status-list {
  list-style: none;
  margin: 0 0 12px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 14px;
}
.status-list .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f6f6f6;
  border-radius: 10px;
}
.status-list .name {
  font-weight: 600;
  line-height: 1.25;
  color: #777;
}
.status-list .diff {
  font-style: italic;
  opacity: .8;
}

/* Badges */
.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* Colors */
.status--open,
.status--groomed {           /* Open & Groomed share green vibe */
  background: rgba(22, 163, 74, .18);
  color: #34d399;
  border-color: rgba(52, 211, 153, .35);
}
.status--closed {
  background: rgba(239, 68, 68, .18);
  color: #f87171;
  border-color: rgba(248, 113, 113, .35);
}
.status--hold,
.status--scheduled {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .35);
}
.status--unknown {
  background: rgba(148, 163, 184, .16);
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, .3);
}

/* Updated stamp */
.lr-updated {
  margin-top: 4px;
  font-size: 12px;
  opacity: .75;
}

/* Hide panel by default — JS shows it on POI */
#liftRunContainer { display: none; }

/* Caret rotation matches JS collapsed state */
.lr-group.lr-collapsed .lr-caret { transform: rotate(-90deg); }

/* Distinguish "Groomed (Fresh)" a bit brighter */
.status--groomed-fresh {
  background: rgba(16, 185, 129, .20);
  color: #34f2b9;
  border-color: rgba(52, 242, 185, .40);
}

/* Slightly tighter on very narrow screens */
@media (max-width: 960px){
  .status-list { grid-template-columns: 1fr; }
}

/* ======================================== */
/* --- Webcams --- */
/* ======================================== */
#webcam-frame {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.webcam-section {
  width: calc(50% - 10px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
}
.webcam-section img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.webcam-section p {
  padding: 8px;
  background-color: #f0f0f0;
  text-align: center;
  font-size: 0.9em;
  color: #555;
  margin: 0;
}
.webcam-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.webcam-popup img,
.webcam-popup iframe {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: none;
}

/* ====================================================== */
/* --- Weather Widget - COMPACT LAYOUT Styles --- */
/* ====================================================== */
.widget-container {
  padding: 16px;
  position: relative;
  color: #333;
  max-width: 1600px;
  margin: 0 auto 20px auto;
  overflow: hidden;
}
.widget-container * {
  color: inherit;
}

.widget-container .time-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.widget-container .location {
  font-size: 24px;
  font-weight: 600;
  text-align: left;
  margin-right: 15px;
  flex-shrink: 0;
}
.widget-container .time-group {
  text-align: right;
}
.widget-container .clock {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
.widget-container .date {
  font-size: 16px;
  font-weight: 400;
  color: #777;
  line-height: 1.1;
}

.widget-container .current-weather {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto min-content;
    align-items: stretch;
    gap: 10px 15px;
    box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
    border-radius: 12px;
    padding: 20px;
}

.widget-container .temp-info {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 4px 4px 8px #d9dbde, -4px -4px 8px #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.widget-container .temp-info .location {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 1px;
  text-align: left;
  margin-right: 0; /* Override general .location if needed here */
  flex-shrink: 1; /* Override general .location if needed here */
}
.widget-container .temperature {
  font-size: 56px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
  margin: 0;
}

.widget-container .feels-like-inline {
  font-size: 1em;
  color: #555;
  margin: 8px 0;
}

.widget-container .weather-condition {
  font-size: 1.1em;
  color: #555;
  margin: 0px;
  text-align: center;
}

.widget-container .weather-icon {
  grid-column: 2;
  grid-row: 1;
  width: 128px;
  height: 128px;
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
}
.widget-container .weather-icon img {
  width: 100%;
  height: auto;
}
.widget-container .weather-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.additional-info-grid.compact-details {
  display: flex;
  gap: 10px;
  width: 100%
}

.compact-details .weather-info-group {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.compact-details .weather-info-group .group-title {
  grid-column: 1 / -1;
  margin: 0 0 6px 0;
  font-size: 0.7em;
  font-weight: 600;
  color: #444;
  padding-bottom: 3px;
  border-bottom: 1px solid #d8d8d8;
  text-align: center;
  line-height: 1.2;
}

.compact-details .weather-info-group .info-box {
    flex: 1 1 calc(50% - 4px);
    min-width: 120px;
    background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
    border-radius: 8px;
    padding: 8px 5px;
    box-shadow: 3px 3px 6px #cccccc, -3px -3px 6px #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.compact-details .weather-info-group .info-box:hover {
    transform: translateY(-3px);
    box-shadow: 5px 5px 8px #cccccc, -5px -5px 8px #ffffff;
}

.compact-details .info-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.compact-details .info-label {
  font-size: 0.75em;
  font-weight: 600;
  white-space: normal;
  text-align: center;
}
.compact-details .info-value {
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}
.compact-details .weather-info-group .info-box .info-label.sub-label {
  font-size: 1.5em;
  margin-top: 0px;
}
.compact-details .weather-info-group .info-box .info-value.small-text {
  font-size: 1em;
  margin-top: -1px;
}

#last-updated-text-container {
grid-column: 1 / -1;
grid-row: 2;
text-align: right;
font-size: 0.7em;
color: #777;
margin-top: 10px;
white-space: nowrap;
}

.widget-container .additional-info-grid:not(.compact-details) {
  /* Potentially empty */
}

.astro-info {
  width: 100%; /* Ensures it spans the full width of its container */
  margin-top: 16px; /* Adds space ABOVE the separator line */
  padding-top: 16px; /* Adds space BELOW the separator line */
  border-top: 1px solid rgba(0, 0, 0, 0.1); /* Adds a subtle separator line */
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
}

/* ======================================== */
/* --- Forecast Containers & Items --- */
/* ======================================== */
#hourly-forecast-container,
#seven-day-forecast-container {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
}
#hourly-forecast-container h3,
#seven-day-forecast-container h3 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 10px;
  color: #444;
}

/* --- START: Hourly Forecast Specific Styles --- */
#hourly-forecast-list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 5px 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f0f0f0;
}
#hourly-forecast-list::-webkit-scrollbar {
  height: 8px;
}
#hourly-forecast-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}
#hourly-forecast-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}

.hourly-item {
  flex-shrink: 0;
  width: auto;
  padding: 8px 8px;
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.hourly-item .hourly-time {
  font-weight: bold;
  font-size: 0.8em;
  margin-bottom: 5px;
  display: block;
  width: 100%;
  text-align: center;
}
.hourly-item .main-condition-icon {
  width: 60px;
  height: 60px;
  margin-top: 2px;
  margin-bottom: 8px;
  display: block;
}
.hourly-item .detail-item {
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 0.9em;
  color: #444;
  line-height: 1.5;
  margin-bottom: 4px;
  text-align: left;
  box-sizing: border-box;
}
.hourly-item .detail-item:last-of-type {
  margin-bottom: 0;
}
.hourly-item > .detail-item:last-of-type {
  margin-bottom: 8px;
}
.hourly-item .detail-icon {
  font-size: 1.2em;
  margin-right: 6px;
  color: #666666;
}
.hourly-item .hourly-temp-line {
  font-size: 1.2em;
  font-weight: 600;
}
.hourly-item .hourly-temp-line .detail-icon {
  font-size: 1.2em;
}
.hourly-details-more {
  border-top: 1px solid #eee;
  margin-top: 0px;
  padding-top: 8px;
  width: 100%;
}
.hourly-details-more .detail-item:last-child {
  margin-bottom: 0;
}
.hourly-forecast-card {
  flex-shrink: 0;
  width: 150px;
  padding: 12px;
  box-sizing: border-box;
  border-radius: 12px;
  box-shadow: 4px 4px 8px #d9dbde, -4px -4px 8px #ffffff;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.2s ease;
}

.hourly-forecast-card:hover {
  transform: translateY(-4px);
}

.hourly-card-time {
  font-size: 1em;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.hourly-card-icon img {
  width: 45px;
  height: 45px;
  margin: 0 auto;
}

.hourly-card-temp {
  font-size: 2em;
  font-weight: 700;
  color: #2c3e50;
  margin: 4px 0;
  line-height: 1;
}

.hourly-card-condition {
  font-size: 0.8em;
  font-weight: 500;
  color: #666;
  min-height: 30px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hourly-card-footer {
  display: flex;
  flex-direction: column; /* Stack details vertically */
  align-items: center;
  gap: 6px; /* Space between footer items */
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.hourly-card-footer .footer-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8em;
  color: #555;
}

.hourly-card-footer .footer-detail .material-symbols-outlined {
  font-size: 1.2em;
  opacity: 0.8;
}

/* Hide the now-unused original toggle button */
#toggle-all-hourly-details-btn {
  display: none;
}
/* ======================================== */
/* --- Icon Legend Styles (Subtle/Integrated) --- */
/* ======================================== */
.icon-legend {
  /* --- Core Flexbox properties for centering wrapped items --- */
  display: flex;          /* Makes .icon-legend a flex container */
  flex-wrap: wrap;        /* Allows .legend-item children to wrap to new lines */
  justify-content: center;/* Centers the items horizontally on each line */
  align-items: center;    /* Vertically aligns items if they wrap and have different heights */
  gap: 3px 10px;          /* Vertical gap (if wraps), Horizontal gap between items */

  /* --- Other styling (similar to your "Last Updated" preference) --- */
  width: 100%;            /* Ensure it takes available width to allow centering within it */
  box-sizing: border-box; /* Include padding in width calculation */
  padding: 5px 10px;      /* Add some horizontal padding so centered items don't touch edges */
  margin-top: 15px;
  margin-bottom: 5px;
  font-size: 0.65em;
  color: #777;
  line-height: 1.4;
  border-top: 1px solid #eee; /* Optional separator */
  /* text-align: center; /* Not needed for centering when using justify-content: center */
  clear: both;
}

/* Hide the H4 title if you are not using it */
.icon-legend h4 {
  display: none;
  /* If you use it, ensure it's styled appropriately:
  width: 100%;
  margin: 0 0 8px 0;
  text-align: center;
  font-size: 1.1em;
  color: #555;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  */
}

.legend-item {
  display: inline-flex; /* Keeps icon and text together, and allows item to be a flex child */
  align-items: center;  /* Vertically aligns icon and text within this item */
  color: inherit;
  white-space: nowrap;  /* Prevents text within a single legend item from wrapping */
  /* margin-left: 10px;    Replaced by 'gap' on parent .icon-legend */
  /* margin-bottom: 3px;   Replaced by 'gap' on parent .icon-legend */
}

.legend-icon {
  font-size: 1.1em;
  margin-right: 3px; /* Space between icon and its text */
  color: inherit;
  opacity: 0.8;
  vertical-align: middle; /* Still good for inline-flex context */
}

#seven-day-forecast-list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
}
.daily-forecast-card {
  flex-shrink: 0;
  min-width: 130px;
  padding: 16px;
  box-sizing: border-box;
  border-radius: 12px;
  background: linear-gradient(145deg, #f7f7f7, #e6e6e6);
  box-shadow: 5px 5px 10px #cccccc, -5px -5px 10px #ffffff;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.daily-forecast-card:hover {
  transform: translateY(-5px);
  box-shadow: 7px 7px 15px #b9b9b9, -7px -7px 15px #ffffff;
}

.daily-card-header {
  margin-bottom: 12px;
}

.daily-card-day {
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
  overflow-wrap: break-word;
}

.daily-card-date {
  font-size: 0.8em;
  color: #777;
}

.daily-card-body {
  flex-grow: 1; /* Pushes the footer and button down */
}

.daily-card-icon img {
  width: 60px;
  height: 60px;
  margin: 0 auto 5px auto;
  display: block;
}

.daily-card-temps {
  margin-bottom: 5px;
}

.daily-card-temps .temp-high {
  font-size: 2.2em;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1;
}

.daily-card-temps .temp-low {
  font-size: 1.2em;
  font-weight: 500;
  color: #888;
  vertical-align: super;
  margin-left: 2px;
}

.daily-card-condition {
  font-size: 0.8em;
  font-weight: 500;
  color: #666;
  min-height: 30px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.daily-card-footer {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
}

.daily-card-footer .footer-detail {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9em;
  color: #666;
}

.daily-card-footer .footer-detail .material-symbols-outlined {
  font-size: 1.3em;
}

/* ======================================== */
/* --- Expanded Hourly Details --- */
/* ======================================== */
#expanded-hourly-forecast-container {
  margin-top: 20px;
  padding: 20px;
}
#expanded-hourly-forecast-container h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
#expanded-hourly-forecast-container h4 {
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 1em;
  font-weight: bold;
  color: #555;
}
.hourly-forecast-details-horizontal {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px 0;
}
.hourly-forecast-am-container,
.hourly-forecast-pm-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}
.expanded-hourly-item-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  min-width: 95px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 0;
  flex-shrink: 0;
  background-color: #fff;
}
.expanded-hourly-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}
.expanded-hourly-item-horizontal p {
  margin: 4px 0;
  font-size: 0.85em;
  white-space: nowrap;
}
.expanded-hourly-item-horizontal .hourly-time {
  font-weight: bold;
}

/* ======================================== */
/* --- Main Toggle Button & Container --- */
/* ======================================== */
#weather-details-toggle {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 1em;
  font-family: inherit;
  cursor: pointer;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
}
#expanded-weather-details {
  padding: 20px;
  margin-top: 0;
}
#expanded-weather-details h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* New styles for the hidden details within the new cards */
.hourly-forecast-card .hourly-details-more {
  border-top: 1px solid #ddd;
  margin-top: 10px;
  padding-top: 10px;
  display: none; /* Initially hidden */
}

.hourly-forecast-card .detail-item {
  display: flex;
  align-items: center;
  justify-content: center; /* Space out icon/value */
  font-size: 0.8em;
  color: #444;
  line-height: 1.6;
  width: 100%;
}

.hourly-forecast-card .detail-item .detail-icon {
  font-size: 1.2em;
  margin-right: 5px;
  opacity: 0.7;
}

/* ======================================== */
/* --- Weather Alert --- */
/* ======================================== */
.weather-alert {
  display: flex;
  align-items: center;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}
.weather-alert .alert-icon {
  font-size: 24px;
  margin-right: 15px;
}
.weather-alert .alert-text {
  font-size: 1em;
  line-height: 1.4;
}
.weather-alert .alert-text strong {
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* ======================================== */
/* --- Dressed-Up Avalanche Styles --- */
/* ======================================== */
#avalanche-container {
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto 20px auto;
}
.avalanche-header {
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.avalanche-header h3 {
  margin: 0;
}
.avalanche-header .forecast-highlights {
  font-size: 1em;
  color: #555;
  margin: 5px 0 0 0;
}

#avalanche-container h4 {
  text-align: center;
  font-size: 1.1em;
  margin-bottom: 10px;
  font-weight: 600;
  color: #444;
}

.danger-ratings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.danger-box {
  text-align: center;
}

.danger-level {
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1em;
  color: white;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.danger-label {
  margin-top: 5px;
  font-size: 0.9em;
  font-weight: 500;
  color: #666;
}

/* Official Avalanche Canada Danger Rating Colors */
.danger-low { background-color: #4CAF50; /* Green */ }
.danger-moderate { background-color: #FFC107; color: #333; /* Yellow */ }
.danger-considerable { background-color: #FF9800; /* Orange */ }
.danger-high { background-color: #F44336; /* Red */ }
.danger-extreme { background-color: #212121; /* Black */ }
.danger-none { background-color: #BDBDBD; /* Grey for N/A */ }

.forecast-content {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.forecast-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8em;
  color: #777;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-section h4 {
  text-align: left;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
}

.full-forecast-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-weight: 600;
}

/* ===== Aquarius sparklines ===== */
.aq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.aq-item span { display:block; color:#6b7280; font-size:13px; }
.aq-item strong { display:block; font-size:18px; margin-top:2px; }

/* wrapper + svg sizing */
.aq-spark-wrap { position: relative; height: 46px; margin-top: 6px; }
.aq-spark-wrap svg { width: 100%; height: 40px; display: block; }

.aq-spark-wrap .spark-tip,
.aq-card-b > .spark-tip {
  position: static;
  display: block;
  margin-top: 6px;
  text-align: center;
  background: none;
  color: #444;
  font: 12px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 0;
  pointer-events: none;
  box-shadow: none;
}

svg .btr-cursor { stroke:#9ca3af; stroke-width:1; }

/* optional dot at the hovered point (JS must create <div class="aq-spark-dot">) */
.aq-spark-wrap .aq-spark-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin-left: -4px;       /* center on x */
  margin-top: -4px;        /* center on y */
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.2);
  display: none;
  z-index: 2;
}

/* svg path + midline (used by JS with class names) */
svg .btr-midline { stroke:#e5e7eb; stroke-width:1 }
svg .btr-path    { stroke:#2563eb; stroke-width:2; fill:none }

/* keep svg size for safety where used outside wrap */
.aq-spark { width:100%; height:42px; display:block }

/* ==== Aquarius cards ==== */
.aq-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:8px}
.aq-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 6px 18px rgba(0,0,0,.06);overflow:hidden}
.aq-card-h{display:flex;align-items:center;justify-content:space-between;padding:10px 12px}
.aq-card-title{font:600 13px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;opacity:.9}
.aq-card-value{font:700 18px/1 system-ui}
.aq-card-tgl{display:flex;align-items:center;gap:6px;font:12px/1 system-ui;opacity:.8;cursor:pointer;user-select:none}
.aq-card-tgl .chev{transition:transform .2s ease}
.aq-card.open .aq-card-tgl .chev{transform:rotate(180deg)}

.aq-card-b{display:none;border-top:1px solid #f1f5f9;padding:8px 10px}
.aq-card.open .aq-card-b{display:block}

.aq-spark{width:100%;height:42px;display:block}

/* spark path + midline colors */
svg .btr-midline{stroke:#e5e7eb;stroke-width:1}
svg .btr-path{stroke:#2563eb;stroke-width:2;fill:none}

/* ======================================== */
/* --- Mobile Responsiveness (Full Clean v2) --- */
/* ======================================== */
@media (max-width: 960px) {
  /* Base type + spacing */
  body { font-size: 14px; }
  h2 { margin: 14px 0; }
  .panel { padding: 12px; }

  /* Layout */
  .container {
    flex-direction: column;
    padding: 10px;
    gap: 12px;
  }
  #map, #info-panel {
    width: 100%;
    margin-bottom: 12px;
    min-height: auto;
  }
  #map { height: 480px; }
  #info-panel { padding: 12px; }
  .info-title { font-size: 20px; }

  /* Map switcher */
  .map-switcher-container {
    padding: 12px;
    margin: 12px auto;
  }
  .switcher-btn {
    padding: 10px 14px;
    font-size: 0.9em;
  }

.aq-grid { grid-template-columns: 1fr; }

  /* Buttons */
  .common-link-button,
  .resort-link,
  .forecast-toggle,
  .common-toggle-btn,
  .daily-forecast-card .expand-hourly-btn {
    padding: 8px 10px;
    font-size: 0.9em;
    margin-top: 10px;
  }

  /* Webcams */
  #webcam-frame { gap: 8px; }
  .webcam-section { width: 100%; }
  .webcam-section img {
    height: auto;
    max-height: 180px;
  }

  /* ------------------------------ */
  /* Current Weather (mobile)       */
  /* ------------------------------ */
  .widget-container {
    padding: 10px;
    overflow: hidden;
  }

  .widget-container .current-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    text-align: center;
    min-width: 0; /* allow shrink */
  }

  .widget-container .weather-icon {
    width: 80px; height: 80px; margin: 0 auto;
  }
  .widget-container .weather-icon img,
  .widget-container .weather-icon svg {
    width: 100%; height: 100%;
  }

  .widget-container .temp-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    background: transparent;
    box-shadow: none;
    min-width: 0;
  }
  .widget-container .temperature {
    font-size: 44px; font-weight: 700; color: #2c3e50; margin: 0;
  }
  .widget-container .weather-condition {
    font-size: 1em; margin-top: 2px; color: #444;
  }
  .widget-container .feels-like-inline {
    font-size: 0.9em; margin-top: 4px; color: #666;
  }
  .widget-container .temp-info .location {
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;     /* up to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    margin-top: 4px;
    font-size: 16px;
    line-height: 1.15;
    word-break: break-word;
    hyphens: auto;
  }

  /* Time line */
 .widget-container .time-display {
  width: 100%;
  display: flex !important;
  flex-direction: column;   /* stack vertical */
  align-items: stretch;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.85em;
  color: #777;
  order: 3;
  box-sizing: border-box;
  text-align: center;       /* center align both by default */
}

.widget-container .time-display .name,
.widget-container .time-display > :first-child {
  text-align: center;       /* name centered */
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;    /* max 2 lines */
  -webkit-box-orient: vertical;
}

.widget-container .time-display .datetime,
.widget-container .time-display > :last-child {
  text-align: center;       /* date/time centered under name */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
  .widget-container .clock,
  .widget-container .date {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #last-updated-text-container {
    text-align: center;
    margin-top: 6px;
    font-size: 0.7em;
    color: #777;
  }

  /* --------------------------------------------- */
  /* Weather chips: stacked vertical horizontal-cards
     - Label (description) on TOP CENTER
     - Icon LEFT, Value RIGHT (same row)
  /* --------------------------------------------- */
  .additional-info-grid.compact-details {
    display: flex;
    flex-direction: column;   /* stack cards vertically */
    gap: 8px;
    padding: 6px 0;
    order: 4;
  }

  .compact-details .weather-info-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
    gap: 12px; /* spacing between boxes */
    width: 100%;
  }

  .compact-details .weather-info-group .group-title { display: none; }

  .compact-details .weather-info-group .info-box {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Top-center label */
  .compact-details .info-label {
    grid-area: label;
    justify-self: center;
    font-size: 0.8em;
    font-weight: 600;
    color: #666;
    line-height: 1.1;
    text-align: center;
  }

  /* Left icon */
  .compact-details .info-icon {
    grid-area: icon;
    font-size: 18px;
    color: #555;
    justify-self: start;
  }

  /* Right reading/value */
  .compact-details .info-value {
    grid-area: value;
    justify-self: end;
    font-size: 0.95em;
    font-weight: 700;
    color: #333;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hourly Forecast */
  #hourly-forecast-container { padding: 10px; }
  #hourly-forecast-list { gap: 8px; }
  .hourly-forecast-card {
    width: 120px; padding: 8px;
  }
  .hourly-card-icon img { width: 40px; height: 40px; }
  .hourly-card-temp { font-size: 1.6em; }
  .hourly-card-footer { gap: 4px; }

  /* Expanded hourly stripe */
  .hourly-forecast-details-horizontal { gap: 10px; padding: 8px 0; }
  .hourly-forecast-am-container,
  .hourly-forecast-pm-container { gap: 8px; }
  .expanded-hourly-item-horizontal {
    min-width: 88px; padding: 8px;
  }

  /* Seven Day */
  #seven-day-forecast-container { padding: 10px; }
  #seven-day-forecast-list { gap: 8px; }
  .daily-forecast-card {
    min-width: 110px; padding: 12px;
  }
  .daily-card-temps .temp-high { font-size: 1.8em; }
  .daily-card-temps .temp-low { font-size: 1.05em; }

  /* Icon legend */
  .icon-legend {
    font-size: 0.65em;
    margin-top: 8px;
    padding: 6px;
    gap: 2px 6px;
    justify-content: center;
  }
  .legend-icon { font-size: 1.1em; }

  /* Avalanche module */
  #avalanche-container { padding: 12px; }
  .danger-ratings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  /* Extra-small screens tightener */
  @media (max-width: 390px) {
    .widget-container .temperature { font-size: 38px; }
    .widget-container .temp-info .location { font-size: 15px; }
    .widget-container .weather-condition { font-size: 0.95em; }
    .compact-details .info-value { font-size: 0.9em; }
    .compact-details .info-label { font-size: 0.75em; }
  }
  @media (max-width: 360px) {
    .widget-container .temperature { font-size: 34px; }
    .widget-container .temp-info .location { font-size: 14px; }
  }
}