/* WP City Weather Pro v2.0 */
:root {
  --wcp-radius: 20px;
  --wcp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wcp-transition: 0.25s ease;
}

/* ── Theme: Light (default) ─────────────────────────────────── */
.wcp-widget {
  --bg: #ffffff;
  --bg2: #f5f8ff;
  --bg3: #eef2ff;
  --border: #e0e7ff;
  --text: #1a1f3a;
  --text2: #5c6584;
  --accent: #4f6ef7;
  --accent2: #6ee7b7;
  --shadow: 0 8px 40px rgba(79,110,247,.14);
  --chart-temp: rgba(79,110,247,1);
  --chart-temp-bg: rgba(79,110,247,0.15);
  --chart-rain: rgba(110,231,183,0.8);
}

/* ── Theme: Dark ─────────────────────────────────────────────── */
.wcp-theme-dark,
.wcp-night.wcp-theme-auto {
  --bg: #0f1629;
  --bg2: #1a2445;
  --bg3: #1f2d52;
  --border: #2d3d6e;
  --text: #e8ecff;
  --text2: #8e9cc0;
  --accent: #6b8cff;
  --shadow: 0 8px 40px rgba(0,0,0,.5);
  --chart-temp: rgba(107,140,255,1);
  --chart-temp-bg: rgba(107,140,255,0.2);
  --chart-rain: rgba(110,231,183,0.6);
}

/* ── Base widget ─────────────────────────────────────────────── */
.wcp-widget {
  max-width: 1220px;
  width: 100%;
  box-sizing: border-box;
  margin:0 auto;
  
}

/* ── Header ──────────────────────────────────────────────────── */
.wcp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--border);
}
.wcp-location {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wcp-city-icon { font-size: 20px; }
.wcp-city {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  line-height: 1.1;
}
.wcp-country {
  font-size: .8rem;
  color: var(--text2);
  display: block;
  margin-top: 2px;
}
.wcp-updated {
  font-size: .75rem;
  color: var(--text2);
  white-space: nowrap;
}

/* ── Hero ────────────────────────────────────────────────────── */
.wcp-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg) 100%);
}
.wcp-hero-left {
  flex: 0 0 auto;
  text-align: center;
  min-width: 160px;
}
.wcp-big-emoji {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.wcp-hero-temp {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.wcp-unit {
  font-size: 1.6rem;
  font-weight: 500;
  vertical-align: super;
  color: var(--text2);
}
.wcp-condition {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}
.wcp-feels {
  font-size: .8rem;
  color: var(--text2);
  margin-top: 4px;
}

/* ── Stats grid ──────────────────────────────────────────────── */
.wcp-hero-right {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}
.wcp-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  transition: background var(--wcp-transition);
}
.wcp-stat:hover { background: var(--bg2); }
.wcp-stat-icon { font-size: 18px; flex-shrink: 0; }
.wcp-stat-label {
  font-size: .7rem;
  color: var(--text2);
  display: block;
  line-height: 1;
}
.wcp-stat-val {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-top: 2px;
}

/* ── Badges (UV, AQI, Sun) ───────────────────────────────────── */
.wcp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 20px; 
}
.wcp-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 50px;
  font-size: .82rem;
  flex: 1 1 140px;
  border: 1.5px solid transparent;
  transition: transform .2s;
}
.wcp-badge:hover { transform: translateY(-1px); }
.wcp-badge-icon { font-size: 22px; }
.wcp-badge-title { font-size: .7rem; opacity: .8; }
.wcp-badge-val { font-weight: 700; margin-top: 1px; }

