/**
 * 🛡️ DISASTERS PANEL - Unified Styling
 * Tabbed interface for Seismic Waves + Floods
 * @version 1.0.0 (2025-12-02)
 */

/* ========================================
   PANEL CONTAINER
   ======================================== */

.disasters-panel {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 460px;
  max-height: calc(100vh - 100px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  z-index: 10000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(20px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0.14, 0.3, 1), 
              opacity 0.25s cubic-bezier(0.4, 0.14, 0.3, 1);
}

.disasters-panel.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
}

/* ========================================
   HEADER
   ======================================== */

.disasters-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.floods-panel-chrome {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.floods-panel-heading {
  min-width: 0;
}

.floods-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.floods-sheet-handle-wrap,
.floods-panel-subtitle,
.floods-panel-status-row {
  display: none;
}

.floods-sheet-handle-wrap {
  align-items: center;
  justify-content: center;
  padding: 12px 0 2px;
}

.floods-sheet-handle {
  width: 52px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.46);
  color: #cbd5e1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.floods-sheet-handle:hover {
  background: rgba(100, 116, 139, 0.5);
  border-color: rgba(148, 163, 184, 0.26);
}

.floods-sheet-handle-icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.floods-sheet-handle-label {
  display: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.floods-panel-subtitle {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

.floods-panel-tour-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.floods-panel-tour-btn:hover {
  transform: scale(1.05);
}

.disasters-panel-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.disasters-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.3px;
}

.disasters-panel-badges {
  display: flex;
  gap: 6px;
}

.disasters-badge {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.disasters-badge.ai {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.disasters-panel-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s;
}

.disasters-panel-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ========================================
   TAB NAVIGATION
   ======================================== */

.disasters-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.floods-panel-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.45);
}

.floods-panel-filter-control {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  font-size: 11px;
  padding: 6px 10px;
  outline: none;
}

.floods-panel-filter-control:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.floods-region-select {
  min-width: 132px;
  font-weight: 700;
}

.floods-location-input {
  flex: 1;
  font-weight: 600;
}

.floods-tabs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
  gap: 6px;
  padding: 10px 12px;
  overflow: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.floods-tabs-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.floods-location-tab {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.3);
}

.floods-location-tab .tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-badge-count {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
}

.tab-badge-count.active {
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.floods-tabs-shell {
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.floods-tabs-empty {
  padding: 10px 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}

.disasters-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.disasters-tab:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
}

.disasters-tab.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.disasters-tab .tab-icon {
  font-size: 14px;
}

.disasters-tab .tab-label {
  font-weight: 600;
}

.disasters-tab .tab-badge {
  background: #ef4444;
  color: white;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.disasters-tab .tab-status {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.disasters-tab .tab-status.training {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ========================================
   TAB CONTENT
   ======================================== */

.disasters-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.floods-panel-content {
  overflow-x: hidden;
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.9) rgba(15, 23, 42, 0.35);
}

.floods-panel-content::-webkit-scrollbar {
  width: 8px;
}

.floods-panel-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

.floods-panel-content::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.65);
}

.floods-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.95);
}

.floods-panel-status-row {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(2, 6, 23, 0.52);
}

.floods-panel-status-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.floods-panel-status-primary {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
}

.floods-panel-status-token {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  font-size: 10px;
  font-weight: 700;
}

.floods-panel-status-token.is-empty {
  display: none;
}

.floods-panel-filters-toggle {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.mobile-floods-tab-root {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-floods-section {
  background: rgba(8, 15, 29, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  overflow: hidden;
}

.mobile-floods-section-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.mobile-floods-section-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mobile-floods-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.mobile-floods-section-summary {
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
}

.mobile-floods-section-chevron {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  transition: color 0.2s ease;
}

.mobile-floods-section-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-floods-section-body[hidden] {
  display: none !important;
}

.mobile-floods-section-body > * {
  margin: 0 !important;
}

/* Village selected-hex slideout uses same scrollbar language as Floods tab */
.village-selected-drawer-body,
.village-selected-raw-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.9) rgba(15, 23, 42, 0.35);
  scrollbar-gutter: stable both-edges;
}

.village-selected-drawer-body::-webkit-scrollbar,
.village-selected-raw-scroll::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
  -webkit-appearance: none;
}

.village-selected-drawer-body::-webkit-scrollbar-track,
.village-selected-raw-scroll::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35) !important;
  border-radius: 999px;
}

.village-selected-drawer-body::-webkit-scrollbar-thumb,
.village-selected-raw-scroll::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.9) !important;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.65);
  min-height: 24px;
}

