/* weather.css — Slop Weather dedicated styles */

:root {
  --weather-bg: #0d0d1a;
  --weather-card: #16152a;
  --weather-card-hover: #1e1d3a;
  --weather-border: #2a284a;
  --weather-text: #e8e6f0;
  --weather-muted: #8a88a8;
  --weather-accent: #b7a4ce;
  --weather-accent-dark: #5865f2;
  --weather-warning: #f85149;
  --weather-watch: #d29922;
  --weather-info: #58a6ff;
  --weather-success: #39d353;
}

/* Weather page base */
.weather-page {
  background: var(--weather-bg);
  color: var(--weather-text);
  min-height: 100vh;
}

/* Radar canvas container */
.radar-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.radar-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--weather-border);
  background: var(--weather-card);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.radar-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 170deg, rgba(88, 101, 242, 0.4) 180deg, rgba(88, 101, 242, 0.1) 200deg, transparent 360deg);
  animation: radar-sweep 2s linear infinite;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep {
    animation: none;
    opacity: 0.15;
  }
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--weather-accent);
  box-shadow: 0 0 8px var(--weather-accent);
  z-index: 10;
}

.radar-controls {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.radar-controls button,
.radar-controls select {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  color: var(--weather-text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  min-height: 36px;
}

.radar-controls button:hover,
.radar-controls select:hover {
  border-color: var(--weather-accent);
}

.radar-controls select {
  min-width: 140px;
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  background: var(--weather-card);
  border-radius: 8px;
  border: 1px solid var(--weather-border);
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 80px;
  height: 16px;
  border-radius: 8px;
  border: 1px solid var(--weather-border);
}

.legend-label {
  color: var(--weather-muted);
  font-size: 11px;
}

/* Weather day cards */
.weather-day-card {
  background: linear-gradient(135deg, var(--weather-card) 0%, var(--weather-card-hover) 100%);
  border: 1px solid var(--weather-border);
  border-radius: 12px;
  padding: 20px;
}

.weather-day-card.weather-day--today {
  border-color: var(--weather-accent);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.15), inset 0 0 24px rgba(88, 101, 242, 0.05);
}

.weather-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--weather-border);
}

.weather-day-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--weather-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.weather-day-date {
  font-size: 12px;
  color: var(--weather-muted);
}

.weather-day-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.weather-day-emoji {
  font-size: 64px;
  line-height: 1;
  flex-shrink: 0;
}

.weather-day-info {
  flex: 1;
  min-width: 0;
}

.weather-day-name-full {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--weather-text);
}

.weather-day-headline {
  margin: 0;
  opacity: 0.85;
  font-size: 15px;
  line-height: 1.5;
  color: var(--weather-muted);
}

.weather-day-temps {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--weather-border);
}

.weather-temp-high {
  font-size: 36px;
  color: var(--weather-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.weather-temp-low {
  font-size: 20px;
  opacity: 0.7;
  color: var(--weather-accent);
  font-variant-numeric: tabular-nums;
  align-self: flex-end;
  margin-bottom: 4px;
}

.weather-day-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

.weather-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--weather-muted);
  background: rgba(88, 101, 242, 0.08);
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid var(--weather-border);
}

.weather-detail-icon {
  font-size: 16px;
}

.weather-day-advice {
  margin: 0;
  padding: 12px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid var(--weather-accent);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--weather-accent);
}

/* Week grid */
.weather-week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.weather-week-day {
  list-style: none;
}

.weather-week-day:hover {
  transform: translateY(-2px);
}

.weather-week-day.weather-day--today .weather-day-card {
  border-color: var(--weather-accent);
}

.weather-week-day .weather-day-name {
  font-size: 12px;
}

.weather-week-day .weather-day-date {
  font-size: 11px;
}

.weather-week-day .weather-day-main {
  gap: 12px;
}

.weather-week-day .weather-day-emoji {
  font-size: 48px;
}

.weather-week-day .weather-day-name-full {
  font-size: 18px;
}

.weather-week-day .weather-day-headline {
  font-size: 13px;
}

.weather-week-day .weather-day-temps {
  gap: 12px;
}

.weather-week-day .weather-temp-high {
  font-size: 24px;
}

.weather-week-day .weather-temp-low {
  font-size: 14px;
}

