/* Borough alert styles; the homepage ticker progressively enhances the readable list. */
.borough-alert-strip {
  background: #842f35;
  color: #fff;
  padding: 14px 24px;
}
.borough-alert-strip-inner { max-width: 1440px; margin: 0 auto; }
.borough-alert-strip h2 {
  color: #fff !important;
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.borough-alert-count { font-weight: 600; }
.borough-alert-list, .borough-alert-center-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.borough-alert-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .4);
}
.borough-alert-copy {
  flex: 1 1 290px;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.borough-alert-copy strong { font-size: 1rem; color: #fff; }
.borough-alert-details { margin-top: 4px; font-size: .95rem; white-space: pre-line; }
.borough-alert-link {
  color: #fff !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  padding: 8px 0;
  font-weight: 700;
}
.borough-alert-link:focus-visible, .borough-alert-center-item a:focus-visible {
  outline: 3px solid #ffcf7b;
  outline-offset: 4px;
}
.borough-alert-center-list {
  display: grid;
  gap: 12px;
}
.borough-alert-center-item {
  border: 1px solid #ead6d4;
  border-left: 5px solid #842f35;
  border-radius: 8px;
  background: #fff6f5;
  padding: 18px;
  overflow-wrap: anywhere;
  color: #263440;
  line-height: 1.6;
}
.borough-alert-center-item h3 { margin: 0; color: #842f35; }
.borough-alert-center-details { margin-top: 7px; }
.borough-alert-center-item p { margin: 10px 0 0; }
.borough-alert-center-item a { color: #842f35; font-weight: 700; text-decoration: underline; }
@media (max-width: 600px) {
  .borough-alert-strip { padding: 12px 16px; }
}

/* Only the enhanced homepage banner scrolls. The Alerts Center remains a static list. */
.borough-alert-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 20px;
}
.borough-alert-heading h2 { margin: 0; }
.borough-alert-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
}
.borough-alert-toggle {
  font: inherit;
  font-size: .875rem;
  color: #fff;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 5px;
  padding: 7px 12px;
  min-height: 44px;
  cursor: pointer;
}
.borough-alert-toggle[hidden] { display: none; }
.borough-alert-toggle:focus-visible { outline: 3px solid #ffcf7b; outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-viewport {
    overflow: hidden;
    width: 100%;
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-list {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: none;
    padding: 0;
    margin: 0;
    animation: borough-alert-scroll var(--alert-duration, 24s) linear infinite;
    animation-delay: var(--alert-start-delay, 0s);
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-item {
    flex: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 16px;
    padding: 10px 30px;
    border: 0;
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-item + .borough-alert-item {
    border-left: 1px solid rgba(255,255,255,.55);
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-copy {
    display: flex;
    align-items: baseline;
    flex: none;
    gap: 12px;
    white-space: nowrap;
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-details {
    margin: 0;
    white-space: nowrap;
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-link {
    white-space: nowrap;
  }
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-viewport:hover .borough-alert-list,
  .borough-alert-strip[data-ticker-state="running"] .borough-alert-viewport:focus-within .borough-alert-list {
    animation-play-state: paused;
  }
}
@keyframes borough-alert-scroll {
  from { transform: translateX(var(--alert-viewport-width, 100vw)); }
  to { transform: translateX(-100%); }
}

.borough-alert-headline { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
.borough-alert-headline:focus-visible { outline: 3px solid #ffcf7b; outline-offset: 3px; }
.borough-alert-center-item { scroll-margin-top: 24px; }
.borough-alert-center-details p { margin: 0 0 12px; }
.borough-alert-center-details p:last-child { margin-bottom: 0; }
.borough-alert-center-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 12px; }
.borough-alert-center-links a { display: inline-block; padding: 6px 0; }
