.pv-weather-alert {
  --pv-alert-bg: #f5f2df;
  --pv-alert-border: #d4b84c;
  --pv-alert-accent: #725f0c;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  color: #282828;
  background: var(--pv-alert-bg);
  border: 1px solid var(--pv-alert-border);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(91, 61, 15, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.pv-weather-alert *, .pv-weather-alert *::before, .pv-weather-alert *::after { box-sizing: border-box; }
.pv-weather-alert--observacao { --pv-alert-bg: #fff9df; --pv-alert-border: #e5c95b; --pv-alert-accent: #75600b; }
.pv-weather-alert--atencao { --pv-alert-bg: #fff1df; --pv-alert-border: #eaa14d; --pv-alert-accent: #8a4700; }
.pv-weather-alert--alerta { --pv-alert-bg: #fff0ef; --pv-alert-border: #df7770; --pv-alert-accent: #9c201a; }

.pv-weather-alert__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  min-height: 64px;
  padding: 11px 15px;
}

.pv-weather-alert__identity {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pv-weather-alert__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: #d71920;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 34px;
  line-height: 1;
  filter: saturate(1.35) drop-shadow(0 2px 3px rgba(178, 20, 20, 0.35));
  animation: pv-weather-alert-pulse 2.4s ease-in-out infinite;
}

.pv-weather-alert__headline {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pv-weather-alert__headline strong {
  color: var(--pv-alert-accent);
  font-size: 21px;
  line-height: 1.25;
  white-space: nowrap;
}

.pv-weather-alert__headline small { color: #625f58; font-size: 14px; font-weight: 600; }

.pv-weather-alert__toggle {
  flex: 0 0 auto;
  min-width: 0 !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 10px 0 10px 12px !important;
  color: #b42318 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  font: inherit;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  text-transform: none !important;
}

.pv-weather-alert__toggle:hover,
.pv-weather-alert__toggle:focus {
  color: #8f1810 !important;
  background: transparent !important;
}

.pv-weather-alert__toggle:focus-visible, .pv-weather-alert__source:focus-visible {
  outline: 2px solid var(--pv-alert-accent);
  outline-offset: 3px;
}

.pv-weather-alert__less { display: none; }
.pv-weather-alert.is-expanded .pv-weather-alert__more { display: none; }
.pv-weather-alert.is-expanded .pv-weather-alert__less { display: inline; }

.pv-weather-alert__details {
  padding: 18px 18px 18px 61px;
  border-top: 1px solid var(--pv-alert-border);
  background: rgba(255, 255, 255, 0.58);
}

.pv-weather-alert__details[hidden] { display: none; }
.pv-weather-alert__details h3 { margin: 0 0 10px; color: #242424; font-size: 18px; line-height: 1.4; }
.pv-weather-alert__details p { max-width: 850px; margin: 0 0 13px; color: #444; font-size: 15px; line-height: 1.58; }
.pv-weather-alert__details dl { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 0 0 14px; font-size: 14px; }
.pv-weather-alert__details dl > div { display: flex; gap: 5px; margin: 0; }
.pv-weather-alert__details dt { font-weight: 700; }
.pv-weather-alert__details dd { margin: 0; }
.pv-weather-alert__source { color: var(--pv-alert-accent); font-size: inherit; font-weight: 750; }

.pv-weather-alert__emergency {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--pv-alert-border) 55%, transparent);
  font-size: 14px;
}

.pv-weather-alert__emergency strong {
  margin-right: 3px;
  color: #4e4942;
}

.pv-weather-alert__emergency a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  color: var(--pv-alert-accent);
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--pv-alert-border);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
}

@keyframes pv-weather-alert-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .pv-weather-alert__icon { animation: none; }
}

@media (max-width: 620px) {
  .pv-weather-alert__bar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 15px 13px 13px;
    text-align: center;
  }

  .pv-weather-alert__identity {
    flex: 0 1 auto;
    justify-content: center;
    width: 100%;
  }

  .pv-weather-alert__headline {
    flex: 0 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: auto;
    text-align: left;
  }

  .pv-weather-alert__headline strong {
    white-space: normal;
  }

  .pv-weather-alert__headline small { width: auto; }
  .pv-weather-alert__toggle { min-height: 40px !important; padding: 9px 8px !important; }

  .pv-weather-alert__details {
    padding: 16px;
    text-align: left;
  }

  .pv-weather-alert__details dl > div {
    flex-wrap: wrap;
  }

  .pv-weather-alert__emergency { align-items: stretch; }
  .pv-weather-alert__emergency strong { flex-basis: 100%; }
  .pv-weather-alert__emergency a { min-height: 44px; justify-content: center; }
}
