/* ── Cards & sections ───────────────────────────────────────────────────── */
.card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 14px;
}
.card-title {
  font-size: 18px; font-weight: 600; margin-bottom: 12px;
  color: var(--heading);
}
.section-label {
  font-size: 11px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}

/* ── Weather card ───────────────────────────────────────────────────────── */
.weather-card { background: var(--heading); color: #f0ece4; }
.weather-card .card-title { color: #f0ece4; }
.weather-temp { font-family: "Montserrat", system-ui, sans-serif; font-size: 52px; font-weight: 400; line-height: 1; }
.weather-feels { font-size: 13px; color: #a09a90; margin-top: 2px; }
.weather-desc { font-size: 15px; margin-top: 4px; color: #c8c0b4; }
.weather-row { display: flex; gap: 20px; margin-top: 14px; padding-top: 14px; }
.weather-stat { display: flex; flex-direction: column; gap: 2px; }
.weather-stat .lbl { font-size: 11px; color: #a09a90; text-transform: uppercase; letter-spacing: .06em; }
.weather-stat .val { font-size: 14px; font-weight: 500; color: #f0ece4; }
.condition-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #d4cfc8; margin: 2px;
}

/* ── Activity picker ─────────────────────────────────────────────────────── */
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.activity-btn {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: white;
  cursor: pointer; text-align: left; transition: all .15s;
}
.activity-btn:hover { border-color: var(--amber); }
.activity-btn.selected { border-color: var(--amber); background: var(--amber-lt); }
.activity-btn .a-icon { font-size: 22px; }
.activity-btn .a-label { font-weight: 500; font-size: 14px; color: var(--heading); }
.activity-btn .a-desc { font-size: 12px; color: var(--muted); }

/* ── Outfit result ───────────────────────────────────────────────────────── */
.outfit-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.outfit-item:last-child { border-bottom: none; }
.outfit-cat {
  width: 90px; flex-shrink: 0;
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.outfit-name { flex: 1; font-weight: 500; font-size: 14px; color: var(--heading); }
.outfit-score {
  font-size: 11px; color: white;
  background: var(--amber); border-radius: 999px; padding: 2px 8px;
}
.tag {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 5px;
  margin: 2px; background: var(--paper); border: 1px solid var(--border); color: var(--muted);
}
.tag.rain  { background: var(--blue-lt); border-color: #b8d4ee; color: var(--blue); }
.tag.snow  { background: #eaf0fb; border-color: #b8c8ee; color: #2d50a8; }
.tag.wind  { background: #f0eaf8; border-color: #cdb8ee; color: #6a2da8; }
.tag.cold  { background: var(--blue-lt); border-color: #b8d4ee; color: var(--blue); }
.tag.hot   { background: #fdf0e8; border-color: #eec8a0; color: #a84e2d; }

/* ── Inventory ───────────────────────────────────────────────────────────── */
.inv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  background: white; border: 1px solid var(--border);
  margin-bottom: 8px;
}
.inv-icon { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.inv-info { flex: 1; min-width: 0; }
.inv-name { font-weight: 500; font-size: 14px; color: var(--heading); }
.inv-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.inv-remove {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; padding: 4px;
  border-radius: 6px; transition: color .15s, background .15s;
  flex-shrink: 0;
}
.inv-remove:hover { color: var(--red); background: var(--red-lt); }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-row { margin-bottom: 12px; }
.form-label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.form-input {
  width: 100%; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: white;
  font-size: 14px; font-family: inherit; color: var(--body);
  transition: border-color .15s;
  appearance: none;
}
.form-input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-lt); }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input { flex: 1; }
.range-val { font-size: 13px; font-weight: 500; min-width: 44px; text-align: right; color: var(--body); }

/* Checkbox grid for conditions / intensities */
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill input { display: none; }
.check-pill label {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); font-size: 13px; cursor: pointer;
  background: white; color: var(--muted); transition: all .15s;
  user-select: none;
}
.check-pill input:checked + label { background: var(--amber-lt); border-color: var(--amber-bd); color: var(--amber); font-weight: 500; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; font-family: inherit; cursor: pointer;
  border: none; transition: all .15s;
}
.btn-primary { background: var(--amber); color: white; }
.btn-primary:hover { background: #b07608; }
.btn-primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
.btn-outline { background: white; color: var(--body); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }
.btn-full { width: 100%; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.alert-error  { background: var(--red-lt);   color: var(--red);   border: 1px solid #e8b8b8; }
.alert-info   { background: var(--blue-lt);  color: var(--blue);  border: 1px solid #b8d4ee; }
.alert-success{ background: var(--green-lt); color: var(--green); border: 1px solid #b8ddc4; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: white;
  font-size: 13px; cursor: pointer; color: var(--muted); transition: all .15s;
}
.filter-chip.on { background: var(--amber-lt); border-color: var(--amber-bd); color: var(--amber); font-weight: 500; }

/* ── Feedback row ────────────────────────────────────────────────────────── */
.fb-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fb-btn {
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: white; cursor: pointer;
  color: var(--muted); font-family: inherit; transition: all .15s;
}
.fb-btn:hover { border-color: var(--amber); color: var(--amber); }
.fb-btn.active { background: var(--amber-lt); border-color: var(--amber-bd); color: var(--amber); font-weight: 500; }

/* ── Weather + radar side-by-side row ───────────────────────────────────── */
.wx-radar-row {
  display: flex;
  align-items: stretch;      /* both card and panel stretch to the same height */
  gap: 10px;
  margin-bottom: 14px;
}
.wx-radar-row .card {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}
.wx-radar-panel {
  /* aspect-ratio: 1 makes the panel square.
     Because align-items: stretch gives the panel the same height as the
     weather card, and aspect-ratio: 1 makes width = height, the panel is
     a square that matches the weather card's height exactly. */
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  min-width: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  position: relative;
}

/* Coverage banner — white strip overlaid on top of the map */
.wx-radar-banner {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: white;
  color: #8b0000;
  font-weight: 700;
  font-size: 11px;
  text-align: center;
  padding: 6px 8px;
  line-height: 1.4;
  z-index: 2;
  pointer-events: none;
}
#radar-page-wrap .wx-radar-banner {
  font-size: 13px;
  padding: 10px 16px;
}

@media (max-width: 360px) {
  .wx-radar-row   { flex-direction: column; }
  .wx-radar-panel { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

@media (min-width: 480px) {
  .wx-radar-row {
    height: 200px;        /* fixes the row height on desktop */
  }
  .wx-radar-panel {
    flex: 0 0 200px;      /* panel is 150×150 — square */
  }
}

/* ── Full radar page ─────────────────────────────────────────────────────── */
#radar-page-wrap {
  flex: 1;           /* fills .main--radar which is now a flex column */
  min-height: 0;     /* required — prevents flex overflow */
  position: relative;
}
#radar-page-map {
  position: absolute;
  inset: 0;          /* fills #radar-page-wrap exactly */
}
/* ── Radar sidebar legend (collapsible, top-right) ───────────────────────── */
.radar-legend-wrap {
  position: absolute;
  top: 14px;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: flex-start;
}

/* The tab that stays visible when panel is collapsed */
.radar-legend-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 44px;
  background: rgba(250, 248, 244, 0.93);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-shrink: 0;
  order: 0;
}

.radar-legend-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.22s ease;
  color: var(--muted);
}
/* When collapsed the chevron points left (←) to hint "open"; open = right (→) */
.radar-legend-wrap.collapsed .radar-legend-chevron {
  transform: rotate(180deg);
}

/* The panel itself */
.radar-controls-float {
  background: rgba(250, 248, 244, 0.93);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 170px;
  max-width: 220px;
  order: 1;
  /* collapse/expand */
  overflow: hidden;
  transition: max-width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
}
.radar-legend-wrap.collapsed .radar-controls-float {
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  pointer-events: none;
}