.village-selected-drawer-body::-webkit-scrollbar-thumb:hover,
.village-selected-raw-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.95) !important;
}

#village-homes-floating-overlays .village-selected-drawer-body::-webkit-scrollbar-corner,
#village-homes-floating-overlays .village-selected-raw-scroll::-webkit-scrollbar-corner {
  background: transparent !important;
}

#updates-panel-content {
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 85, 105, 0.9) rgba(15, 23, 42, 0.35);
}

#updates-panel-content::-webkit-scrollbar {
  width: 8px;
}

#updates-panel-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
}

#updates-panel-content::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.65);
}

#updates-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.95);
}

.disasters-loading,
.disasters-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #64748b;
  text-align: center;
  gap: 12px;
}

.disasters-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(148, 163, 184, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========================================
   SEISMIC TAB STYLES
   ======================================== */

.seismic-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  margin-bottom: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #94a3b8;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.p-wave { background: #ef4444; }
.dot.s-wave { background: #22c55e; }
.dot.surface-wave { background: #3b82f6; }

.seismic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seismic-loading,
.seismic-empty,
.seismic-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #64748b;
  gap: 8px;
}

.seismic-empty .icon,
.seismic-error .icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.seismic-empty .title {
  font-size: 14px;
  color: #94a3b8;
}

.seismic-empty .subtitle {
  font-size: 12px;
}

.seismic-empty .legend-mini {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 10px;
}

/* Section Cards */
.section-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.section-card.seedlink {
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-header .icon {
  font-size: 14px;
}

.section-header .title {
  font-weight: 600;
  font-size: 12px;
  color: #e2e8f0;
}

.section-header .subtitle {
  font-size: 10px;
  color: #64748b;
}

.section-header.usgs {
  margin-bottom: 10px;
  padding-left: 4px;
}

.usgs-badge {
  background: #10b981;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.section-note {
  font-size: 9px;
  color: #64748b;
  margin-bottom: 10px;
  padding-left: 22px;
}

/* SeedLink Alerts */
.seedlink-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 11px;
}

.seedlink-alert:last-child {
  border-bottom: none;
}

.seedlink-alert .station {
  color: #94a3b8;
}

.seedlink-alert .waves {
  display: flex;
  gap: 4px;
}

.seedlink-alert .time {
  color: #64748b;
  font-size: 10px;
}

.wave-indicator {
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}

.wave-indicator.p {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.wave-indicator.s {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.wave-indicator.sf {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* Earthquake Cards */
.earthquake-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.earthquake-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(30, 41, 59, 0.8);
}

.eq-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.eq-info {
  flex: 1;
}

.eq-place {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.eq-time {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.eq-waves {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.wave-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.wave-badge.inactive {
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #64748b;
  opacity: 0.5;
}

.wave-badge.p-wave {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.wave-badge.s-wave {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  color: #22c55e;
}

.wave-badge.surface-wave {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.full-event-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid #a855f7;
  color: #a855f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

.eq-magnitude {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

.eq-magnitude.mag-extreme { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); }
.eq-magnitude.mag-major { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.eq-magnitude.mag-moderate { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.eq-magnitude.mag-light { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); }
.eq-magnitude.mag-minor { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); }

.eq-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.eq-details strong {
  color: #f1f5f9;
}

/* Cameras Section */
.cameras-section {
  margin-top: 12px;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
  padding-top: 10px;
}

.cameras-header {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.camera-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.camera-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
}

.cam-name {
  font-size: 10px;
  font-weight: 600;
  color: #f1f5f9;
  flex: 1;
}

.cam-status {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
}

.cam-status.live {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.cam-distance {
  font-size: 9px;
  font-weight: 500;
}

.cam-distance.close { color: #10b981; }
.cam-distance.medium { color: #f59e0b; }
.cam-distance.far { color: #94a3b8; }

/* ========================================
   FLOODS TAB STYLES
   ======================================== */

.floods-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
}

.placeholder-icon {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.placeholder-content {
  width: 100%;
}

.placeholder-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.placeholder-subtitle {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #94a3b8;
}

.training-status {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: #3b82f6;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

.status-text {
  font-size: 12px;
  font-weight: 600;
  color: #60a5fa;
}

.status-detail {
  font-size: 11px;
  color: #94a3b8;
}

.features-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
  color: #94a3b8;
}

.feature-icon {
  font-size: 14px;
}

.datasets-info {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dataset-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 10px;
  color: #a855f7;
}

.badge-icon {
  font-size: 12px;
}

/* ========================================
   FLOODS TAB - LIVE CAMERA ROTATION
   ======================================== */

.floods-tab-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

/* Weather Status Card */
.floods-weather-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 14px;
}

.weather-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.weather-icon {
  font-size: 18px;
}

.weather-placeholder {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.weather-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.weather-label {
  color: #94a3b8;
}

.weather-value {
  color: #f1f5f9;
  font-weight: 600;
}

.placeholder-shimmer {
  background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  padding: 2px 8px;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.weather-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  color: #64748b;
  font-size: 11px;
}

/* Camera Display */
.floods-camera-display {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  overflow: hidden;
}

.camera-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.camera-icon {
  font-size: 16px;
}

.camera-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}

.camera-controls {
  display: flex;
  gap: 6px;
}

.camera-control-btn {
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid #475569;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}

.camera-control-btn:hover {
  background: rgba(71, 85, 105, 0.8);
  border-color: #60a5fa;
  transform: scale(1.05);
}

.camera-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.camera-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-size: 13px;
}

.spinner {
  border: 3px solid rgba(148, 163, 184, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}

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

.camera-info {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.camera-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.info-icon {
  font-size: 14px;
}

.camera-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.stat-icon {
  font-size: 14px;
}

.camera-attribution {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.attribution-text {
  font-size: 10px;
  color: #64748b;
  font-style: italic;
}

.camera-rotation-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(30, 41, 59, 0.6);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 11px;
}

.rotation-spot {
  color: #f59e0b;
  font-weight: 600;
}

.rotation-counter {
  color: #64748b;
}

/* System Status */
.floods-system-status {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.status-label {
  color: #94a3b8;
}

.status-value {
  color: #f1f5f9;
  font-weight: 600;
}

/* Prototype Notice */
.floods-prototype-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px;
}

.prototype-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.prototype-icon {
  font-size: 16px;
}

.prototype-title {
  font-size: 12px;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.5px;
}

.prototype-text {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .disasters-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .disasters-panel.open {
    transform: translateY(0);
  }

  .features-preview {
    grid-template-columns: 1fr;
  }

  .floods-tab-container {
    padding: 12px;
  }

  .floods-panel-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .floods-tabs-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .camera-stats {
    flex-direction: column;
    gap: 8px;
  }
}

body.mobile-app-mode #floods-panel.disasters-panel {
  inset: auto 0 calc(var(--mobile-app-nav-height) + var(--mobile-app-shell-bottom) + 8px) 0;
  width: auto;
  max-height: none;
  height: min(72vh, calc(100vh - var(--mobile-app-shell-top) - var(--mobile-app-nav-height) - 24px));
  border-radius: 24px 24px 0 0;
  transform: translateY(calc(100% + 32px));
  border: 1px solid rgba(51, 65, 85, 0.72);
  box-shadow: 0 32px 72px rgba(2, 6, 23, 0.58);
}

body.mobile-app-mode #floods-panel.open {
  transform: translateY(0);
}

body.mobile-app-mode #floods-panel.open[data-sheet-state="peek"] {
  height: auto;
  left: 50%;
  right: auto;
  width: auto;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.78);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.4);
}

body.mobile-app-mode #floods-panel.open[data-sheet-state="peek"] .floods-panel-chrome {
  border-bottom: 0;
  background: rgba(8, 15, 29, 0.9);
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .disasters-panel-header,
body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-panel-filters,
body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-tabs-shell,
body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-panel-status-row,
body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-panel-content {
  display: none;
}

body.mobile-app-mode #floods-panel[data-sheet-state="expanded"] {
  height: min(72vh, calc(100vh - var(--mobile-app-shell-top) - var(--mobile-app-nav-height) - 24px));
}

body.mobile-app-mode #floods-panel[data-sheet-state="full"] {
  height: min(88vh, calc(100vh - var(--mobile-app-shell-top) - var(--mobile-app-nav-height) - 16px));
}

body.mobile-app-mode #floods-panel .floods-sheet-handle-wrap,
body.mobile-app-mode #floods-panel .floods-panel-subtitle,
body.mobile-app-mode #floods-panel .floods-panel-status-row {
  display: flex;
}

body.mobile-app-mode #floods-panel .floods-sheet-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-sheet-handle-wrap {
  padding: 10px 12px;
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-sheet-handle {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 44px;
  padding: 4px 14px 6px;
  flex-direction: column;
  gap: 0;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(100, 116, 139, 0.46);
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-sheet-handle-label {
  display: inline;
  text-align: center;
  line-height: 1.05;
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-sheet-handle-icon {
  transform: none;
  line-height: 1;
  font-size: 16px;
}

body.mobile-app-mode #floods-panel .floods-panel-chrome {
  background: linear-gradient(180deg, rgba(8, 15, 29, 0.96) 0%, rgba(8, 15, 29, 0.92) 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

body.mobile-app-mode #floods-panel .disasters-panel-header {
  padding: 4px 18px 12px;
  background: transparent;
  border-bottom: 0;
}

body.mobile-app-mode #floods-panel .disasters-panel-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.mobile-app-mode #floods-panel .disasters-panel-badges,
body.mobile-app-mode #floods-panel .floods-panel-tour-btn,
body.mobile-app-mode #floods-panel #floods-panel-close {
  display: none;
}

body.mobile-app-mode #floods-panel .floods-panel-header-actions {
  display: none;
}

body.mobile-app-mode #floods-panel .disasters-panel-close {
  width: 28px;
  height: 28px;
  font-size: 22px;
}

body.mobile-app-mode #floods-panel .floods-panel-filters {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0 18px 14px;
  border-bottom: 0;
  background: transparent;
}

body.mobile-app-mode #floods-panel.filters-open .floods-panel-filters {
  display: flex;
}

body.mobile-app-mode #floods-panel .floods-panel-filter-control {
  min-height: 48px;
  border-radius: 14px;
  font-size: 14px;
  padding: 0 14px;
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.16);
}

body.mobile-app-mode #floods-panel .floods-region-select,
body.mobile-app-mode #floods-panel .floods-location-input {
  min-width: 0;
}

