/* ==========================================================================
   Wetter & Mikroklima Seite (Vollbild-Cockpit)
   ========================================================================== */

.weather-page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.weather-page-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.weather-page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #38bdf8, #33d69f);
}

.weather-page-title-group h1 {
  font-family: var(--font-family-serif);
  font-size: 1.85rem;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.2;
}

.weather-page-title-group p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.weather-page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-weather-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108, 93, 211, 0.12);
  border: 1px solid rgba(108, 93, 211, 0.3);
  color: var(--primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-weather-refresh:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Cockpit Grid */
.weather-cockpit-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
}

/* Main Live Card */
.weather-main-live-card {
  background: linear-gradient(135deg, rgba(26, 32, 44, 0.75), rgba(15, 23, 42, 0.85));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .weather-main-live-card {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
}

.weather-live-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.weather-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108, 93, 211, 0.15);
  border: 1px solid rgba(108, 93, 211, 0.3);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weather-live-icon-lg {
  width: 72px;
  height: 72px;
  color: #ff9800;
  filter: drop-shadow(0 0 16px rgba(255, 152, 0, 0.4));
  transition: transform var(--transition-normal);
}

.weather-main-live-card:hover .weather-live-icon-lg {
  transform: scale(1.08) rotate(5deg);
}

.weather-live-temp-group {
  margin: 18px 0;
}

.weather-live-temp {
  font-size: 3.6rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -2px;
  line-height: 1;
}

.weather-live-desc {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 8px;
}

.weather-live-feels {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Scientific Precision Live Strip */
.weather-live-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 12px 0;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

[data-theme="light"] .weather-live-strip {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
}

.weather-strip-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weather-strip-label {
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.weather-strip-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.weather-live-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.weather-live-footer strong {
  color: var(--text-heading);
}

/* Secondary Environmental Grid */
.weather-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.weather-metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.weather-metric-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.weather-metric-tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.weather-metric-tile-header svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.weather-metric-tile-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 10px 0 4px 0;
  line-height: 1.1;
}

.weather-metric-tile-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Bio-Indicators / Eco Weather */
.weather-eco-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weather-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
}

.weather-section-title svg {
  width: 20px;
  height: 20px;
  color: var(--emerald);
}

.weather-eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.weather-eco-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.weather-eco-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.weather-eco-badge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eco-status-optimal {
  background: rgba(51, 214, 159, 0.15);
  color: #33d69f;
  border: 1px solid rgba(51, 214, 159, 0.3);
}

.eco-status-moderate {
  background: rgba(255, 176, 32, 0.15);
  color: #ffb020;
  border: 1px solid rgba(255, 176, 32, 0.3);
}

.eco-status-low {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.weather-eco-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-eco-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex-grow: 1;
}

/* Full Width Interactive Chart Card */
.weather-page-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.weather-page-chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.weather-chart-pills {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

[data-theme="light"] .weather-chart-pills {
  background: rgba(0, 0, 0, 0.04);
}

.weather-chart-pill-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.weather-chart-pill-btn:hover {
  color: var(--text-heading);
}

.weather-chart-pill-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.weather-page-canvas-wrapper {
  position: relative;
  height: 420px;
  width: 100%;
}

/* Table Card & Logger */
.weather-page-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.weather-table-wrapper {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.weather-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.weather-data-table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

[data-theme="light"] .weather-data-table th {
  background: #f8fafc;
}

.weather-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.weather-data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 1024px) {
  .weather-cockpit-grid {
    grid-template-columns: 1fr;
  }
  .weather-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .weather-eco-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .weather-metrics-grid {
    grid-template-columns: 1fr;
  }
  .weather-eco-grid {
    grid-template-columns: 1fr;
  }
  .weather-page-canvas-wrapper {
    height: 300px;
  }
}

/* ==========================================================================
   Advanced Upgrades: Alerts, Moon Phase, Forecast Mode
   ========================================================================== */

/* Alerts Banner */
.weather-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.weather-alert-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  border: 1px solid transparent;
  animation: fadeIn var(--transition-fast) forwards;
}

.weather-alert-frost {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.weather-alert-rain {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

.weather-alert-heat {
  background: rgba(255, 112, 67, 0.12);
  border-color: rgba(255, 112, 67, 0.3);
  color: #ff7043;
}

.weather-alert-wind {
  background: rgba(255, 176, 32, 0.12);
  border-color: rgba(255, 176, 32, 0.3);
  color: #ffb020;
}

.weather-alert-stable {
  background: rgba(51, 214, 159, 0.1);
  border-color: rgba(51, 214, 159, 0.25);
  color: #33d69f;
}

.weather-alert-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.weather-alert-text {
  color: var(--text-main);
  line-height: 1.4;
}

.weather-alert-text strong {
  color: var(--text-heading);
  display: block;
  margin-bottom: 2px;
}

/* Mode Switcher (History vs Forecast) */
.weather-mode-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

[data-theme="light"] .weather-mode-switcher {
  background: rgba(0, 0, 0, 0.05);
}

.weather-mode-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.weather-mode-btn:hover {
  color: var(--text-heading);
}

.weather-mode-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Sighting Form Weather Import Card */
.form-weather-import-card {
  background: linear-gradient(135deg, rgba(108, 93, 211, 0.1), rgba(56, 189, 248, 0.05));
  border: 1px dashed rgba(108, 93, 211, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.btn-import-weather {
  background: var(--primary);
  border: none;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-import-weather:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Interactive Weather Map, Satellite & Layer Switcher
   ========================================================================== */

.weather-map-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.weather-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.weather-map-layer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

[data-theme="light"] .weather-map-layer-bar {
  background: rgba(0, 0, 0, 0.03);
}

.weather-layer-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.weather-layer-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-right: 4px;
}

.weather-layer-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.weather-layer-pill:hover {
  color: var(--text-heading);
  border-color: var(--primary);
  background: rgba(133, 114, 255, 0.08);
}

.weather-layer-pill.active {
  background: linear-gradient(135deg, var(--primary) 0%, #6C5DD3 100%);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.weather-map-viewport {
  position: relative;
  width: 100%;
  height: 460px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #0d1117;
}

.wp-gis-container,
.wp-windy-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.wp-leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 2;
}

.wp-weather-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 400;
  pointer-events: none;
}

.wp-map-legend {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 500;
  background: rgba(15, 19, 28, 0.92);
  border: 1px solid rgba(133, 114, 255, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 0.76rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 210px;
  pointer-events: none;
}

[data-theme="light"] .wp-map-legend {
  background: rgba(255, 255, 255, 0.94);
  color: #1e293b;
  border-color: rgba(108, 93, 211, 0.25);
}

.wp-legend-title {
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wp-legend-bar {
  height: 7px;
  width: 100%;
  border-radius: 4px;
}

.wp-legend-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Custom Sector Station Badges on Satellite Map */
.wp-sector-marker {
  background: rgba(15, 19, 28, 0.9);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -50%);
}


