/* ==========================================================================
   Prithvi-WxC Forecast Comparison - Operational Meteorological Stylesheet
   ========================================================================== */

:root {
  --bg-page: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-header: #0b192c;
  --bg-header-accent: #132a4a;
  --border-subtle: #cbd5e1;
  --border-light: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-ecmwf: #0284c7;
  --accent-ecmwf-bg: #e0f2fe;
  --accent-gfs: #d97706;
  --accent-gfs-bg: #fef3c7;
  --status-online: #10b981;
  --status-offline: #ef4444;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --radius-md: 8px;
  --radius-lg: 10px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Override Tethys default chrome so the meteorological workbench uses full width cleanly */
#app-header,
.tethys-app-header,
#app-navigation,
#app-actions {
  display: none !important;
}

#app-content-wrapper,
#inner-app-content,
#app-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  background: var(--bg-page) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  transform: none !important;
}

.prithvi-app-shell {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   A. APPLICATION HEADER
   ========================================================================== */
.prithvi-header {
  background: linear-gradient(135deg, var(--bg-header) 0%, var(--bg-header-accent) 100%);
  color: #f8fafc;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 2px solid #1e3a5f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.app-main-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.app-subtitle {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 2px 0 0 0;
  font-weight: 500;
}

.header-Telemetry {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.telemetry-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 5px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pill-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 600;
}

.pill-value {
  font-size: 0.84rem;
  color: #f8fafc;
  font-family: var(--font-mono);
}

.pill-value.mono-sm {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.source-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.source-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.source-status-badge.offline {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-online);
}

.source-status-badge.offline .status-dot {
  background: var(--status-offline);
}

/* Alert Banner */
.prithvi-alert-banner {
  margin: 0 16px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 500;
}

.prithvi-alert-banner.error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
}

/* ==========================================================================
   B. FORECAST CONFIGURATION PANEL
   ========================================================================== */