.weather-week-day .weather-day-details {
  gap: 8px;
  font-size: 11px;
}

.weather-week-day .weather-day-advice {
  font-size: 11px;
  padding: 8px;
}

/* History variant */
.weather-day--history {
  opacity: 0.7;
}

.weather-day--history .weather-day-name {
  color: var(--weather-muted);
}

/* Weekly summary */
.weather-summary-card {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 12px;
  padding: 20px;
}

.weather-summary-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--weather-border);
}

.weather-summary-mood,
.weather-summary-temp,
.weather-summary-range {
  text-align: center;
}

.weather-summary-mood-label,
.weather-summary-temp-label,
.weather-summary-range-label {
  display: block;
  font-size: 11px;
  color: var(--weather-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.weather-summary-mood-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--weather-accent);
}

.weather-summary-temp-value,
.weather-summary-range-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--weather-text);
  font-variant-numeric: tabular-nums;
}

.weather-summary-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.weather-summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(88, 101, 242, 0.05);
  border: 1px solid var(--weather-border);
  border-radius: 8px;
}

.weather-summary-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.weather-summary-label {
  font-size: 11px;
  color: var(--weather-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weather-summary-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--weather-text);
}

.weather-summary-advice {
  margin: 0;
  padding: 12px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid var(--weather-accent);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--weather-accent);
  text-align: center;
}

/* Almanac */
.weather-almanac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.weather-almanac-card {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-align: center;
}

.weather-almanac-card:hover {
  border-color: var(--weather-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.15);
}

.weather-almanac-card:focus {
  outline: 2px solid var(--weather-accent);
  outline-offset: 2px;
}

.weather-almanac-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.weather-almanac-name {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--weather-text);
}

.weather-almanac-headline {
  margin: 0;
  font-size: 13px;
  opacity: 0.85;
  font-style: italic;
  color: var(--weather-muted);
}

.weather-almanac-expanded {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--weather-card);
  border: 2px solid var(--weather-accent);
  border-radius: 12px;
  padding: 16px;
  z-index: 10;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: almanac-expand 0.2s ease-out;
}

@keyframes almanac-expand {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.weather-almanac-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--weather-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s, transform 0.2s;
}

.weather-almanac-close:hover {
  color: var(--weather-warning);
  transform: rotate(90deg);
}

.weather-almanac-expanded h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--weather-accent);
}

.weather-almanac-expanded .weather-almanac-headline {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--weather-muted);
}

.weather-almanac-expanded .weather-almanac-detail {
  margin: 0 0 12px;
  opacity: 0.9;
  line-height: 1.6;
  color: var(--weather-text);
}

.weather-almanac-stats {
  margin: 0;
  font-size: 14px;
}

.weather-almanac-stats dt {
  font-weight: 700;
  color: var(--weather-text);
}

.weather-almanac-stats dd {
  margin: 0 0 6px;
  opacity: 0.8;
  color: var(--weather-muted);
}

/* Seasonal */
.weather-seasonal-card {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.weather-seasonal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--seasonal-color, var(--weather-accent));
}

.weather-seasonal-emoji {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
}

.weather-seasonal-name {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--weather-text);
}

.weather-seasonal-mood {
  margin: 0;
  font-size: 16px;
  opacity: 0.85;
  color: var(--weather-muted);
  font-style: italic;
}

/* Compare form */
.weather-compare-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.weather-compare-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  flex: 1;
  min-width: 200px;
}

.weather-compare-inputs label {
  display: block;
  font-size: 11px;
  color: var(--weather-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.weather-compare-inputs input[type="date"] {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  color: var(--weather-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  min-width: 160px;
  min-height: 40px;
}

.weather-compare-inputs input[type="date"]:focus {
  outline: 2px solid var(--weather-accent);
  outline-offset: 2px;
}

.weather-compare-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 10px;
}

.weather-compare-result h4 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--weather-accent);
}

.weather-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.weather-compare-day {
  text-align: center;
  padding: 12px;
  background: rgba(88, 101, 242, 0.05);
  border: 1px solid var(--weather-border);
  border-radius: 8px;
}

.weather-compare-day .weather-day-emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.weather-compare-day h5 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--weather-text);
}

.weather-compare-day p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--weather-muted);
}

.weather-compare-diff {
  padding: 12px;
  background: rgba(210, 153, 34, 0.1);
  border: 1px solid var(--weather-watch);
  border-radius: 8px;
}

