/* Shared Gutenberg / shortcode widget. The theme only owns its placement. */
.cw-weather {
  --weather-surface: #f0f1f3;
  --weather-text: #25272b;
  --weather-muted: #676b73;
  --weather-border: #d9dce1;
  --weather-yellow: #ffdf00;
  --weather-height: 188px;
  --weather-temp: 76px;
  --weather-city: 24px;
  --weather-label: 14px;
  --weather-row: 19px;
  --weather-icon: 25px;
  --weather-pad: 18px;
  --weather-radius: 28px;
  width: 460px;
  position: relative;
  max-width: 100%;
  min-width: 0;
  color: var(--weather-text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.s-dark .cw-weather, .cw-weather.is-style-dark {
  --weather-surface: #0a0b0d;
  --weather-text: #eeeeef;
  --weather-muted: #a0a4ac;
  --weather-border: #303238;
}
.cw-weather.is-style-light {
  --weather-surface: #f0f1f3;
  --weather-text: #25272b;
  --weather-muted: #676b73;
  --weather-border: #d9dce1;
}
@media (prefers-color-scheme: dark) {
  html:not(.s-light):not(.s-dark) .cw-weather:not(.is-style-light) {
    --weather-surface: #0a0b0d;
    --weather-text: #eeeeef;
    --weather-muted: #a0a4ac;
    --weather-border: #303238;
  }
}
.cw-weather *, .cw-weather *::before, .cw-weather *::after { box-sizing: border-box; }
.cw-weather .cw-weather__card {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 9px;
  min-height: var(--weather-height);
  padding: 6px;
  border: 1px solid var(--weather-border);
  border-radius: var(--weather-radius);
  background: var(--weather-surface);
  color: var(--weather-text);
  text-decoration: none;
}
.cw-weather .cw-weather__source { color: inherit; flex: 0 0 var(--weather-icon); text-decoration: none; }
.cw-weather .cw-weather__source:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.cw-weather .cw-weather__current {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  padding: var(--weather-pad);
  background: var(--weather-yellow);
  color: #101100;
  border-radius: calc(var(--weather-radius) - 7px);
}
.cw-weather .cw-weather__condition {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--weather-label);
  line-height: 1.15;
}
.cw-weather .cw-weather__temperature {
  display: flex;
  align-items: flex-start;
  font-size: var(--weather-temp);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: 1;
}
.cw-weather .cw-weather__degree { font-size: .8em; letter-spacing: -.08em; }
.cw-weather .cw-weather__unit { font-size: 12px; letter-spacing: 0; margin: 9px 0 0 7px; }
.cw-weather .cw-weather__city { font-size: var(--weather-city); line-height: 1.1; }
.cw-weather .cw-weather__location { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.cw-weather button.cw-weather__locate {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: -4px -4px -4px auto;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #101100;
  box-shadow: none;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  cursor: pointer;
}
.cw-weather button.cw-weather__locate::before { content: ''; position: absolute; inset: -5px; }
.cw-weather button.cw-weather__locate:hover,
.cw-weather[data-location-saved] button.cw-weather__locate { background: rgb(0 0 0 / 10%); color: #101100; }
.cw-weather button.cw-weather__locate:focus-visible { outline: 2px solid #101100; outline-offset: 2px; }
.cw-weather button.cw-weather__locate:disabled { opacity: .45; cursor: wait; }
.cw-weather .cw-weather__status {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--weather-border);
  border-radius: 10px;
  background: var(--weather-surface);
  color: var(--weather-text);
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
  font-size: 12px;
  line-height: 1.4;
}
.cw-weather [hidden] { display: none !important; }
.cw-weather .cw-weather__forecast {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--weather-border);
  border-radius: calc(var(--weather-radius) - 7px);
}
.cw-weather .cw-weather__day {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 4px;
  align-items: center;
  font-size: var(--weather-row);
  line-height: 1.1;
  white-space: nowrap;
}
.cw-weather .cw-weather__day time { font-weight: 600; }
.cw-weather .cw-weather__low { color: var(--weather-muted); text-align: right; }
.cw-weather .cw-weather__high { text-align: right; }
.cw-weather .cw-weather__row-degree { font-size: .75em; }
.cw-weather .cw-weather__icon { display: block; width: var(--weather-icon); height: var(--weather-icon); flex: 0 0 var(--weather-icon); }
.cw-weather .cw-weather__sun, .cw-weather .cw-weather__moon { color: #e4b500; }
.s-dark .cw-weather .cw-weather__sun, .s-dark .cw-weather .cw-weather__moon,
.cw-weather.is-style-dark .cw-weather__sun, .cw-weather.is-style-dark .cw-weather__moon { color: #ffe000; }
.cw-weather .cw-weather__cloud { color: #83939b; }
.cw-weather .cw-weather__rain { color: #329aca; }
.cw-weather .cw-weather__current .cw-weather__icon * { color: #101100; }
.cw-weather .cw-weather__message { margin: auto 0; font-size: var(--weather-label); line-height: 1.5; color: var(--weather-muted); }
.cw-weather .cw-weather__nojs { font-size: 11px; margin: 5px 0; }
.cw-weather--compact {
  --weather-height: 106px;
  --weather-temp: 43px;
  --weather-city: 17px;
  --weather-label: 11px;
  --weather-row: 12px;
  --weather-icon: 17px;
  --weather-pad: 9px 13px;
  --weather-radius: 20px;
  width: 320px;
}
.cw-weather--compact .cw-weather__card { gap: 6px; padding: 4px; }
.cw-weather--compact .cw-weather__forecast { padding: 6px 10px; }
.cw-weather--compact .cw-weather__unit { font-size: 10px; margin-top: 5px; }
/* Also adapt when an article block sits in a narrow column. */
.wp-block-cubeworks-weather { container-type: inline-size; }
@container (max-width: 380px) {
  .cw-weather__content {
    --weather-height: 145px;
    --weather-temp: 55px;
    --weather-city: 20px;
    --weather-label: 12px;
    --weather-row: 14px;
    --weather-icon: 20px;
    --weather-pad: 12px;
  }
}