.forecast-config-panel {
  margin: 0 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.config-panel-header {
  background: #f8fafc;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.config-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.config-title-group h2 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.variable-meta-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.meta-badge {
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.meta-method {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.config-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
}

.config-row {
  display: grid;
  gap: 14px;
  align-items: end;
}

.config-row-primary {
  grid-template-columns: 1.1fr 1.8fr 1.3fr;
}

.config-row-time {
  grid-template-columns: 1.1fr 2.9fr;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.config-row-viz {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.control-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

.input-with-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dual-select-group {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 6px;
}

.met-select {
  width: 100%;
  height: 36px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.met-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.cycle-tag,
.unit-tag {
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.unit-tag {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

/* Timeline Scrubber Controls */
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.time-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-time-nav {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-time-nav:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.btn-time-nav.btn-play {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-time-nav.btn-play:hover {
  background: var(--accent-primary-hover);
}

.btn-time-nav.btn-play.playing {
  background: #dc2626;
  border-color: #dc2626;
}

.valid-forecast-readout {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead-chip {
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
}

.valid-timestamp-chip {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 5px;
}

.slider-track-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.met-range-slider {
  width: 100%;
  height: 6px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.69rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Row 3 Visualization Toggles & Action Buttons */
.viz-toggles-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.viz-group-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.met-toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.met-toggle-switch input {
  display: none;
}

.toggle-slider {
  width: 34px;
  height: 19px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-slider::after {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.met-toggle-switch input:checked + .toggle-slider {
  background: var(--accent-primary);
}

.met-toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(15px);
}

.toggle-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.opacity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.opacity-control input[type="range"] {
  width: 85px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.viz-action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-met {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-met-primary {
  background: #0ea5e9;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-met-primary:hover {
  background: #0284c7;
}

.btn-met-secondary {
  background: #0f172a;
  color: #ffffff;
}

.btn-met-secondary:hover {
  background: #1e293b;
}

.btn-met-outline {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-met-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* ==========================================================================
   6. SHARED SCIENTIFIC COLOR SCALE & LEGEND BAR
   ========================================================================== */
.shared-legend-panel {
  margin: 0 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-var-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-scale-mode-badge {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.legend-scale-mode-badge.independent {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.legend-var-title h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.legend-stats-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
}

.combined-stat-pill {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0c4a6e;
}

.ecmwf-stat-pill {
  border-left: 3px solid var(--accent-ecmwf);
}

.gfs-stat-pill {
  border-left: 3px solid var(--accent-gfs);
}

.diff-stat-pill {
  background: #f8fafc;
  color: #334155;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-val {
  font-family: var(--font-mono);
  font-weight: 600;
}

.stat-sub {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--text-muted);
}

.legend-colorbar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.colorbar-visual-track {
  position: relative;
  height: 18px;
  width: 100%;
  border-radius: 4px;
  border: 1px solid #94a3b8;
  overflow: hidden;
  background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725);
}

.wms-colorbar-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.colorbar-ticks-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 2px;
}

/* ==========================================================================
   5. MAIN MAP VISUALIZATION (Two-Column Synchronized Maps)
   ========================================================================== */
.maps-comparison-grid {
  margin: 0 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.map-panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.2s ease;
}

.map-panel-card.ecmwf-card {
  border-top: 3px solid var(--accent-ecmwf);
}

.map-panel-card.gfs-card {
  border-top: 3px solid var(--accent-gfs);
}

/* Fullscreen Map Expansion State */
.map-panel-card.fullscreen-expanded {
  position: fixed !important;
  top: 10px !important;
  left: 10px !important;
  right: 10px !important;
  bottom: 10px !important;
  width: calc(100vw - 20px) !important;
  height: calc(100vh - 20px) !important;
  z-index: 9999 !important;
}

.map-panel-card.fullscreen-expanded .map-viewport-wrapper,
.map-panel-card.fullscreen-expanded .forecast-leaflet-map {
  height: calc(100vh - 76px) !important;
}

.map-card-header {
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-title-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-source-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.tag-ecmwf {
  background: var(--accent-ecmwf-bg);
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.tag-gfs {
  background: var(--accent-gfs-bg);
  color: #b45309;
  border: 1px solid #fde68a;
}

.map-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.map-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-meta-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.btn-map-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-map-icon:hover {
  background: #e2e8f0;
}

.map-viewport-wrapper {
  position: relative;
  width: 100%;
  height: 470px;
  background: #dbeafe;
}

.forecast-leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-loading-overlay {
  position: absolute;
  top: 12px;
  right: 54px;
  z-index: 900;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.spinner-ring {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: prithvi-spin 0.75s linear infinite;
}

@keyframes prithvi-spin {
  to {
    transform: rotate(360deg);
  }
}

.map-coord-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ==========================================================================
   10. BOTTOM POINT VALUE INSPECTION & DATASET METADATA PANELS
   ========================================================================== */
.analysis-bottom-grid {
  margin: 0 16px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.info-card-header {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.info-card-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-card-subtitle {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.point-coord-badge {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  background: #0f172a;
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 6px;
}

.point-inspection-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.point-metrics-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.point-metric-box {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.point-metric-box.box-ecmwf {
  border-left: 4px solid var(--accent-ecmwf);
}

.point-metric-box.box-gfs {
  border-left: 4px solid var(--accent-gfs);
}

.point-metric-box.box-diff {
  border-left: 4px solid #6366f1;
}

.pm-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.pm-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pm-unit {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* SVG 5-Day Comparative Time-Series Chart */
.point-timeseries-container {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.ts-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.ts-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ts-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
}

.ts-swatch {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.swatch-ecmwf {
  background: var(--accent-ecmwf);
}

.swatch-gfs {
  background: var(--accent-gfs);
}

.ts-svg-wrapper {
  width: 100%;
  min-height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ts-empty-prompt {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 28px 16px;
}

.point-timeseries-svg {
  width: 100%;
  height: 175px;
  overflow: visible;
}

/* Dataset Metadata Table */
.dataset-info-table-wrapper {
  padding: 8px 16px 12px 16px;
}

.dataset-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.dataset-info-table th,
.dataset-info-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.dataset-info-table th {
  width: 38%;
  color: var(--text-secondary);
  font-weight: 600;
}

.dataset-info-table td {
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.dataset-info-table code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #0f172a;
}

.catalog-link {
  margin-left: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
}

.catalog-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablet & Mobile Stacking)
   ========================================================================== */
@media (max-width: 1100px) {
  .config-row-primary {
    grid-template-columns: 1fr 1fr;
  }
  .config-row-time {
    grid-template-columns: 1fr;
  }
  .analysis-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .maps-comparison-grid {
    grid-template-columns: 1fr;
  }
  .config-row-primary {
    grid-template-columns: 1fr;
  }
  .map-viewport-wrapper {
    height: 400px;
  }
  .point-metrics-cards {
    grid-template-columns: 1fr;
  }
}
