/* === Card 2 – Hourly + 3-day, theme-safe === */

.mw-card.card-2 {
  background: #0f0f1a;
  color: #f8f8f8;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 16px;              /* 🔒 lock base size so theme can't shrink it */
  text-align: center;
  width: 100%;                  /* design width – tweak if you want */
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

/* keep everything inside sane regardless of theme */
.mw-card.card-2 *,
.mw-card.card-2 *::before,
.mw-card.card-2 *::after {
  box-sizing: border-box;
}

/* ---- Header: location, main temp, desc ---- */

.mw-card.card-2 .mw-title {
  color: #00bfff;
  font-size: 1.7em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.mw-card.card-2 .mw-temp {
  font-size: 2em;
  font-weight: bold;
  color: #f8f8f8;
}

.mw-card.card-2 .mw-desc {
  color: #ccc;
  font-size: 1em;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

/* ---- Stats grid ---- */

.mw-card.card-2 .mw-stats-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9em;
  justify-items: center;
  text-align: center;
}

.mw-card.card-2 .mw-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Hourly strip ---- */

.mw-card.card-2 .mw-hourly-strip {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

.mw-card.card-2 .mw-hourly-strip::-webkit-scrollbar {
  display: none;
}

.mw-card.card-2 .mw-hour {
  flex: 0 0 auto;
  width: 70px;
  text-align: center;
  font-size: 0.9em;
}

.mw-card.card-2 .mw-hour-temp {
  font-size: 1em;
  font-weight: 600;
  background: #fff;
  color: #222;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.mw-card.card-2 .mw-hour-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0 auto 0.25rem;
  background-color: transparent;
}

/* ---- 3-day forecast ---- */

.mw-card.card-2 .mw-forecast-title {
  font-size: 1.1em;
  color: #00bfff;
  margin-top: 1.5rem;
}

.mw-card.card-2 .mw-forecast-strip {
  display: flex;
  gap: 0.2rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  justify-content: center;
  scrollbar-width: none;
}

.mw-card.card-2 .mw-forecast-strip::-webkit-scrollbar {
  display: none;
}

.mw-card.card-2 .mw-forecast-item {
  background: #1a1f2f;
  border-radius: 8px;
  padding: 0.5rem 0.4rem;
  text-align: center;
  flex: 0 0 auto;
  min-width: 85px;
  transform: scale(0.85);
  color: #dfefff;
}

.mw-card.card-2 .mw-day {
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #89cfff;
}

.mw-card.card-2 .mw-temps {
  font-size: 0.9em;
  font-weight: 600;
  color: #fff;
}

.mw-card.card-2 .mw-cond {
  font-size: 0.75em;
  line-height: 1.2;
  color: #ccc;
}

/* ---- Freshness line ---- */

.mw-card.card-2 .mw-freshness {
  margin-top: 1rem;
  font-size: 0.75em;
  color: #888;
  font-style: italic;
  text-align: center;
}

/* ---- Small screens ---- */

@media screen and (max-width: 767px) {
  .mw-card.card-2 {
    width: 100%;
    max-width: 100%;
  }

  .mw-card.card-2 .mw-forecast-item {
    min-width: 110px;
    flex: 0 0 auto;
    padding: 0.5rem 0.4rem;
  }

  .mw-card.card-2 .mw-forecast-strip {
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ---- Desktop tweaks ---- */

@media screen and (min-width: 768px) {
  .mw-card.card-2 .mw-stats-wrapper {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    align-items: center;
    gap: 0.75rem 2rem;
    margin-top: 0.75rem;
  }

  .mw-card.card-2 .mw-stat {
    font-size: 1.1em;
  }

  .mw-card.card-2 .mw-hourly-strip {
    justify-content: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .mw-card.card-2 .mw-hour {
    width: 80px;
    font-size: 0.95em;
  }

  .mw-card.card-2 .mw-hour-temp {
    font-size: 1.05em;
  }

  .mw-card.card-2 .mw-hour-icon {
    width: 50px;
    height: 50px;
  }

  .mw-card.card-2 .mw-forecast-item {
    background: #1a1f2f;
    border-radius: 8px;
    padding: 0.75rem 0.6rem;
    min-width: 130px;
    min-height: 140px;
    transform: scale(1.05);
    color: #dfefff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }


  .mw-card.card-2 .mw-hourly-strip::before {
    content: "";
    flex: 0 0 1rem;
  }
}

/* Card 2 – make 3-day icons square + centered */
.mw-card.card-2 .mw-forecast-item .mw-icon img {
  display: block;
  margin: 0 auto -0.15rem;  /* center in the tile */
  width: 140px;            /* pick a size you like */
  height: 140px;           /* force square box */
  object-fit: contain;     /* keep proportions inside the square */
}

/* Card 2 – 3-day icons: slightly smaller and centered */
.mw-card.card-2 .mw-forecast-item .mw-icon {
  position: relative;
  overflow: visible;
}

.mw-card.card-2 .mw-forecast-item .mw-icon img {
  display: block;
  margin: 0 auto 0.35rem;   /* space below icon */
  width: 80px;              /* smaller so the day has room */
  height: 80px;
  object-fit: contain;
  position: static;         /* no left offset */
}
