/* index.css - Aether Weather Interactive Dashboard Design System */

:root {
  --bg-dark: #060911;
  --bg-card: #0b0f19;
  --bg-card-glass: rgba(11, 15, 25, 0.75);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 240, 255, 0.25);
  --border-glow-hover: rgba(189, 92, 255, 0.4);
  
  --primary: #00f0ff;
  --primary-hover: #00d5e6;
  --secondary: #bd5cff;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --btn-bg: rgba(255, 255, 255, 0.04);
  --btn-bg-hover: rgba(255, 255, 255, 0.08);
  
  --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
}

/* Dashboard Layout Grid */
.dashboard-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.dashboard-header {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  z-index: 10;
}

/* Alerts Banner styling */
.alerts-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.5rem;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.9rem;
}

.alerts-banner.hidden {
  display: none !important;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.alert-icon {
  font-size: 1.1rem;
}

.alert-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.alert-text strong {
  margin-right: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.alert-text span {
  opacity: 0.9;
}

.btn-alert-action {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 4px;
  margin-left: 1rem;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-alert-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Toolbar styling */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: rgba(11, 15, 25, 0.95);
  gap: 1.5rem;
}

.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-icon-small {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.toolbar-brand h2 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-grow: 1;
}

.input-group {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

#zip-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  width: 80px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  text-align: center;
}

#zip-input::placeholder {
  color: var(--text-muted);
}

.status-msg {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  display: inline-block;
  transition: background-color 0.3s;
}

.status-dot.active {
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.status-dot.error {
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

.status-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.last-refreshed {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Main Content Area */
.dashboard-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

.map-pane {
  flex: 1;
  height: 100%;
  position: relative;
  background: #090c15;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Conditions Panel (Right side) */
.conditions-panel {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1.25rem;
  z-index: 5;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.location-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.weather-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.temp-display-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.temp-value {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.weather-icon-large {
  font-size: 2.5rem;
  color: var(--primary);
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
}

.wind-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Cards inside Panel */
.dashboard-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.radar-playback-card {
  border-color: rgba(0, 240, 255, 0.15);
  background: rgba(0, 240, 255, 0.01);
}

.radar-time-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.radar-utc-val {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Barometric Pressure Card */
.pressure-val-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pressure-track-container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0.3rem 0;
}

.pressure-track {
  height: 6px;
  background: linear-gradient(to right, #3182ce, #48bb78, #e53e3e);
  border-radius: 4px;
  position: relative;
}

.pressure-pointer {
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  transition: left 0.5s ease-out;
}

.pressure-track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.pressure-trend-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Astro card */
.astro-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.panel-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Forecast Strip (Bottom) */
.forecast-strip {
  flex-shrink: 0;
  height: 140px;
  background: rgba(8, 12, 20, 0.98);
  border-top: 1px solid var(--border-color);
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
}

.forecast-cards-container {
  display: flex;
  gap: 0.75rem;
  height: 100%;
  align-items: center;
}

.forecast-card {
  width: 120px;
  height: 110px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: transform 0.2s, border-color 0.2s;
}

.forecast-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.forecast-card-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forecast-card-temp {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0.1rem 0;
}

.forecast-card-desc {
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #00d0ff);
  color: #060911;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #33f3ff, #1ad8ff);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--btn-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--btn-bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:active {
  transform: translateY(1px);
}

/* Alert Details Modal styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.85rem;
}

.modal-meta span {
  color: var(--primary);
  font-weight: 600;
}

.modal-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
}

.modal-section p {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.01);
  padding: 0.5rem;
  border-radius: 4px;
}

/* Animations */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
  }
  
  .dashboard-container {
    height: auto;
    overflow: visible;
  }
  
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .toolbar-brand {
    justify-content: center;
  }
  
  .toolbar-controls {
    justify-content: center;
  }
  
  .toolbar-status {
    justify-content: space-between;
  }
  
  .dashboard-body {
    flex-direction: column;
    height: auto;
  }
  
  .map-pane {
    height: 400px;
    flex-shrink: 0;
  }
  
  .conditions-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border-color);
    height: auto;
    overflow: visible;
  }
  
  .forecast-strip {
    height: auto;
    overflow-x: auto;
    padding: 1rem;
  }
}
