/* =========================================================
   ZAR WEB WEATHER — CARD UI
========================================================= */

.zar-web-weather {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* =========================================================
   HERO
========================================================= */
.zar-weather-location {
  color: #929ec5;
  padding: 1rem 0;
  /* background: #121628; */
}
.zar-weather-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.zar-weather-title {
  margin: 0;
  /*   font-size: clamp(1.35rem, 2vw, 2rem); */
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #eef3ff;
}

.zar-weather-subtitle {
  margin: 8px 0 0;
  color: rgba(190, 205, 255, 0.82);
  font-size: 0.98rem;
}

/* =========================================================
   CURRENT CARD
========================================================= */

.zar-weather-current-card {
  display: flex;
  flex-direction: column;
  gap: 18px;

  padding: 18px 18px 20px;
  border-radius: 20px;

  background: linear-gradient(
    180deg,
    rgba(20, 24, 44, 0.95),
    rgba(10, 12, 24, 0.96)
  );

  border: 1px solid rgba(120, 140, 255, 0.18);

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.zar-weather-current-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.zar-weather-current-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 72px;
  height: 72px;
  flex: 0 0 72px;

  border-radius: 18px;
  font-size: 2.3rem;

  background: rgba(120, 140, 255, 0.08);
  border: 1px solid rgba(120, 140, 255, 0.14);
}

.zar-weather-current-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zar-weather-current-temp strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.zar-weather-current-summary {
  font-size: 1rem;
  color: rgba(210, 220, 255, 0.88);
}

/* =========================================================
   METRICS GRID
========================================================= */

.zar-weather-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.zar-weather-metric-card {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
  padding: 12px;
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(120, 140, 255, 0.1);
}

.zar-weather-metric-icon {
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.zar-weather-metric-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zar-weather-metric-label {
  font-size: 0.76rem;
  color: rgba(175, 190, 235, 0.75);
}

.zar-weather-metric-value {
  font-size: 0.96rem;
  color: #f1f5ff;
  overflow-wrap: anywhere;
}

/* =========================================================
   SECTION TITLE
========================================================= */

.zar-weather-section-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #c8d7ff;
  text-transform: uppercase;
}

/* =========================================================
   TODAY / TOMORROW
========================================================= */

.zar-weather-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* =========================================================
   FORECAST CARDS
========================================================= */

.zar-weather-forecast-card {
  display: flex;
  flex-direction: column;
  gap: 14px;

  min-width: 0;
  padding: 16px;
  border-radius: 18px;

  background: linear-gradient(
    180deg,
    rgba(18, 22, 40, 0.92),
    rgba(10, 12, 24, 0.94)
  );

  border: 1px solid rgba(120, 140, 255, 0.16);

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.zar-weather-forecast-card--compact {
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
}

/* =========================================================
   FORECAST CARD HEADER / ICON ALIGNMENT
========================================================= */

.zar-weather-forecast-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.zar-weather-forecast-day {
  min-width: 0;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #eef3ff;

  word-break: normal;
  overflow-wrap: normal;
}

.zar-weather-forecast-icon {
  width: 34px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;

  font-size: 1.55rem;
  line-height: 1;

  transform: translateY(1px);
}

.zar-weather-forecast-summary {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(205, 216, 255, 0.8);
}

/* =========================================================
   FORECAST VALUES
========================================================= */

.zar-weather-forecast-temps,
.zar-weather-forecast-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 10px;
  min-width: 0;
}

.zar-weather-forecast-temp,
.zar-weather-forecast-meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.zar-weather-forecast-temp span,
.zar-weather-forecast-meta span {
  font-size: 0.75rem;
  color: rgba(170, 185, 230, 0.72);
}

.zar-weather-forecast-temp strong,
.zar-weather-forecast-meta strong {
  display: block;
  font-size: 0.95rem;
  color: #ffffff;
  white-space: nowrap;
}

/* =========================================================
   7-DAY GRID
========================================================= */

.zar-weather-week-grid {
  padding-bottom: 8px;
  scrollbar-width: thin;
  overflow-y: auto;
  /* overscroll-behavior: none; */
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 12px;
  min-width: 0;
}

/* =========================================================
   SOURCE NOTE
========================================================= */

.zar-web-source-note {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: rgba(185, 200, 245, 0.8);
}

.zar-web-source-note a {
  color: #93b6ff;
  text-decoration: none;
}

.zar-web-source-note a:hover {
  text-decoration: underline;
}

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

@media (max-width: 1100px) {
  .zar-weather-week-grid {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .zar-weather-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .zar-weather-hero {
    flex-direction: column;
  }

  .zar-weather-highlight-grid,
  .zar-weather-metrics-grid {
    grid-template-columns: 1fr;
  }

  .zar-weather-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(145px, 1fr));
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .zar-weather-current-main {
    align-items: flex-start;
  }

  .zar-weather-current-icon {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .zar-weather-current-card {
    padding: 16px;
  }

  .zar-weather-current-main {
    gap: 12px;
  }

  .zar-weather-week-grid {
    grid-template-columns: repeat(7, minmax(140px, 1fr));
  }

  .zar-weather-forecast-card {
    padding: 14px;
  }

  .zar-weather-forecast-top {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .zar-weather-forecast-icon {
    width: 30px;
    height: 30px;
    font-size: 1.4rem;
  }
}

/* =========================================================
   STREAMING HEADER VARIANT
========================================================= */

.zar-weather-title--stream [data-stream-body] p {
  margin: 0;
  display: inline;
}

.zar-weather-title--stream::after {
  content: "▌";
  display: inline-block;
  margin-left: 0.12em;
  opacity: 0.75;
  animation: zarWeatherHeaderCaret 900ms steps(2, start) infinite;
}

.zar-weather-title--stream.is-final::after {
  display: none;
}

@keyframes zarWeatherHeaderCaret {
  0%,
  45% {
    opacity: 0.75;
  }

  46%,
  100% {
    opacity: 0;
  }
}
/* =========================================================
   WEATHER BADGE VARIANT
========================================================= */
.zar-ai-v1-memory-badge--live {
  border-color: rgba(120, 210, 255, 0.36);
  background: linear-gradient(
    180deg,
    rgba(80, 180, 255, 0.13),
    rgba(80, 180, 255, 0.045)
  );
  color: rgba(220, 240, 255, 0.92);
}
/* =========================================================
    NARRATIVE SUMMARY
========================================================= */
.zar-weather-narrative-summary {
  max-width: 1120px;
  margin: 18px 0 0;
  color: rgba(216, 226, 255, 0.86);
  /*   font-size: clamp(1rem, 1.08vw, 1.22rem); */
  line-height: 1.65;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.zar-weather-narrative-summary::before {
  content: "ZAR summary";
  display: inline-flex;
  margin-right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(125, 160, 255, 0.28);
  background: rgba(90, 120, 255, 0.08);
  color: rgba(165, 190, 255, 0.95);
  /*   font-size: 0.72em; */
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 0.08em;
}

/* =========================================================
    cursor for both, but only while streaming
========================================================= */
.zar-weather-title--stream,
.zar-weather-narrative-summary--stream {
  min-height: 1.35em;
}

.zar-weather-title--stream [data-stream-body],
.zar-weather-narrative-summary--stream [data-stream-body] {
  display: inline;
}

.zar-weather-title--stream:not(.is-final)::after,
.zar-weather-narrative-summary--stream:not(.is-final)::after {
  content: "▌";
  display: inline-block;
  margin-left: 0.12em;
  opacity: 0.75;
  animation: zarWeatherTextCaret 900ms steps(2, start) infinite;
}

.zar-weather-title--stream.is-final::after,
.zar-weather-narrative-summary--stream.is-final::after {
  display: none;
}

@keyframes zarWeatherTextCaret {
  0%,
  45% {
    opacity: 0.75;
  }

  46%,
  100% {
    opacity: 0;
  }
}

/* =========================================================
   ZAR Weather — mobile forecast meta wrapping
========================================================= */

.zar-weather-forecast-meta {
  min-width: 0;
}

.zar-weather-forecast-meta > div {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.zar-weather-forecast-meta span,
.zar-weather-forecast-meta strong {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
@media (max-width: 768px) {
  .zar-weather-forecast-card {
    min-width: 0;
  }

  .zar-weather-forecast-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .zar-weather-forecast-meta > div {
    min-width: 0;
  }

  .zar-weather-forecast-meta strong {
    display: block;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
