/* Official weather warnings (official-alerts.js). Colours always come with the level written out. */
/* Every tint derives from --wa-sev, the level colour set by official-alerts.js, so each level
   (and any future one) keeps its own colour. */
.wa-banner {
  --wa-sev: #ff8a1f;
  --wa-bg: linear-gradient(100deg, color-mix(in oklab, var(--wa-sev) 13%, #fff) 0%, color-mix(in oklab, var(--wa-sev) 5%, #fff) 100%);
  --wa-edge: color-mix(in oklab, var(--wa-sev) 42%, #fff);
  --wa-icon: color-mix(in oklab, var(--wa-sev) 90%, #000);
  --wa-mark: #fff;
  --wa-ink: #16202a;
  --wa-ink-soft: #586473;
  --wa-action: #4325eb;
  position: relative;
  margin: 16px 0 4px;
  border: 1px solid var(--wa-edge);
  border-radius: 14px;
  background: var(--wa-bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.06);
  color: var(--wa-ink);
  overflow: hidden;
  font-family: inherit;
  max-width: 100%;
  min-width: 0;
}
html.dark .wa-banner {
  --wa-bg: linear-gradient(100deg, color-mix(in oklab, var(--wa-sev) 26%, #13161a) 0%, color-mix(in oklab, var(--wa-sev) 11%, #13161a) 100%);
  --wa-edge: color-mix(in oklab, var(--wa-sev) 48%, transparent);
  --wa-icon: var(--wa-sev);
  --wa-ink: #fff;
  --wa-ink-soft: #c3c9d0;
  --wa-action: #c5d0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.28);
}
/* Flat tints. The left stripe stays the level colour; clear and unavailable have none. */
.wa-banner[data-wa-level="none"] {
  --wa-bg: #eef0ff;
  --wa-edge: #d5d0f0;
  --wa-glyph: #6e7486;
  --wa-ink: #1c2430;
  --wa-ink-soft: #5c6573;
  --wa-action: #4325eb;
}
.wa-banner[data-wa-level="yellow"] {
  --wa-bg: #fdf6dc;
  --wa-edge: #ead9a4;
  --wa-icon: #c99600;
  --wa-mark: #3a2c00;
}
.wa-banner[data-wa-level="orange"] {
  --wa-bg: #ffeee4;
  --wa-edge: #f3d0be;
  --wa-icon: #e26412;
  --wa-mark: #fff;
}
.wa-banner[data-wa-level="red"] {
  --wa-bg: #ffe4e9;
  --wa-edge: #f3c9d2;
  --wa-icon: #d6253a;
  --wa-mark: #fff;
}
.wa-banner[data-wa-level="purple"] {
  --wa-bg: #f4eaff;
  --wa-edge: #e0cff6;
  --wa-icon: #8e3fd1;
  --wa-mark: #fff;
}
.wa-banner[data-wa-level="info"] {
  --wa-bg: #f3f4f6;
  --wa-edge: #d8dee6;
  --wa-icon: #6d7682;
  --wa-mark: #fff;
}
.wa-banner[data-wa-level="down"] {
  --wa-bg: #f2f3f5;
  --wa-edge: #d5dae1;
  --wa-glyph: #6b7280;
  --wa-ink: #1c2430;
  --wa-ink-soft: #5c6573;
  --wa-action: var(--text-muted);
}
html.dark .wa-banner[data-wa-level="none"] {
  --wa-bg: #212a3b;
  --wa-edge: rgba(186, 198, 220, 0.28);
  --wa-glyph: #c5ced8;
  --wa-ink: #f4f7fb;
  --wa-ink-soft: #b7c0cc;
  --wa-action: #c5d0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="yellow"] {
  --wa-bg: #2c2b24;
  --wa-edge: rgba(240, 196, 70, 0.38);
  --wa-icon: #f0c84a;
  --wa-mark: #2d2300;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="orange"] {
  --wa-bg: #382a28;
  --wa-edge: rgba(255, 138, 31, 0.4);
  --wa-icon: #ff8a1f;
  --wa-mark: #2b1400;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="red"] {
  --wa-bg: #392834;
  --wa-edge: rgba(224, 45, 54, 0.42);
  --wa-icon: #ff5a66;
  --wa-mark: #2a0a0e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="purple"] {
  --wa-bg: #2c2438;
  --wa-edge: rgba(168, 100, 230, 0.42);
  --wa-icon: #c084fc;
  --wa-mark: #1a1024;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="info"] {
  --wa-bg: #2a3038;
  --wa-edge: rgba(180, 190, 200, 0.28);
  --wa-icon: #b0b8c2;
  --wa-mark: #1b1e24;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
html.dark .wa-banner[data-wa-level="down"] {
  --wa-bg: #2a3038;
  --wa-edge: rgba(180, 190, 200, 0.24);
  --wa-glyph: #c5ced8;
  --wa-ink: #f4f7fb;
  --wa-ink-soft: #b7c0cc;
  --wa-action: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.card-alerts .wa-banner { margin: 0; }
#alert-frame,
.wa-banner { overflow-anchor: none; }
.wa-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--wa-sev);
}
.wa-banner[data-wa-level="none"]::before,
.wa-banner[data-wa-level="down"]::before {
  background: transparent;
}
.wa-head {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "icon text chips more";
  align-items: center;
  column-gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 10px 16px 10px 20px;
  cursor: pointer;
}
.wa-head > .wa-tri { grid-area: icon; }
.wa-head > .wa-titleblock { grid-area: text; }
.wa-head > .wa-chips { grid-area: chips; }
.wa-head > .wa-more { grid-area: more; }
.wa-titleblock { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 2px; }
.wa-head:focus-visible { outline: 2px solid var(--wa-ink); outline-offset: -2px; border-radius: 14px; }
.wa-tri { flex: 0 0 auto; width: 24px; height: 24px; }
.wa-badge { width: 28px; height: 28px; }
.wa-badge-shape { fill: var(--wa-icon); }
.wa-badge-mark { fill: var(--wa-mark); }
/* Clear uses a shield-check; unavailable uses an information mark. The triangle stays for real warnings. */
.wa-banner[data-wa-level="none"] .wa-badge,
.wa-banner[data-wa-level="down"] .wa-badge {
  background-color: var(--wa-glyph, #6e7486);
}
.wa-banner[data-wa-level="none"] .wa-badge-shape,
.wa-banner[data-wa-level="none"] .wa-badge-mark,
.wa-banner[data-wa-level="down"] .wa-badge-shape,
.wa-banner[data-wa-level="down"] .wa-badge-mark {
  fill: transparent;
}
.wa-banner[data-wa-level="none"] .wa-badge {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round' d='M12 3.1 19.2 6v5.2c0 4.4-3 7.5-7.2 8.8C7.8 18.7 4.8 15.6 4.8 11.2V6L12 3.1z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M8.6 11.6 11 14.1 15.6 9.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round' d='M12 3.1 19.2 6v5.2c0 4.4-3 7.5-7.2 8.8C7.8 18.7 4.8 15.6 4.8 11.2V6L12 3.1z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M8.6 11.6 11 14.1 15.6 9.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wa-banner[data-wa-level="down"] .wa-badge {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8.1' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M12 11.1v5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='8.15' r='1.05' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8.1' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3Cpath d='M12 11.1v5' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='8.15' r='1.05' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wa-title { font-weight: 700; line-height: 1.25; color: var(--wa-ink); }
.wa-sub { color: var(--wa-ink-soft); font-size: .85rem; font-weight: 500; line-height: 1.25; max-width: 100%; }
.wa-sub .wa-link { color: inherit; font-size: inherit; }
.wa-check { white-space: nowrap; }
.wa-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--toggle-radius);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.wa-chip.i { background: #7d8794; color: #fff; }
.wa-chip.y { background: #ffd21f; color: #2d2600; }
.wa-chip.o { background: #ff8a1f; color: #2b1400; }
.wa-chip.r { background: #e02d36; color: #fff; }
.wa-chip.p { background: #8e3fd1; color: #fff; }
.wa-chip.plus { background: transparent; border: 1px solid var(--border-strong); color: var(--text-main); display: none; }
.wa-more { color: var(--wa-action); font-size: .85rem; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; line-height: 1.2; }
.wa-more i {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  font-size: inherit;
  color: transparent;
  overflow: hidden;
  background-color: var(--wa-action);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5.5 15.5 12 9 18.5' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5.5 15.5 12 9 18.5' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.25s ease;
}
.wa-banner.is-open .wa-more i { transform: rotate(90deg); }
.wa-list {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.wa-banner.is-open .wa-list { grid-template-rows: 1fr; }
.wa-list-inner {
  overflow: hidden;
  min-height: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.7s ease;
}
.wa-banner.is-open .wa-list-inner { opacity: 1; transition-delay: 0.08s; }
.wa-banner:not(.is-open) .wa-list-inner { border-top-color: transparent; }
.wa-item {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  gap: 4px 14px;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--border);
}
.wa-item .wa-chip { align-self: start; justify-self: stretch; width: 100%; justify-content: center; box-sizing: border-box; }
.wa-item h4 { margin: 0; font-size: .95rem; }
.wa-item p { margin: 2px 0 0; font-size: .85rem; color: var(--text-muted); line-height: 1.35; }
.wa-item .wa-desc { color: var(--text-main); white-space: pre-line; }
.wa-item .wa-area { font-weight: 600; color: var(--text-main); }
.wa-item .wa-period { font-size: .85rem; white-space: nowrap; text-align: right; }
.wa-item .wa-body { grid-column: 2 / 4; display: flex; flex-direction: column; align-items: stretch; }
.wa-item-close {
  align-self: flex-end;
  margin-top: 8px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wa-item-close i { font-style: normal; transform: rotate(180deg); }
.wa-jump {
  display: inline;
  border: 0;
  margin: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}
.wa-jump-ico { width: 1em; height: 1em; vertical-align: -0.15em; }
.wa-orig { margin-top: 6px; font-size: .85rem; color: var(--text-muted); }
.wa-orig summary { cursor: pointer; font-weight: 600; color: var(--text-main); }
.wa-orig p { white-space: pre-line; }
.wa-link { color: var(--text-main); font-weight: 600; font-size: .85rem; text-decoration: underline; text-underline-offset: 2px; }
.wa-foot { grid-column: 1 / -1; padding: 8px 14px 10px 20px; font-size: .75rem; color: var(--text-muted); line-height: 1.35; }
.wa-foot p { margin: 0 0 4px; }
.wa-foot .wa-link { font-size: inherit; }
.wa-attr-match { font-size: .85rem; color: var(--text-main); }
.wa-quiet { margin: 14px 0 2px; font-size: .82rem; color: var(--text-muted); line-height: 1.4; }
.wa-quiet .wa-ok,
.wa-quiet .wa-na {
  display: inline-block;
  vertical-align: middle;
  margin: -2px 8px 0 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2fb36a;
}
.wa-quiet .wa-na { background: var(--border-strong); }
.wa-quiet .wa-link { font-size: inherit; }
.wa-quiet-note { margin: 3px 0 0; font-size: .92em; opacity: .85; }
.wa-has-dot { position: relative; }
.wa-day-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--c);
  pointer-events: none;
  animation: wa-blink 2.6s ease-in-out infinite;
}
@keyframes wa-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-day-dot { animation: none; }
}
.wa-day-dot.is-inline {
  position: relative;
  top: auto;
  right: auto;
  display: inline-block;
  margin-left: 4px;
  vertical-align: 0;
}
.wa-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#m-forecast > .wa-banner,
.m-day-pane > .wa-banner { flex: 0 0 auto; margin: 0 0 10px; scroll-snap-align: start; }
#m-forecast > .wa-quiet,
.m-day-pane > .wa-quiet { flex: 0 0 auto; margin: 0 4px 8px; scroll-snap-align: start; }
@media (orientation: landscape) {
  html.mobile-view #m-forecast > .wa-banner,
  html.mobile-view #m-forecast > .wa-quiet,
  html.mobile-view .m-day-pane > .wa-banner,
  html.mobile-view .m-day-pane > .wa-quiet {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }
  /* "... para el [date]" and the model stay one sentence. The dot matches the model text. */
  html.mobile-view .wa-titleblock {
    display: block;
  }
  html.mobile-view .wa-titleblock > .wa-title,
  html.mobile-view .wa-titleblock > .wa-sub {
    display: inline;
  }
  html.mobile-view .wa-titleblock > .wa-sub::before {
    content: " · ";
  }
}
@media (max-width: 760px) {
  .wa-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon text more" "icon chips more";
    column-gap: 8px;
    padding: 7px 12px 7px 15px;
  }
  .wa-head > .wa-chips { margin-top: 4px; }
  .wa-tri { width: 20px; height: 20px; }
  .wa-badge { width: 24px; height: 24px; }
  .wa-title { font-size: .76rem; }
  .wa-sub { font-size: .62rem; letter-spacing: -0.01em; }
  .wa-more { gap: 4px; }
  .wa-chip { font-size: .68rem; padding: 1px 7px; }
  .wa-more, .wa-item-close { font-size: .7rem; }
  .wa-more { margin-left: auto; }
  .wa-item h4 { font-size: .8rem; }
  .wa-item p, .wa-item .wa-period, .wa-link, .wa-orig { font-size: .7rem; }
  .wa-foot { font-size: .64rem; padding: 8px 12px 10px 16px; }
  .wa-attr-match { font-size: .7rem; }
  .wa-quiet { font-size: .7rem; }
  .wa-chips { flex-wrap: nowrap; }
  .wa-banner:not(.is-open) .wa-head .wa-extra { display: none; }
  .wa-banner:not(.is-open) .wa-head .wa-chip.plus { display: inline-flex; }
  .wa-banner.is-open .wa-head .wa-chips { display: none; }
  .wa-list-inner { display: block; }
  .wa-item { display: grid; grid-template-columns: 1fr; padding: 10px 12px 10px 16px; }
  .wa-item .wa-period { text-align: left; }
  .wa-item .wa-body { grid-column: 1; }
  .wa-foot { grid-column: auto; }
}
/* Phone tables: the warning details match PREVISIÓN FRANCESA on the model cards. */
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-chip,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-item-close,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-item h4,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-item p,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-item .wa-period,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-link,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-orig,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-orig summary,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-foot,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-attr-match,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-quiet,
html.mobile-view .m-mid:not(.is-graphs):not(.is-text) .wa-quiet-note {
  font-size: 0.62rem;
}