body.mobile-app-mode #floods-panel .floods-tabs-shell {
  background: transparent;
  border-bottom: 0;
  padding: 0 18px;
}

body.mobile-app-mode #floods-panel .floods-tabs-list {
  display: flex;
  gap: 8px;
  overflow-x: auto !important;
  overflow-y: hidden;
  padding: 0 0 10px;
  scrollbar-width: none;
}

body.mobile-app-mode #floods-panel .floods-tabs-list::-webkit-scrollbar {
  display: none;
}

body.mobile-app-mode #floods-panel .floods-location-tab {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  border-color: rgba(148, 163, 184, 0.12);
}

body.mobile-app-mode #floods-panel .floods-location-tab.active {
  background: rgba(30, 64, 175, 0.18);
  border-color: rgba(96, 165, 250, 0.28);
  color: #e2e8f0;
}

body.mobile-app-mode #floods-panel .tab-badge-count {
  background: rgba(51, 65, 85, 0.88);
  color: #94a3b8;
}

body.mobile-app-mode #floods-panel .tab-badge-count.active {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

body.mobile-app-mode #floods-panel .floods-panel-status-row {
  padding: 12px 18px 14px;
  border-top: 0;
  background: transparent;
}

body.mobile-app-mode #floods-panel[data-sheet-state="peek"] .floods-panel-status-row {
  padding-bottom: 18px;
}

