/* Minimal fallback color classes used by history.php table cells. These ensure value classes like
  `temp-24`, `rain-2`, `wind-10`, `uv-moderate` have visible styling even when page-specific CSS
  isn't present. The full detailed palette lives in `assets/css/main.css` and `assets/css/styles.css`;
  these are conservative, low-risk fallbacks. */
td.temp-50, td.temp-45, td.temp-40, td.temp-35, td.temp-30, td.temp-27,
td.temp-24, td.temp-22, td.temp-20, td.temp-18, td.temp-16, td.temp-14,
td.temp-12, td.temp-10, td.temp-8, td.temp-6, td.temp-4, td.temp-2,
td.temp-0, td.temp--2, td.temp--4 {
  font-weight: 700;
}
/* Rain/wind/uv minimal indicators */
td.rain-0 { color: inherit; }
td.rain-2 { background: #e6f7ff; }
td.rain-5 { background: #cceeff; }
td.rain-10 { background: #99ddff; }
td.rain-20 { background: #66ccff; }
td.rain-30 { background: #3399ff; color: #fff; }

.wind-0, .wind-10, .wind-20, .wind-30, .wind-40, .wind-50 { padding: 2px 6px; border-radius:4px; }
.uv-low { background: #dffcf2; }
.uv-moderate { background: #fff3d9; }
.uv-high { background: #ffe0b2; }
.uv-veryhigh { background: #ffcc80; }
.uv-extreme { background: #ffb74d; color: #000; }
/* Met Office / history value colors (theme-aware overrides) */
:root {
  --met-temp-very-cold: #0057b8;
  --met-temp-cold: #00aeef;
  --met-temp-cool: #00c4ff;
  --met-temp-mild: #00d166;
  --met-temp-warm: #ffd700;
  --met-temp-hot: #ff8c00;
  --met-temp-very-hot: #ff0000;
  --met-rain-light: #cfe9ff;
  --met-rain-medium: #7fc3ff;
  --met-rain-heavy: #2b8cff;
  --met-wind-low: #d4f4dd;
  --met-wind-medium: #ffe7b3;
  --met-wind-high: #ffd6d6;
  --met-uv-low: #a8e05f;
  --met-uv-moderate: #fdd74b;
  --met-uv-high: #ff9b57;
  --met-uv-vhigh: #fd7e14;
  --met-uv-extreme: #dc3545;
}

body.theme-dark td[class*="temp-"],
body.theme-dark span.temp-value {
  color: #fff !important;
}

/* Temperature bands for history table (backgrounds + text contrast) */
td[class*="temp-"] {
  font-weight: 600;
  text-align: right;
  padding-right: 0.5rem;
}
td.temp-50, td.temp-45, td.temp-40 { background: var(--met-temp-very-hot); color: #fff }
td.temp-35, td.temp-30, td.temp-27 { background: var(--met-temp-hot); color: #fff }
td.temp-24, td.temp-22, td.temp-20 { background: var(--met-temp-warm); color: #000 }
td.temp-18, td.temp-16, td.temp-14 { background: var(--met-temp-mild); color: #000 }
td.temp-12, td.temp-10, td.temp-8 { background: var(--met-temp-cool); color: #000 }
td.temp-6, td.temp-4, td.temp-2, td.temp-0 { background: var(--met-temp-cold); color: #fff }
td.temp--2, td.temp--4 { background: var(--met-temp-very-cold); color: #fff }

/* Rain / Wind / UV cells */
td.rain-0, td.rain-1 { background: #f4f9ff; color: #002 } 
td.rain-2, td.rain-3 { background: var(--met-rain-light); color: #001 }
td.rain-4, td.rain-5 { background: var(--met-rain-medium); color: #fff }
td.rain-6, td.rain-7 { background: var(--met-rain-heavy); color: #fff }

td.wind-0, td.wind-1 { background: #f4fff5; color: #023 }
td.wind-2, td.wind-3 { background: #fff7e6; color: #4a2 }
td.wind-4, td.wind-5 { background: #ffecec; color: #700 }

.uv-index.low { background: var(--met-uv-low); color: #000; padding: 2px 6px; border-radius: 4px; }
.uv-index.moderate { background: var(--met-uv-moderate); color: #000; padding: 2px 6px; border-radius: 4px; }
.uv-index.high { background: var(--met-uv-high); color: #000; padding: 2px 6px; border-radius: 4px; }
.uv-index.veryhigh { background: var(--met-uv-vhigh); color: #fff; padding: 2px 6px; border-radius: 4px; }
.uv-index.extreme { background: var(--met-uv-extreme); color: #fff; padding: 2px 6px; border-radius: 4px; }

/* Ensure history summary block visibility */
.history-summary { margin-bottom: 1rem; display:flex; gap:1rem; align-items:center }
.history-summary .summary-item { padding:6px 10px; border-radius:8px; background: rgba(0,0,0,0.03); }

/* Base Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
  border: none;
}

.card-header {
  font-weight: 600;
}

.current-temp {
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1.1;
}

/* Center the weather icon */
.current-conditions .weather-icon-container {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.weather-icon {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
}

/* Make sure the icon is centered in the card */
.current-conditions {
  text-align: center;
}

.main-temp {
  font-size: 2.5rem;
  margin: 10px 0;
  font-weight: bold;
}

/* Data Update Animation */
.data-updated {
  animation: highlightUpdate 2s;
}

@keyframes highlightUpdate {
  0% {
    color: #dc3545;
    font-weight: bold;
  }
  100% {
    color: inherit;
    font-weight: normal;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .display-4 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .weather-icon {
    font-size: 3rem;
  }
}

/* Moon Image */
#moonImage {
  max-width: 100px;
  height: auto;
}

/* Webcam Image */
#webcamImage {
  border: 1px solid #dee2e6;
  transition: opacity 0.3s;
}

#webcamImage:hover {
  opacity: 0.9;
}

/* Trend arrow styles */
.trend-arrow { font-size: 1.5em; line-height: 1; display: inline-block; vertical-align: baseline; transition: color 0.2s ease; margin-left: 0.25em; }

.trend-up {
  color: #28a745;
}

.trend-down {
  color: #dc3545;
}

.trend-steady {
  color: #6c757d;
}

@keyframes bounceUp {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes bounceDown {
  0% { transform: translateY(0); }
  50% { transform: translateY(6px); }
  100% { transform: translateY(0); }
}

/* One-shot animation trigger. Apply .trend-animate together with .trend-up/.trend-down to run two quick bounces. */
.trend-animate.trend-up {
  animation-name: bounceUp;
  animation-duration: 0.45s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 2;
  animation-fill-mode: forwards;
}
.trend-animate.trend-down {
  animation-name: bounceDown;
  animation-duration: 0.45s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: 2;
  animation-fill-mode: forwards;
}

/* Bootstrap tooltip style fallback */
.simple-tooltip {
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  pointer-events: none;
}

/* Weather Extremes Card Styling */
.extreme-item {
  margin-bottom: 0.75rem;
}

.extreme-label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.extreme-value {
  font-weight: 500;
}

.extreme-location {
  color: #6c757d;
  font-size: 0.875em;
}

/* Tab styling */
.nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
  border: none;
  color: #495057;
  padding: 0.75rem 1rem;
  transition: all 0.2s;
}

.nav-tabs .nav-link.active {
  color: #0d6efd;
  background-color: transparent;
  border-bottom: 2px solid #0d6efd;
}

.nav-tabs .nav-link:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Flag images */
.nav-tabs .nav-link img {
  vertical-align: text-top;
  margin-right: 5px;
  border: 1px solid #dee2e6;
  border-radius: 2px;
}

/* Icon colors */
.bi-thermometer-high {
  color: #dc3545;
}
.bi-thermometer-low {
  color: #0d6efd;
}
.bi-thermometer-sun {
  color: #fd7e14;
}
.bi-cloud-rain {
  color: #17a2b8;
}
.bi-brightness-high {
  color: #ffc107;
}

/* Custom Tab Styles */
.nav-tabs-borderless {
  border-bottom: none;
}

.nav-tabs-borderless .nav-link {
  border: none;
  padding: 0.5rem 1rem;
  color: #495057;
  position: relative;
}

.nav-tabs-borderless .nav-link.active {
  color: #0d6efd;
  background-color: transparent;
}

.nav-tabs-borderless .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #0d6efd;
}

.nav-tabs-borderless .nav-link img {
  border: 1px solid #dee2e6;
  border-radius: 2px;
  vertical-align: text-top;
}

/* Moon Phase Images */
.moon-phase-img {
  width: 100px;
  height: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0 auto;
}

/* Extremes Tab Styling */
#extremesTabs {
  margin-bottom: 1rem;
}

.extreme-item {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.extreme-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.extreme-label {
  font-weight: 600;
  color: #495057;
  display: inline-block;
  width: 120px;
}

.extreme-value {
  font-weight: 500;
  color: #212529;
  margin-right: 5px;
}

.extreme-location {
  color: #6c757d;
  font-size: 0.85em;
}

/* Forecast Day/Night Sections */
.forecast-section {
  transition: all 0.3s ease;
}

.day-section {
  background-color: rgba(13, 110, 253, 0.1);
}

.night-section {
  background-color: rgba(33, 37, 41, 0.8);
}

/* Environmental Indicators */
.indicator-badge {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: bold;
  font-size: 0.8rem;
}

.uv-indicator {
  background-color: rgba(13, 110, 253, 0.2);
  color: #0d6efd;
}

.pollution-indicator {
  background-color: rgba(25, 135, 84, 0.2);
  color: #198754;
}

.pollen-indicator {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.weather-icon-sm {
  width: 48px;
  height: 48px;
}

.weather-symbol {
  height: 64px;
}

/* Temperature Badges */
.temperature-badge {
  background-color: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  min-width: 3rem;
  text-align: center;
}

/* Warning Sections */
.warning-yellow {
  background-color: #ffe923;
}

.warning-amber {
  background-color: #ff9900;
}

.warning-red {
  background-color: #cc0033;
}

/* Warning Card Styling */
.card-header.bg-danger {
  background-color: #dc3545 !important;
}

/* UV Index Colors */
.uv-high-bg {
  background-color: #fd7e14;
}
.uv-vhigh-bg {
  background-color: #dc3545;
}

/* Alert Boxes */
.uv-box,
.pollen-box,
.aqi-box {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  margin-right: 10px;
}

/* Time Period Icons */
.bi-sun::before {
  content: "\f1e3";
}
.bi-moon::before {
  content: "\f308";
}
.bi-sunrise::before {
  content: "\f321";
}

/* Met Office Credit */
.met-office-credit {
  border-top: 1px solid #eee;
  padding-top: 0.75rem;
  margin-top: 1rem;
}

/* Navbar Dropdown Fixes */
.navbar-dark .navbar-nav .dropdown-menu {
  background-color: #343a40;
}

.navbar-dark .navbar-nav .dropdown-item {
  color: rgba(255, 255, 255, 0.75);
}

.navbar-dark .navbar-nav .dropdown-item:hover,
.navbar-dark .navbar-nav .dropdown-item:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .dropdown-item.active,
.navbar-dark .navbar-nav .dropdown-item:active {
  color: #fff;
  background-color: #0d6efd;
}

/* Ensure dropdown stays open when hovering */
@media (min-width: 992px) {
  .navbar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
  }
}

/* Weather value boxes */
.weather-value {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
  margin: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);  
}

.weather-value.text-dark { color: #212529 !important; }
.weather-value.text-white { color: #fff !important; }

.current-temp-oval {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 72px;
    padding: 0 0.7em;    
    font-size: 2.0rem;
    font-weight: bold;
    line-height: 1.1;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: background 0.3s, color 0.3s;
    text-align: center;
    white-space: nowrap;
}

.temp-trend-arrow {
    font-size: 2.0rem;      /* Match or slightly less than your temp font size */
    margin-left: 0.3em;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}

.trend-arrow { font-size: 1.35em; line-height:1; margin-left: 0.25em; vertical-align: baseline; display:inline-block; transition: color 0.2s ease; }
.trend-up { color: #388e3c; }
.trend-down { color: #d32f2f; }
.trend-steady { color: #888; }
.trend-bounce {
    animation: bounce 0.5s;
}
@keyframes bounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-10px); }
    50%  { transform: translateY(0); }
    70%  { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* UV Index colors */
.uv-low {
  background-color: #4caf50;
}
.uv-moderate {
  background-color: #ffc107;
  color: black;
}
.uv-high {
  background-color: #ff9800;
}
.uv-veryhigh {
  background-color: #f44336;
}
.uv-extreme {
  background-color: #9c27b0;
}

/* Temperature colors */
.temp-50 { background-color: #100002 !important; color: #fff !important; }
.temp-45 { background-color: #1f0007 !important; color: #fff !important; }
.temp-40 { background-color: #3a000e !important; color: #fff !important; }
.temp-35 { background-color: #70001c !important; color: #fff !important; }
.temp-30 { background-color: #c30031 !important; color: #fff !important; }
.temp-27 { background-color: #e13d32 !important; color: #fff !important; }
.temp-24 { background-color: #f67639 !important; color: black !important; }
.temp-22 { background-color: #fc9f46 !important; color: black !important; }
.temp-20 { background-color: #ffb34c !important; color: black !important; }
.temp-18 { background-color: #ffc261 !important; color: black !important; }
.temp-16 { background-color: #ffc96c !important; color: black !important; }
.temp-14 { background-color: #ffd881 !important; color: black !important; }
.temp-12 { background-color: #ffe796 !important; color: black !important; }
.temp-10 { background-color: #ffeea1 !important; color: black !important; }
.temp-8  { background-color: #e3ecab !important; color: black !important; }
.temp-6  { background-color: #cfebb2 !important; color: black !important; }
.temp-4  { background-color: #b6e3b7 !important; color: black !important; }
.temp-2  { background-color: #91d5ba !important; color: black !important; }
.temp-0  { background-color: #7fcebc !important; color: black !important; }
.temp--2 { background-color: #60c3c1 !important; color: #fff !important; }
.temp--4 { background-color: #38aec4 !important; color: #fff !important; }
.temp--6 { background-color: #1d92c1 !important; color: #fff !important; }
.temp--8 { background-color: #3075ac !important; color: #fff !important; }
.temp--10 { background-color: #435897 !important; color: #fff !important; }
.temp--15 { background-color: #082376 !important; color: #fff !important; }
.temp--20 { background-color: #02154f !important; color: #fff !important; }
.temp--30 { background-color: #020f39 !important; color: #fff !important; }
.temp--40 { background-color: #01081e !important; color: #fff !important; }

/* Wind speed colors */
.wind-0   { background-color: #e8f5e9 !important; color: black !important; }
.wind-10  { background-color: #c8e6c9 !important; color: black !important; }
.wind-20  { background-color: #a5d6a7 !important; color: black !important; }
.wind-30  { background-color: #81c784 !important; color: black !important; }
.wind-40  { background-color: #66bb6a !important; color: #fff !important; }
.wind-50  { background-color: #4caf50 !important; color: #fff !important; }
.wind-60  { background-color: #43a047 !important; color: #fff !important; }
.wind-70  { background-color: #388e3c !important; color: #fff !important; }
.wind-80  { background-color: #2e7d32 !important; color: #fff !important; }
.wind-90  { background-color: #1b5e20 !important; color: #fff !important; }
.wind-100 { background-color: #0d3e10 !important; color: #fff !important; }

/* Rain colors */
.rain-0  { background-color: #e3f2fd !important; color: black !important; }
.rain-2  { background-color: #bbdefb !important; color: black !important; }
.rain-5  { background-color: #90caf9 !important; color: black !important; }
.rain-10 { background-color: #64b5f6 !important; color: #fff !important; }
.rain-20 { background-color: #42a5f5 !important; color: #fff !important; }
.rain-30 { background-color: #1e88e5 !important; color: #fff !important; }

/* Comparison indicators */
.comparison-higher {
  color: #dc3545;
  font-weight: bold;
}
.comparison-lower {
  color: #198754;
  font-weight: bold;
}
.comparison-equal {
  color: #0dcaf0;
  font-weight: bold;
}

/* Circular indicators */
.value-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: bold;
  margin: 0 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white;
}

/* Add to styles.css */
.card-header .bi {
  float: right;
  margin-left: 10px;
}

/* Table row hover effects */
.table-hover-effect tbody tr {
  transition: all 0.2s ease;
}

.table-hover-effect tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.table-hover-effect tbody td {
  position: relative;
}

.table-hover-effect tbody tr:hover td::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(13, 110, 253, 0.3) 0%,
    rgba(13, 110, 253, 0.8) 50%,
    rgba(13, 110, 253, 0.3) 100%
  );
}

/* Update animation */
.data-updated {
  animation: highlightUpdate 1s;
}

@keyframes highlightUpdate {
  0% {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.5);
    transform: scale(1.01);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

/* Table row hover effects */
.table-hover tbody tr {
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.table-hover tbody td {
  position: relative;
}

.table-hover tbody tr:hover td::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(13, 110, 253, 0.3) 0%,
    rgba(13, 110, 253, 0.8) 50%,
    rgba(13, 110, 253, 0.3) 100%
  );
}

/* Current conditions styling */
.current-conditions .weather-value {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  padding: 2px 5px;
  border-radius: 4px;
  margin-top: 2px;
}

/* Current Conditions */
.current-conditions {
  padding: 0 15px;
}

/* Weather value boxes */
.weather-value {
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: bold;
  min-width: 40px;
  text-align: center;
  margin: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: white !important;
  display: inline-block;
}

/* Ensure text is visible on colored backgrounds */
.temp-24,
.temp-22,
.temp-20,
.temp-18,
.temp-16,
.temp-14,
.temp-12,
.temp-10,
.temp-8,
.temp-6,
.temp-4,
.temp-2,
.temp-0,
.uv-moderate {
  color: black !important;
}

/* Add to weather-summary.php specific styles */
.trend-item span:last-child {
  font-weight: bold;
}

/* Consistent table styles */
.table-hover-effect tbody tr {
  transition: all 0.2s ease;
}

.table-hover-effect tbody tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.table-hover-effect tbody td {
  position: relative;
}

.table-hover-effect tbody tr:hover td::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(13, 110, 253, 0.3) 0%,
    rgba(13, 110, 253, 0.8) 50%,
    rgba(13, 110, 253, 0.3) 100%
  );
}

/* Loading states */
.ajax-loading {
  opacity: 0.7;
}

/* Error states */
.ajax-error {
  border-left: 4px solid #dc3545;
}

/* AJAX Update Animation */
.updated-value {
  background: #ffe066;
  color: #292123;
  border-radius: 0.3em;
  padding: 0 0.4em;
  animation: popOut 0.7s;
}

@keyframes popOut {
  0% { box-shadow: 0 0 0 0 #ffe066; transform: scale(1);}
  50% { box-shadow: 0 0 10px 4px #ffe066; transform: scale(1.15);}
  100% { box-shadow: 0 0 0 0 #ffe066; transform: scale(1);}
}

/* Add to your stylesheet */
.ajax-loading {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.updated-value {
  animation: highlightUpdate 2s ease;
  background-color: rgba(255, 255, 0, 0.2);
  border-radius: 3px;
  padding: 0 3px;
}

@keyframes highlightUpdate {
  0% {
    background-color: rgba(10, 239, 44, 0.5);
  }
  100% {
    background-color: transparent;
  }
}

/* Style for missing data */
.null-value {
  color: #6c757d;
  font-style: italic;
}

/* UV index badge styling */
.uv-index {
  display: inline-block;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
}

/* Consistent card styling */
.weather-card {
  padding: 10px;
  min-height: 300px; /* Fixed height for all cards */
}

/* Fixed width for labels and values */
.weather-detail {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 10px;
}

.weather-detail i {
  width: 24px; /* Fixed width for icons */
  text-align: center;
  margin-right: 8px;
}

.detail-label {
  width: 100px; /* Fixed width for labels */
  font-weight: 500;
  margin-right: 8px;
}

.detail-value {
  flex: 1;
  min-width: 60px; /* Minimum width for values */
  text-align: right;
  font-family: "Courier New", monospace; /* Monospace for consistent width */
}

/* Current conditions specific styling */
.current-conditions {
  padding: 10px;
  text-align: center;
}

.current-conditions .main-temp {
  font-size: 2.5rem;
  margin: 10px 0;
}

/* Wind compass styling */
.wind-direction {
  padding: 10px;
  text-align: center;
}

/* Compass Styles */
.compass-wrapper {
  width: 120px;
  height: 120px;
  position: relative;
  margin: 0 auto;
}

.compass-wrapper svg {
  width: 100%;
  height: 100%;
  /* Remove any shadow/glow from the compass graphic */
  filter: none;
  transition: transform 0.5s ease-out;
}

.compass-needle {
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

.wind-direction-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
}

.wind-data {
  flex: 1;
}

.wind-data p {
  margin-bottom: 5px;
}

/* UV index colors */
.uv-index {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Enhanced Wind Compass styles copied from dashboard.php */
.wind-compass-enhanced {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  margin-top: 10px;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Ensure a clear 20px space below the compass card before any divider/underline */
.wind-compass-card .card-body { padding-bottom: 20px; }

/* Theme panel helpers (override main-min.css without re-minify) */
.theme-panel { background:#ffffff; color:#222; }
.theme-subpanel { background:#f8fafc; color:#222; }
body.theme-dark .theme-panel { background:#181a1b !important; color:#e0e0e0 !important; }
body.theme-dark .theme-subpanel { background:#23272b !important; color:#f8f9fa !important; border:1px solid #2f353a !important; }

/* Station LED glow overrides to restore glow in both themes */
body.theme-light .station-led-badge.online {
  background: #fff; color:#000;
  box-shadow: 0 0 0 1px rgba(55,255,0,0.45), 0 0 8px rgba(40,231,40,0.65), 0 0 14px rgba(40,231,40,0.45);
  border: 1px solid rgba(55,255,0,0.35);
}
body.theme-light .station-led-badge.offline {
  background:#e72c2c; color:#fff;
  box-shadow: 0 0 0 1px rgba(231,44,44,0.6), 0 0 10px rgba(231,44,44,0.7), 0 0 18px rgba(231,44,44,0.55);
  border:1px solid rgba(231,44,44,0.65);
}
body.theme-light .station-led-badge.unknown {
  background:#ffc107; color:#333;
  box-shadow: 0 0 0 1px rgba(255,193,7,0.55), 0 0 10px rgba(255,193,7,0.7), 0 0 16px rgba(255,193,7,0.5);
  border:1px solid rgba(255,193,7,0.6);
}
body.theme-dark .station-led-badge.online {
  background:#23272b; color:#fff;
  box-shadow: 0 0 0 1px rgba(55,255,0,0.25), 0 0 10px rgba(55,255,0,0.6), 0 0 18px rgba(55,255,0,0.45);
  border:1px solid rgba(55,255,0,0.35);
}
body.theme-dark .station-led-badge.offline {
  background:#23272b; color:#ff6b6b;
  box-shadow: 0 0 0 1px rgba(255,107,107,0.25), 0 0 10px rgba(255,107,107,0.6), 0 0 18px rgba(255,107,107,0.45);
  border:1px solid rgba(255,107,107,0.35);
}
body.theme-dark .station-led-badge.unknown {
  background:#23272b; color:#ffc107;
  box-shadow: 0 0 0 1px rgba(255,193,7,0.25), 0 0 10px rgba(255,193,7,0.6), 0 0 18px rgba(255,193,7,0.45);
  border:1px solid rgba(255,193,7,0.35);
}

.compass-enhanced { width: 100%; height: 100%; position: relative; aspect-ratio: 1/1; margin-bottom: 8px; }
/* Provide a safe default tick radius at the container level */
.compass-enhanced { --tick-radius: calc(50% - 16px); }

.compass-frame-enhanced {
  position: absolute;
  /* Slightly wider watch-style bezel */
  top: -26px;
  left: -26px;
  right: -26px;
  bottom: -26px;
  border-radius: 50%;
  /* Simplified frame fill for light theme */
  background: #cdcdcd61;
  /* Remove heavy inner rim shadow for a cleaner look */
  box-shadow: none;
  z-index: 1;
}
/* subtle inner bezel ring */
.compass-face-enhanced::before {
	content: '';
	position: absolute;
	inset: 8px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 2px rgba(49, 87, 128, 0.51), inset 0 0 10px rgba(0,0,0,0.08);
	pointer-events: none;
}

.compass-face-enhanced { width:100%; height:100%; border-radius:50%; background:var(--card-bg, #fff); position:relative; border:2px solid var(--border-color); /* Keep ticks near the outer rim (visible) */ --tick-radius: calc(50% - 16px); z-index:2; }
/* Degree ring: faint 10° spokes for subtle guidance */
.compass-degree-lines { position:absolute; inset:0; border-radius:50%; pointer-events:none; z-index:2; }
.compass-degree-lines::before { content:""; position:absolute; inset:0; border-radius:50%; background:repeating-conic-gradient(
  from 0deg,
  rgba(0,0,0,0.08) 0deg 0.3deg,
  transparent 0.3deg 10deg
);} 
body.theme-dark .compass-degree-lines::before { background:repeating-conic-gradient(
  from 0deg,
  rgba(255,255,255,0.14) 0deg 0.25deg,
  transparent 0.25deg 10deg
);} 
/* faint conic grid for minor degrees (every 5deg), sits under ticks */
.compass-face-enhanced::after {
  content: '';
  position: absolute;
  inset: 12px; /* inside the inner ring */
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.18;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(0,0,0,0.15) 0deg 0.4deg,
    transparent 0.4deg 5deg
  );
}
body.theme-dark .compass-face-enhanced::after {
  opacity: 0.12;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255,255,255,0.18) 0deg 0.35deg,
    transparent 0.35deg 5deg
  );
}
/* Theme colors if main.css didn't set variables (redundant safety) */
body.theme-light .compass-face-enhanced { --card-bg:#ffffff; --border-color:#d4d7dc; color:#222; }
body.theme-dark .compass-face-enhanced {
	--card-bg: #1f2326;
	--border-color: #00000061;
	color: #fffffff7;
}
/* Improve contrast in dark theme */
body.theme-dark .compass-frame-enhanced {
  /* Slightly stronger inner gradient for contrast, keep solid rim */
  background: #0673ff17;
  box-shadow: inset 0 0 0 2px rgba(180,180,180,0.22);
}
body.theme-dark .compass-line-enhanced { background: rgba(255,255,255,0.18); }
/* Ticks: white on dark theme for strong contrast */
body.theme-dark .compass-tick-enhanced { background: rgba(255,255,255,0.9); }
body.theme-dark .compass-tick-enhanced.major { background: #ffffff; }
/* Direction labels positions */
.compass-directions-enhanced { position:absolute; inset:-54px; z-index:4; pointer-events:none; }
.compass-direction-enhanced { position:absolute; font-weight:600; font-size:1rem; color:inherit; text-shadow: none; }
/* Move the main lettering slightly further inside the bezel */
.compass-n-enhanced { top:13%; left:50%; transform:translate(-50%,-50%); }
.compass-e-enhanced { top:50%; right:14%; transform:translate(50%,-50%); }
.compass-s-enhanced { bottom:14%; left:50%; transform:translate(-50%,50%); }
.compass-w-enhanced { top:50%; left:13%; transform:translate(-50%,-50%); }
.compass-direction-enhanced.sub { font-weight:600; font-size:0.75rem; opacity:0.95; text-shadow: none; }
/* Diagonals slightly further inward to avoid frame overlap */
/* Move diagonals slightly inside so labels sit clearly within inner ring */
.compass-ne-enhanced { top:24%; right:24%; transform:translate(50%,-50%); }
.compass-se-enhanced { bottom:24%; right:24%; transform:translate(50%,50%); }
.compass-sw-enhanced { bottom:24%; left:24%; transform:translate(-50%,50%); }
.compass-nw-enhanced { top:24%; left:24%; transform:translate(-50%,-50%); }

.compass-lines-enhanced {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.compass-line-enhanced {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 47%;
  height: 1.5px;
  background: rgba(120, 120, 120, 0.45);
  transform-origin: left center;
}
/* Correct orientation: rotate clockwise so spokes line up with labels */
.compass-line-enhanced.n  { transform: translateY(-50%) rotate(-90deg); }
.compass-line-enhanced.ne { transform: translateY(-50%) rotate(-45deg); }
.compass-line-enhanced.e  { transform: translateY(-50%) rotate(0deg); }
.compass-line-enhanced.se { transform: translateY(-50%) rotate(45deg); }
.compass-line-enhanced.s  { transform: translateY(-50%) rotate(90deg); }
.compass-line-enhanced.sw { transform: translateY(-50%) rotate(135deg); }
.compass-line-enhanced.w  { transform: translateY(-50%) rotate(180deg); }
.compass-line-enhanced.nw { transform: translateY(-50%) rotate(-135deg); }

.compass-ticks-enhanced { position: absolute; width:100%; height:100%; z-index:3; }
/* Smaller, more transparent tick marks */
.compass-tick-enhanced { position:absolute; top:50%; left:50%; width:7px; height:2px; background:rgba(100,100,100,0.6); transform-origin:left center; border-radius:2px; }
.compass-tick-enhanced.major { width:12px; height:3px; background:rgba(80,80,80,0.85); }
/* Bezel-like dot markers on the frame for quarters */
.compass-enhanced::after { content: none; }

/* 60 tick marks */
.compass-tick-enhanced:nth-child(1)  { transform: translateY(-50%) rotate(6deg)    translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(2)  { transform: translateY(-50%) rotate(12deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(3)  { transform: translateY(-50%) rotate(18deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(4)  { transform: translateY(-50%) rotate(24deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(5)  { transform: translateY(-50%) rotate(30deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(6)  { transform: translateY(-50%) rotate(36deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(7)  { transform: translateY(-50%) rotate(42deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(8)  { transform: translateY(-50%) rotate(48deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(9)  { transform: translateY(-50%) rotate(54deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(10) { transform: translateY(-50%) rotate(60deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(11) { transform: translateY(-50%) rotate(66deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(12) { transform: translateY(-50%) rotate(72deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(13) { transform: translateY(-50%) rotate(78deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(14) { transform: translateY(-50%) rotate(84deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(15) { transform: translateY(-50%) rotate(90deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(16) { transform: translateY(-50%) rotate(96deg)   translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(17) { transform: translateY(-50%) rotate(102deg)  translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(18) { transform: translateY(-50%) rotate(108deg)  translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(19) { transform: translateY(-50%) rotate(114deg)  translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(20) { transform: translateY(-50%) rotate(120deg)  translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(21) { transform: translateY(-50%) rotate(126deg)  translateX(var(--tick-radius)); }
/* Needle for enhanced compass (from dashboard.php) */
.compass-needle-enhanced {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 5px;
  height: 39%;
  background: #4088f2;
  transform-origin: bottom center;
  transform: translate(-50%, 0) rotate(0deg);
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 3px;
  z-index: 5;
}
.compass-history-enhanced { position:absolute; inset:0; pointer-events:none; z-index:4; }
/* History dot markers sit on the outer rim. We use the compass face's --tick-radius so they never pile up in the centre. */
.compass-marker-enhanced {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--marker-color, #4088f2);
  /* Rotate to bearing, then translate outwards by the tick radius (fallback keeps them off-centre) */
  transform: translate(-50%, -50%) rotate(var(--bearing, 0deg)) translateY(calc(-1 * (var(--marker-radius, var(--tick-radius, calc(50% - 16px))))));
  box-shadow: none;
  opacity: 0.7;
  transition: opacity 0.4s ease;
}
body.theme-dark .compass-marker-enhanced { outline:1px solid rgba(255,255,255,0.15); }
body.theme-light .compass-marker-enhanced { outline:1px solid rgba(0,0,0,0.1); }

.compass-needle-enhanced::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid #4088f2;
}
/* Needle tail */
.compass-needle-enhanced::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #4088f2;
  opacity: 0.95;
}
/* Center readout: small red cap, sunken/3D direction text */
.compass-center-enhanced { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:35px; height:35px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#cdcdcd; color:#fff; border:2px solid #000; z-index:6; box-shadow: inset 0 1px 2px rgba(255,255,255,0.12), inset 0 -2px 4px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.35), 0 0 0 4px #4088f2; }


/* Place five arrows around the rim at fixed bearings: 0, 45, 90, 135, 180 */
.wind-compass-enhanced .rim-arrow {
  position:absolute;
  left:50%;
  top:50%;
  width:0; height:0;
  border-left:5px solid transparent; border-right:5px solid transparent; border-bottom:8px solid #4088f2;
  transform-origin:center bottom;
  /* Use compass tick radius so arrows sit on outer rim; fallback keeps them off center */
  transform: translate(-50%, -50%) rotate(var(--bearing, 0deg)) translateY(calc(-1 * (var(--tick-radius, calc(50% - 16px)))));
  filter: none;
}
body.theme-dark .compass-center-enhanced { background:#323639; border-color:#000; color:#fff; }
.compass-center-direction { font-weight:600; font-size:0.71rem; letter-spacing:0.3px; opacity:1; text-shadow:none; color:#fff; }
body.theme-light .compass-center-direction { color: #000; }
body.theme-light .compass-center-enhanced {
  background: #cdcdcd;
  color: #fff;
  border: none;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.12), inset 0 -2px 4px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.35), 0 0 0 4px #4088f2;
}

/* Arrowhead history markers on inner rim */
.compass-history-enhanced { position:absolute; inset:0; pointer-events:none; z-index:4; }
.compass-marker-arrow { position:absolute; top:50%; left:50%; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-bottom:7px solid var(--marker-color, #2ecc71); transform-origin: 50% 8px; filter: none; opacity:0.78; }
.compass-marker-arrow.faded { opacity:0.5; }

/* Ajax flash highlight */
.ajax-flash-green { animation: ajaxFlashGreen 900ms ease-out; position: relative; }
@keyframes ajaxFlashGreen { 0% { box-shadow: inset 0 0 0 9999px rgba(34,197,94,0.22); } 100% { box-shadow: inset 0 0 0 0 rgba(34,197,94,0); } }
.compass-tick-enhanced:nth-child(22) { transform: translateY(-50%) rotate(132deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(23) { transform: translateY(-50%) rotate(138deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(24) { transform: translateY(-50%) rotate(144deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(25) { transform: translateY(-50%) rotate(150deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(26) { transform: translateY(-50%) rotate(156deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(27) { transform: translateY(-50%) rotate(162deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(28) { transform: translateY(-50%) rotate(168deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(29) { transform: translateY(-50%) rotate(174deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(30) { transform: translateY(-50%) rotate(180deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(31) { transform: translateY(-50%) rotate(186deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(32) { transform: translateY(-50%) rotate(192deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(33) { transform: translateY(-50%) rotate(198deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(34) { transform: translateY(-50%) rotate(204deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(35) { transform: translateY(-50%) rotate(210deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(36) { transform: translateY(-50%) rotate(216deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(37) { transform: translateY(-50%) rotate(222deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(38) { transform: translateY(-50%) rotate(228deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(39) { transform: translateY(-50%) rotate(234deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(40) { transform: translateY(-50%) rotate(240deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(41) { transform: translateY(-50%) rotate(246deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(42) { transform: translateY(-50%) rotate(252deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(43) { transform: translateY(-50%) rotate(258deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(44) { transform: translateY(-50%) rotate(264deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(45) { transform: translateY(-50%) rotate(270deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(46) { transform: translateY(-50%) rotate(276deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(47) { transform: translateY(-50%) rotate(282deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(48) { transform: translateY(-50%) rotate(288deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(49) { transform: translateY(-50%) rotate(294deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(50) { transform: translateY(-50%) rotate(300deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(51) { transform: translateY(-50%) rotate(306deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(52) { transform: translateY(-50%) rotate(312deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(53) { transform: translateY(-50%) rotate(318deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(54) { transform: translateY(-50%) rotate(324deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(55) { transform: translateY(-50%) rotate(330deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(56) { transform: translateY(-50%) rotate(336deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(57) { transform: translateY(-50%) rotate(342deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(58) { transform: translateY(-50%) rotate(348deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(59) { transform: translateY(-50%) rotate(354deg) translateX(var(--tick-radius)); }
.compass-tick-enhanced:nth-child(60) { transform: translateY(-50%) rotate(360deg) translateX(var(--tick-radius)); }

.uv-low {
  background-color: #a3cf62;
}
.uv-moderate {
  background-color: #ffdb5c;
  color: #333;
}
.uv-high {
  background-color: #fd9841;
}
.uv-veryhigh {
  background-color: #f1605d;
}

/* Beaufort scale background colors */
.bg-beaufort-1 {
  background-color: #e6f7ff;
}
.bg-beaufort-2 {
  background-color: #b3e6ff;
}
.bg-beaufort-3 {
  background-color: #80d4ff;
}
.bg-beaufort-4 {
  background-color: #4dc3ff;
}
.bg-beaufort-5 {
  background-color: #1ab2ff;
}
.bg-beaufort-6 {
  background-color: #0099e6;
}
.bg-beaufort-7 {
  background-color: #0080cc;
}
.bg-beaufort-8 {
  background-color: #006699;
}
.bg-beaufort-9 {
  background-color: #004d80;
}
.bg-beaufort-10 {
  background-color: #003366;
}
.bg-beaufort-11 {
  background-color: #001a33;
}
.bg-beaufort-12 {
  background-color: #000000;
  color: white;
}

/* Rain intensity colors */
.text-rain-light {
  color: #4da6ff;
}
.text-rain-moderate {
  color: #0066cc;
}
.text-rain-heavy {
  color: #004080;
}
.text-rain-violent {
  color: #001a33;
}

@keyframes pulse-up {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes pulse-down {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Add to your CSS */
.tooltip {
  pointer-events: none;
}

.trend-container {
  display: inline-block;
}

/* Fix for Bootstrap tooltips */
.tooltip-inner {
  max-width: 300px;
  padding: 8px;
}

/* LED dot for badge */
.station-led-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.24em 1em; /* more horizontal padding for space around inner badge */
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.85rem;
    background: #888;
    color: #4e4848;
    box-shadow: none;
    transition: background 0.3s, box-shadow 0.3s;
    vertical-align: middle;
    gap: 0.5em; /* more gap between elements */
    min-height: 1.6em;
}
.station-led-dot {
  display: inline-block;
  width: 0.60em;
  height: 0.63em;
  border-radius: 50%;
  background: #aaa;
  box-shadow: 0 0 4px #aaa;
  margin-left: 0.4em;
  margin-right: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.station-led-badge.online {
  background: #338a33;
  color: #cfc7c7;
  box-shadow: 0 0 8px #28e728, 0 0 12px #28e728;
}
.station-led-badge.online .station-led-dot {
  background: #00ff00;
  box-shadow: 0 0 8px #00ff00, 0 0 16px #00ff00;
}
.station-led-badge.offline {
  background: #e72c2c;
  color: #fff;
  box-shadow: 0 0 8px #e72c2c, 0 0 12px #e72c2c;
  animation: led-flash 1s infinite alternate;
}
.station-led-badge.offline .station-led-dot {
  background: #ff0000;
  box-shadow: 0 0 8px #ff0000, 0 0 16px #ff0000;
  animation: led-flash 1s infinite alternate;
}
.station-led-badge.unknown {
  background: #ffc107;
  color: #333;
  box-shadow: 0 0 8px #ffc107, 0 0 12px #ffc107;
}
.station-led-badge.unknown .station-led-dot {
  background: #ffc107;
  box-shadow: 0 0 8px #ffc107, 0 0 16px #ffc107;
}
@keyframes led-flash {
  from { opacity: 1; }
  to { opacity: 0.4; }
}

#currentConditionsContainer {
  min-height: 120px; /* or whatever fits your content */
  padding-top: 2em;  /* ensures the pill doesn't overlap the spinner */
}

.station-led-badge,
.station-led-dot,
.station-led-badge.online,
.station-led-badge.online .station-led-dot,
.station-led-badge.offline,
.station-led-badge.offline .station-led-dot,
.station-led-badge.unknown,
.station-led-badge.unknown .station-led-dot {
    box-shadow: none !important;
}

/* Default: white text for dark backgrounds */
.current-temp-oval {
  color: #fff;
}

/* Override to black for light backgrounds */
.current-temp-oval.temp-24,
.current-temp-oval.temp-22,
.current-temp-oval.temp-20,
.current-temp-oval.temp-18,
.current-temp-oval.temp-16,
.current-temp-oval.temp-14,
.current-temp-oval.temp-12,
.current-temp-oval.temp-10,
.current-temp-oval.temp-8,
.current-temp-oval.temp-6,
.current-temp-oval.temp-4,
.current-temp-oval.temp-2,
.current-temp-oval.temp-0 {
  color: #222 !important;
}

.aqi-box, .pollen-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 4px;
}

.uv-box, .pollen-box, .aqi-box {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1rem;
}
.pollen-vhigh-bg { background-color: #a259d9 !important; } /* Purple for Very High */
.pollen-box.text-purple, .pollen-box.pollen-vhigh-bg { background-color: #a259d9 !important; }
.small, .card-body.small, .card-body .small { font-size: 0.95em; }
.text-orange { color: #fd7e14 !important; }

/* Compact, flat, color-coded weather tables */
.weather-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.95em;
}
.weather-table th,
.weather-table td {
    padding: 0.25rem !important;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    min-width: 40px;
    max-width: 60px;
    border: 1px solid #dee2e6;
}
.weather-table th {
    background: #222;
    color: #fff;
}

.collapse.show + .text-end .bi-chevron-down,
[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.chevron-icon {
    transition: transform 0.2s;
}
.rotate-180 {
    transform: rotate(180deg);
}

/* Navbar styles */
.navbar-nav .nav-link {
  transition: color 0.2s, background 0.2s;
  border-radius: 0.3rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  background: #0d6efd;
  color: #fff !important;
}

.navbar-nav .dropdown-menu {
  background: #f8fafc;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.navbar-nav .dropdown-item {
  transition: background 0.2s, color 0.2s;
  border-radius: 0.3rem;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
  background: #0d6efd;
  color: #fff;
}

.alert-yellow {
        background-color: #ffe923 !important;
        color: #856404;
        border-color: #ffe923;
    }
    .alert-amber {
        background-color: #ff9900 !important;
        color: #fff;
        border-color: #ff9900;
    }
    .alert-red {
        background-color: #cc0033 !important;
        color: #fff;
                border-color: #cc0033;
        }

.weather-card .card-body p.mb-1 {
    line-height: 2;
}

.ticker-badge {
    background: linear-gradient(90deg, #e0f7fa 60%, #b2ebf2 100%) !important;
    color: lch(34.94% 0.75 74.9) !important;
    border-radius: 1.5rem;
    font-weight: 500;
}

.record-ticker .record-item {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
    width: 100%;
    margin-bottom: 0.25rem;
}
@media (min-width: 576px) {
    .record-ticker .record-item {
        width: auto;
    }
}

.extreme-item { min-height: 2.2rem; }

/* Dark Theme Overrides */
body.theme-dark {
  background: #181a1b !important;
  color: #e0e0e0 !important;
}
body.theme-dark .card,
body.theme-dark .weather-card {
  background: #23272b !important;
  color: #e0e0e0 !important;
  border: none !important;
}
body.theme-dark .card-header,
body.theme-dark .card-header.bg-primary,
body.theme-dark .card-header.bg-secondary {
  background: #222831 !important;
  color: #fff !important;
}
body.theme-dark .table,
body.theme-dark .weather-card .table {
  color: #e0e0e0 !important;
  background-color: #23272b !important;
}
body.theme-dark .table thead,
body.theme-dark .table-light th,
body.theme-dark .table-light td {
  background: #23272b !important;
  color: #b0b8c1 !important;
}
body.theme-dark .table-bordered td, 
body.theme-dark .table-bordered th {
  border-color: #444 !important;
}
body.theme-dark .site-footer {
  background: #181a1b !important;
  color: #e0e0e0 !important;
  border-top: 1px solid #333 !important;
}
body.theme-dark .bg-warning,
body.theme-dark .alert-warning {
  background-color: #ffe066 !important;
  color: #111 !important;
}
body.theme-dark .bg-warning a,
body.theme-dark .alert-warning a {
  color: #000000 !important;
  text-decoration: underline;
}

body.theme-dark .weather-card.weather-extremes-card .card-body {
  color: #fff !important;
  background: #23272b !important;
}
body.theme-dark .weather-card.weather-extremes-card .extreme-label,
body.theme-dark .weather-card.weather-extremes-card .extreme-value {
  color: #fff !important;
}
body.theme-dark .weather-card.weather-extremes-card .extreme-location {
  color: #b0b8c1 !important;
}
body.theme-dark .weather-card.today-vs-yesterday-card .card-body,
body.theme-dark .weather-card.station-status-card .card-body {
  background: #23272b !important;
  color: #fff !important;
}
body.theme-dark .weather-card.today-vs-yesterday-card .table,
body.theme-dark .weather-card.station-status-card .table {
  color: #fff !important;
  background: #23272b !important;
}
body.theme-dark .weather-card.today-vs-yesterday-card .table th,
body.theme-dark .weather-card.today-vs-yesterday-card .table td,
body.theme-dark .weather-card.station-status-card .table th,
body.theme-dark .weather-card.station-status-card .table td {
  border-color: #444 !important;
}
body.theme-dark .text-muted,
body.theme-dark .small,
body.theme-dark .card-footer {
  color: #828890 !important;
}
body.theme-dark .navbar-nav .nav-link,
body.theme-dark .navbar-nav .nav-link:visited {
  color: #fff !important;
}

body.theme-dark .navbar-nav .nav-link:hover,
body.theme-dark .navbar-nav .nav-link:focus {
  color: #81d4fa !important; /* or #fff for pure white */
}

body.theme-dark a, body.theme-dark a:visited {
  color: #6e6868 !important;
}
body.theme-dark a:hover {
  color: #c2c2c2 !important;
}

.navbar-brand,
.navbar-brand:visited {
    color: #0d6efd !important; /* Bootstrap 5 primary */
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #0a58ca !important; /* Bootstrap 5 primary darken */
}