.weather-compare-diff p {
  margin: 6px 0;
  font-size: 13px;
}

.weather-compare-advice {
  margin-top: 12px !important;
  color: var(--weather-watch);
  font-style: italic;
}

/* Trivia */
.weather-trivia-text {
  margin: 12px 0 0;
  padding: 16px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid var(--weather-accent);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--weather-text);
}

/* Hourly forecast */
.weather-hourly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.weather-hourly-card {
  flex: 0 0 auto;
  min-width: 80px;
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

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

.weather-hourly-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--weather-accent);
  margin-bottom: 6px;
}

.weather-hourly-emoji {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.weather-hourly-temp {
  font-size: 18px;
  font-weight: 700;
  color: var(--weather-text);
  margin-bottom: 2px;
}

.weather-hourly-condition {
  font-size: 10px;
  color: var(--weather-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Weather alerts */
.weather-alerts-section {
  margin-bottom: 24px;
}

.weather-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  border-left: 4px solid;
  animation: alert-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .weather-alert-banner {
    animation: none;
  }
}

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 16px 0 currentColor; }
}

.weather-alert-banner.warning {
  background: rgba(248, 81, 73, 0.1);
  border-color: var(--weather-warning);
  color: var(--weather-warning);
}

.weather-alert-banner.watch {
  background: rgba(210, 153, 34, 0.1);
  border-color: var(--weather-watch);
  color: var(--weather-watch);
}

.weather-alert-banner.info {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--weather-info);
  color: var(--weather-info);
}

.weather-alert-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.weather-alert-content {
  flex: 1;
  min-width: 0;
}

.weather-alert-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.weather-alert-message {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.5;
}

.weather-alert-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

/* Outfit recommendations */
.weather-outfit-section {
  margin-top: 24px;
}

.weather-outfit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.weather-outfit-card {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

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

.weather-outfit-emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.weather-outfit-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--weather-text);
  margin-bottom: 4px;
}

.weather-outfit-reason {
  font-size: 11px;
  color: var(--weather-muted);
  line-height: 1.4;
}

/* Streak tracker */
.weather-streak-tracker {
  background: var(--weather-card);
  border: 1px solid var(--weather-border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.weather-streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.weather-streak-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--weather-accent);
}

.weather-streak-count {
  font-size: 32px;
  font-weight: 800;
  color: var(--weather-text);
  font-variant-numeric: tabular-nums;
}

.weather-streak-label {
  font-size: 12px;
  color: var(--weather-muted);
}

.weather-streak-bar {
  height: 8px;
  background: var(--weather-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.weather-streak-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--weather-accent), var(--weather-info));
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.weather-streak-milestones {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.weather-streak-milestone {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: var(--weather-bg);
  border: 1px solid var(--weather-border);
  border-radius: 6px;
}

.weather-streak-milestone.reached {
  border-color: var(--weather-success);
  background: rgba(57, 211, 83, 0.1);
}

.weather-streak-milestone-day {
  font-size: 10px;
  font-weight: 700;
  color: var(--weather-muted);
}

.weather-streak-milestone-name {
  font-size: 11px;
  color: var(--weather-text);
  margin-top: 2px;
}

/* Mobile responsive */
@media (max-width: 700px) {
  .radar-container {
    max-width: 280px;
  }

  .weather-week-grid {
    grid-template-columns: 1fr;
  }

  .weather-almanac-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .weather-compare-grid {
    grid-template-columns: 1fr;
  }

  .weather-summary-main {
    grid-template-columns: 1fr;
  }

  .weather-summary-details {
    grid-template-columns: 1fr;
  }

  .weather-outfit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .weather-almanac-grid {
    grid-template-columns: 1fr;
  }

  .weather-outfit-grid {
    grid-template-columns: 1fr;
  }

  .weather-streak-milestones {
    flex-wrap: wrap;
  }

  .weather-streak-milestone {
    flex: 1 1 45%;
  }
}

/* Print styles */
@media print {
  .radar-sweep,
  .radar-controls,
  .weather-compare-form,
  .weather-trivia-text,
  .weather-alert-banner {
    display: none;
  }

  .weather-day-card,
  .weather-week-day,
  .weather-almanac-card,
  .weather-summary-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}