/* UV colours */
.uv-low      { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.uv-moderate { background: #fef9c3; border-color: #fde047; color: #713f12; }
.uv-high     { background: #fed7aa; border-color: #fb923c; color: #7c2d12; }
.uv-veryhigh { background: #fecaca; border-color: #f87171; color: #7f1d1d; }
.uv-extreme  { background: #f3e8ff; border-color: #c084fc; color: #581c87; }

/* AQI colours */
.aqi-good     { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.aqi-fair     { background: #e0f2fe; border-color: #7dd3fc; color: #0c4a6e; }
.aqi-moderate { background: #fef9c3; border-color: #fde047; color: #713f12; }
.aqi-poor     { background: #fed7aa; border-color: #fb923c; color: #7c2d12; }
.aqi-verypoor { background: #fecaca; border-color: #f87171; color: #7f1d1d; }

/* Sun times */
.wcp-badge-sun { background: var(--bg3); border-color: var(--border); color: var(--text); }

/* dark mode badge overrides */
.wcp-theme-dark .uv-low,
.wcp-night.wcp-theme-auto .uv-low      { background:#064e3b; border-color:#059669; color:#d1fae5; }
.wcp-theme-dark .uv-moderate,
.wcp-night.wcp-theme-auto .uv-moderate { background:#422006; border-color:#d97706; color:#fef9c3; }
.wcp-theme-dark .uv-high,
.wcp-night.wcp-theme-auto .uv-high     { background:#431407; border-color:#ea580c; color:#fed7aa; }
.wcp-theme-dark .uv-veryhigh,
.wcp-night.wcp-theme-auto .uv-veryhigh { background:#450a0a; border-color:#dc2626; color:#fecaca; }
.wcp-theme-dark .uv-extreme,
.wcp-night.wcp-theme-auto .uv-extreme  { background:#3b0764; border-color:#9333ea; color:#f3e8ff; }
.wcp-theme-dark .aqi-good,
.wcp-night.wcp-theme-auto .aqi-good    { background:#064e3b; border-color:#059669; color:#d1fae5; }
.wcp-theme-dark .aqi-fair,
.wcp-night.wcp-theme-auto .aqi-fair    { background:#082f49; border-color:#0284c7; color:#e0f2fe; }
.wcp-theme-dark .aqi-moderate,
.wcp-night.wcp-theme-auto .aqi-moderate{ background:#422006; border-color:#d97706; color:#fef9c3; }
.wcp-theme-dark .aqi-poor,
.wcp-night.wcp-theme-auto .aqi-poor    { background:#431407; border-color:#ea580c; color:#fed7aa; }
.wcp-theme-dark .aqi-verypoor,
.wcp-night.wcp-theme-auto .aqi-verypoor{ background:#450a0a; border-color:#dc2626; color:#fecaca; }

/* ── Section title ───────────────────────────────────────────── */
.wcp-section { padding: 0 0 20px; }
.wcp-section-title {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text2);
  margin: 0 0 14px;
}

/* ── Chart ───────────────────────────────────────────────────── */
.wcp-chart-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px 8px;
  overflow: hidden;
}

/* ── Hourly scroll ───────────────────────────────────────────── */
.wcp-hourly-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.wcp-hourly-scroll::-webkit-scrollbar { height: 4px; }
.wcp-hourly-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.wcp-hour {
  flex: 0 0 auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  text-align: center;
  min-width: 58px;
  transition: background .2s, transform .2s;
}
.wcp-hour:hover { background: var(--bg2); transform: translateY(-2px); }
.wcp-hour-time { font-size: .65rem; color: var(--text2); margin-bottom: 4px; }
.wcp-hour-icon { font-size: 20px; line-height: 1; }
.wcp-hour-temp { font-size: .82rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.wcp-hour-rain { font-size: .65rem; color: #60a5fa; margin-top: 2px; }

/* ── Daily rows ──────────────────────────────────────────────── */
.wcp-daily {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wcp-day-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: background .2s;
}
.wcp-day-row:hover { background: var(--bg2); }
.wcp-day-name { flex: 0 0 100px; font-size: .85rem; font-weight: 600; color: var(--text); }
.wcp-day-icon { font-size: 22px; flex-shrink: 0; }
.wcp-day-rain { font-size: .75rem; color: #60a5fa; flex: 0 0 50px; text-align: center; }
.wcp-day-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wcp-day-min, .wcp-day-max {
  font-size: .8rem;
  color: var(--text2);
  flex-shrink: 0;
  min-width: 38px;
}
.wcp-day-max { color: var(--text); font-weight: 600; text-align: right; }
.wcp-day-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.wcp-day-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #60a5fa, var(--accent), #f97316);
  min-width: 20%;
}
.wcp-day-extras {
  font-size: .72rem;
  color: var(--text2);
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ── Footer ──────────────────────────────────────────────────── */
.wcp-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: .72rem;
  color: var(--text2);
}
.wcp-footer a { color: var(--accent); text-decoration: none; }
.wcp-footer a:hover { text-decoration: underline; }

/* ── Error ───────────────────────────────────────────────────── */
.wcp-error {
  padding: 16px 20px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  color: #991b1b;
  font-family: var(--wcp-font);
  font-size: .9rem;
}

@media (max-width: 768px) {
  .wcp-widget {
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 14px;
  }
}

@media (max-width: 520px) {
  .wcp-widget {
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 10px;
  }
  .wcp-hero { flex-direction: column; }
  .wcp-hero-right { grid-template-columns: 1fr 1fr; width: 100%; }
  .wcp-hero-left { min-width: unset; width: 100%; }
  .wcp-big-emoji { font-size: 52px; }
  .wcp-hero-temp { font-size: 2.6rem; }
  .wcp-day-name { flex: 0 0 72px; font-size: .78rem; }
  .wcp-day-extras { display: none; }
  .wcp-updated { display: none; }
  .wcp-badges { gap: 8px; }
  .wcp-badge { flex: 1 1 100%; }
}