body.mobile-app-mode #floods-panel .floods-panel-status-copy {
  gap: 6px;
}

body.mobile-app-mode #floods-panel .floods-panel-status-primary {
  font-size: 12px;
}

body.mobile-app-mode #floods-panel .floods-panel-content {
  min-height: 0;
  padding: 12px 16px calc(var(--mobile-app-nav-height) + env(safe-area-inset-bottom) + 34px);
  scrollbar-width: none;
}

body.mobile-app-mode #floods-panel .floods-panel-content::-webkit-scrollbar {
  display: none;
}

body.mobile-app-mode #floods-panel .floods-panel-content > .floods-tab-container,
body.mobile-app-mode #floods-panel .floods-panel-content > .california-tab-container,
body.mobile-app-mode #floods-panel .floods-panel-content > .houston-tab-container,
body.mobile-app-mode #floods-panel .floods-panel-content > .louisiana-tab-container,
body.mobile-app-mode #floods-panel .floods-panel-content > .sumatra-tab-container,
body.mobile-app-mode #floods-panel .floods-panel-content > .tohoku-tab-container {
  padding: 0 !important;
}

body.mobile-app-mode #floods-panel .mobile-floods-section-body > div {
  background: rgba(15, 23, 42, 0.76) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}

body.mobile-app-mode #floods-panel .mobile-floods-section-body > div button {
  box-shadow: none !important;
}
