
/*
 * UNITYMIX LOCAL — ALERTS CENTER
 * Consolidated replacement stylesheet.
 *
 * Emergency Center now stays in the normal page layout.
 * No fixed positioning, floating window, dragging, or minimizing.
 * Preserves map, location search, alert/service panels, emergency plans,
 * safety menu, modal, dark mode, and responsive layouts.
 */

:root {
  --um-alert-green: #00c853;
  --um-alert-green-hover: #00b94d;
  --um-alert-green-dark: #009c40;
  --um-alert-bg: #f3f3f3;
  --um-alert-card: #fff;
  --um-alert-soft: #f6f8f6;
  --um-alert-border: #e7ece8;
  --um-alert-text: #242b26;
  --um-alert-muted: #727c75;
  --um-alert-shadow: 0 4px 18px rgba(20, 35, 25, .055);
}

/* Document scrolling and page foundation */
html.um-alerts-document,
html:has(body.um-alerts-body) {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.um-alerts-body {
  display: block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.um-alerts-body .um-alerts-page,
body.um-alerts-body .um-alerts-shell {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.um-alerts-page,
.um-alerts-page *,
.um-alerts-page *::before,
.um-alerts-page *::after {
  box-sizing: border-box;
}

body.um-alerts-body .um-alerts-page {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: var(--um-alert-bg);
  color: var(--um-alert-text);
  font-family: inherit;
}

.um-alerts-shell {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(12px, 1.5vw, 20px);
}

/* Header / hero */
.um-alerts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 12px;
}

.um-alerts-header.um-alerts-hero {
  position: relative;
  min-height: 0;
  padding: 17px 22px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: #202823;
  box-shadow: 0 8px 24px rgba(16, 28, 20, .11);
  isolation: isolate;
}

.um-alerts-header.um-alerts-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--um-alert-green);
  content: "";
}

.um-alerts-heading {
  min-width: 0;
}

.um-alerts-eyebrow {
  margin: 0 0 5px;
  color: var(--um-alert-green-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.um-alerts-title {
  margin: 0;
  color: #222;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.um-alerts-hero .um-alerts-title {
  color: #fff;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.12;
}

.um-alerts-hero .um-alerts-title span {
  color: #00d45a;
}

.um-alerts-subtitle {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--um-alert-muted);
  font-size: 13px;
  line-height: 1.5;
}

.um-alerts-hero .um-alerts-subtitle {
  color: #c4cec7;
}

.um-alerts-hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 75%);
  min-width: 0;
}

.um-alerts-hero-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #aebbb2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.um-alerts-hero-live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--um-alert-green);
  box-shadow: 0 0 0 4px rgba(0, 200, 83, .13);
}

.um-alerts-hero-kicker-divider {
  color: #65736a;
}

.um-alerts-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.um-alerts-hero-note {
  color: #9eaaa2;
  font-size: 11px;
  font-weight: 600;
}

.um-alerts-hero-art {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 34%;
  height: 100%;
  min-width: 220px;
  overflow: hidden;
  pointer-events: none;
}

.um-alerts-hero-orbit {
  position: absolute;
  border: 1px solid rgba(0, 200, 83, .18);
  border-radius: 50%;
}

.um-alerts-hero-orbit-one {
  top: 50%;
  right: 2%;
  width: 290px;
  height: 290px;
  transform: translateY(-50%);
}

.um-alerts-hero-orbit-two {
  top: 50%;
  right: 13%;
  width: 205px;
  height: 205px;
  transform: translateY(-50%);
  border-color: rgba(255,255,255,.12);
}

.um-alerts-hero-pin {
  position: absolute;
  top: 50%;
  right: 24%;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  transform: translateY(-50%) rotate(-8deg);
  border: 1px solid rgba(0, 200, 83, .5);
  border-radius: 22px;
  background: #29372e;
  box-shadow: 0 14px 35px rgba(0,0,0,.24), inset 0 0 0 7px rgba(0,200,83,.06);
}

.um-alerts-hero-pin span {
  color: #00d45a;
  font-size: 44px;
  line-height: 1;
}

.um-alerts-hero-mini-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  background: #303b34;
  color: #dce6df;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
  white-space: nowrap;
}

.um-alerts-hero-mini-top {
  top: 22%;
  right: 8%;
}

.um-alerts-hero-mini-top i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--um-alert-green);
}

.um-alerts-hero-mini-bottom {
  right: 5%;
  bottom: 19%;
}

.um-alerts-hero-mini-bottom b {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 5px;
  background: var(--um-alert-green);
  color: #102719;
  font-size: 13px;
}

/* Buttons */
.um-alerts-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  background: var(--um-alert-green);
  color: #fff !important;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none !important;
  cursor: pointer;
}

.um-alerts-button:hover {
  background: var(--um-alert-green-hover);
  color: #fff !important;
}

.um-alerts-button-secondary {
  background: #fff;
  color: #333 !important;
  box-shadow: 0 1px 5px rgba(0,0,0,.1);
}

.um-alerts-button-secondary:hover {
  background: #f5f6f6;
  color: #111 !important;
}

.um-alerts-hero-refresh {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--um-alert-green);
  color: #092414 !important;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.um-alerts-hero-refresh:hover {
  background: #16dc67;
  color: #092414 !important;
}

.um-alerts-refresh-icon {
  display: inline-block;
  margin-right: 5px;
  font-size: 17px;
  line-height: 1;
}

.um-alerts-button:disabled,
.um-alerts-inline-action:disabled {
  opacity: .6;
  cursor: wait;
}

.um-alerts-button[aria-busy="true"]::after {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: um-alert-spin .7s linear infinite;
  content: "";
}

@keyframes um-alert-spin {
  to { transform: rotate(360deg); }
}

/* Location and search toolbar */
.um-alerts-toolbar {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(280px, 1.2fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 11px 13px;
  overflow: visible;
  border: 1px solid var(--um-alert-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--um-alert-shadow);
}

.um-alerts-location {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
}

.um-alerts-location-icon {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--um-alert-green);
  box-shadow: 0 0 0 4px rgba(0,200,83,.12);
  font-size: 0;
}

.um-alerts-location-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.um-alerts-location-name {
  min-width: 0;
  overflow: hidden;
  color: #242b26;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.um-alerts-location-status {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #737c76;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.um-alerts-location .um-alerts-button {
  min-height: 36px;
  padding: 7px 11px;
  white-space: nowrap;
}

.um-alerts-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.um-alerts-search input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e1e7e3;
  border-radius: 9px;
  background: #fff;
  color: #242424;
  font-size: 13px;
}

.um-alerts-search input:focus {
  outline: 2px solid rgba(0,200,83,.15);
  border-color: var(--um-alert-green);
}

.um-alerts-search > button {
  min-width: 82px;
  min-height: 42px;
  padding: 8px 13px;
  white-space: nowrap;
}

.um-alerts-search-results {
  position: absolute;
  z-index: 1400;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow: auto;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(0,0,0,.15);
}

.um-alerts-search-results[hidden] {
  display: none !important;
}

.um-alerts-search-results button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #222;
  text-align: left;
  cursor: pointer;
}

.um-alerts-search-results button:hover {
  background: #f3faf5;
}

/* Map workspace */
.um-alerts-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.um-alerts-map-area {
  position: relative;
  width: 100%;
  min-width: 0;
  height: clamp(390px, 65vh, 680px);
  min-height: 390px;
  max-height: 75vh;
  overflow: hidden;
  border-radius: 13px;
  background: #e9ecef;
  box-shadow: 0 8px 28px rgba(20,35,25,.08);
}

#um-alerts-map {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #e9ecef;
}

#um-alerts-map img {
  max-width: none !important;
}

.leaflet-container {
  font: inherit;
}

.leaflet-container a {
  color: var(--um-alert-green-dark);
}

.leaflet-control-attribution {
  font-size: 10px !important;
}

.um-alerts-map-controls {
  position: absolute;
  z-index: 900;
  top: 12px;
  right: 12px;
  left: auto;
  bottom: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100% - 24px);
}

.um-map-safety-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--um-alert-green);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 4px 15px rgba(0,0,0,.22);
  cursor: pointer;
}

.um-map-safety-trigger span:first-child {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  font-size: 15px;
}

.um-map-safety-trigger:hover {
  background: var(--um-alert-green-hover);
}

.um-alerts-map-controls .um-alerts-button {
  box-shadow: 0 4px 15px rgba(0,0,0,.18);
}

/* Right-hand alert and nearby-service panel */
.um-alerts-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--um-alert-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--um-alert-shadow);
}

.um-alerts-sidebar[hidden] {
  display: none !important;
}

.um-alerts-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 15px 12px;
  border-bottom: 1px solid #edf0ee;
  user-select: none;
}

.um-alerts-sidebar-header h2 {
  margin: 0;
  color: #222;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.um-alerts-sidebar-content {
  min-height: 0;
  padding: 0 14px 15px;
  overflow: visible;
}

.um-alerts-panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 12px 0 14px;
  padding: 5px;
  border-radius: 11px;
  background: #f2f5f3;
}

.um-alerts-panel-tabs button {
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #58635d;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.um-alerts-panel-tabs button.active {
  background: #fff;
  color: #087b37;
  box-shadow: 0 1px 5px rgba(20,35,25,.1);
}

.um-alerts-panel-view {
  margin: 0;
}

.um-alerts-panel-view[hidden] {
  display: none !important;
}

.um-alerts-section {
  margin: 0 0 17px;
}

.um-alerts-section:last-child {
  margin-bottom: 0;
}

.um-alerts-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.um-alerts-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 9px;
  color: #242424;
  font-size: 14px;
  font-weight: 800;
}

.um-alerts-section-heading .um-alerts-section-title {
  margin: 0;
}

.um-alerts-category-filters,
.um-alerts-service-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 9px;
  padding: 2px 0 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.um-alerts-page [data-alert-category],
.um-alerts-page [data-service-category] {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 6px 10px;
  border: 1px solid #e4e9e5;
  border-radius: 999px;
  background: #fff;
  color: #59645e;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.um-alerts-page [data-alert-category].active,
.um-alerts-page [data-service-category].active {
  border-color: var(--um-alert-green);
  background: #eaf8ef;
  color: #087b37;
}

.um-alerts-page [data-alert-category]:hover,
.um-alerts-page [data-service-category]:hover {
  background: #eaf8ef;
  color: #087b37;
}

.um-alerts-status,
.um-alerts-services-status {
  margin: 5px 0 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f6f8f6;
  color: #657169;
  font-size: 11px;
  line-height: 1.5;
}

.um-alerts-count,
.um-alerts-services-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 20px;
  background: #f0f0f0;
  color: #444;
  font-size: 11px;
  font-weight: 800;
}

.um-alerts-list,
.um-alerts-services-results {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.um-alerts-services-results {
  max-height: 52vh;
  padding-right: 2px;
  overflow: auto;
}

.um-alerts-service-result,
.um-alerts-alert-card {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e9eeea;
  border-radius: 11px;
  background: #fff;
  color: var(--um-alert-text);
  text-align: left;
}

.um-alerts-service-result {
  cursor: pointer;
}

.um-alerts-service-result:hover {
  border-color: #cde8d5;
  background: #f8fcf9;
}

.um-alerts-alert-card {
  box-shadow: 0 2px 8px rgba(20,35,25,.035);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.um-alerts-alert-card:hover {
  border-color: #cfe9d7;
  background: #fff;
  box-shadow: 0 5px 16px rgba(20,35,25,.07);
  transform: translateY(-1px);
}

.um-alert-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.um-alert-card-category {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #edf6ef;
  color: #16763a;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

.um-alert-card-category[data-category="traffic"] {
  background: #fff5e8;
  color: #9b5b0b;
}

.um-alert-card-category[data-category="weather"] {
  background: #edf4ff;
  color: #315f9c;
}

.um-alert-card-category[data-category="outages"] {
  background: #fff0ee;
  color: #a63e31;
}

.um-alert-card-severity {
  color: #87918a;
  font-size: 10px;
  text-transform: capitalize;
}

.um-alerts-alert-card h4 {
  margin: 0 0 6px;
  color: #202923;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.um-alerts-alert-card p {
  margin: 0 0 9px;
  color: #657169;
  font-size: 11px;
  line-height: 1.55;
}

.um-alert-card-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.um-alerts-alert-card.is-expanded .um-alert-card-description {
  display: block;
  overflow: visible;
}

.um-alert-read-more {
  display: inline-block;
  margin: -3px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #087b37;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.um-alert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid #f0f2f0;
  color: #8a948d;
  font-size: 10px;
}

.um-alert-card-footer a {
  color: #087b37;
  font-weight: 750;
  text-decoration: underline;
}

.um-alerts-service-name {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 800;
}

.um-alerts-service-meta,
.um-alerts-alert-meta {
  display: block;
  color: var(--um-alert-muted);
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.um-alerts-service-result p {
  margin: 5px 0;
  font-size: 12px;
  line-height: 1.5;
}

.um-alerts-distance-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 0;
  color: #555;
  font-size: 12px;
}

#um-alerts-distance-unit {
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fff;
  color: #333;
}

.um-alerts-inline-action {
  flex: 0 0 auto;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: #087b37;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.um-alerts-load-more {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin: 5px 0 2px;
  padding: 9px 12px;
  border: 1px solid #cfe8d6;
  border-radius: 10px;
  background: #f3fbf5;
  color: #087b37;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.um-alerts-load-more:hover {
  border-color: #9ed8b0;
  background: #e8f7ed;
}

.um-alerts-sidebar-reopen {
  display: none;
  position: absolute;
  z-index: 600;
  top: 12px;
  right: 12px;
}

.um-alerts-disclaimer {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 9px;
  background: #fff;
  color: #777;
  font-size: 11px;
  line-height: 1.6;
}

.um-alerts-disclaimer a {
  color: var(--um-alert-green-dark);
  text-decoration: underline;
}

/* Floating service/place details — retained intentionally */
.um-service-floating-box {
  position: fixed;
  z-index: 1200;
  right: 22px;
  bottom: 22px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(72vh, 680px);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 35px rgba(0,0,0,.2);
  user-select: text;
}

.um-service-floating-box[hidden],
.um-service-floating-box.is-hidden {
  display: none !important;
}

.um-service-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-bottom: 1px solid #eee;
  background: #fff;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.um-service-floating-header:active {
  cursor: grabbing;
}

.um-service-floating-header strong {
  font-size: 13px;
}

.um-service-floating-actions {
  display: flex;
  gap: 5px;
}

.um-service-floating-actions button {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 5px;
  background: #f2f2f2;
  color: #333;
  cursor: pointer;
}

.um-service-floating-content {
  max-height: calc(min(72vh, 680px) - 50px);
  padding: 15px;
  overflow: auto;
}

.um-service-floating-content h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.um-service-floating-content p {
  margin: 5px 0;
  color: #68717a;
  font-size: 12px;
  line-height: 1.5;
}

.um-service-floating-content a {
  color: var(--um-alert-green-dark);
  text-decoration: underline;
}

.um-service-floating-box.is-detached {
  top: 90px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2147483000 !important;
  width: min(390px, calc(100vw - 24px));
  max-height: min(70vh, 650px);
}

.um-service-floating-box.is-detached .um-service-floating-content {
  max-height: calc(min(70vh, 650px) - 48px);
}

.um-place-detail-heading {
  padding: 0 0 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ecefec;
}

.um-place-detail-heading h3 {
  margin: 7px 0 0;
  color: #202720;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.um-place-detail-category {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 20px;
  background: #e9f8ee;
  color: #087d36;
  font-size: 10px;
  font-weight: 750;
  text-transform: capitalize;
}

.um-place-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f0;
}

.um-place-detail-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: #f1f5f2;
  color: #078b3a;
  font-size: 14px;
}

.um-place-detail-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.um-place-detail-row small {
  color: #7a837d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.um-place-detail-row span:not(.um-place-detail-icon),
.um-place-detail-row a {
  color: #303a33;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.um-place-detail-row a {
  color: #087d36;
  text-decoration: underline;
}

.um-place-directions {
  display: flex;
  justify-content: center;
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--um-alert-green);
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
}

.um-place-data-source {
  margin: 11px 0 0 !important;
  color: #929a94 !important;
  font-size: 10px !important;
  line-height: 1.45 !important;
}

/* Emergency Center — normal document flow */
body.um-alerts-body .um-alerts-page .um-emergency-center,
body.um-alerts-body .um-alerts-page .um-emergency-center.um-emergency-floating {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  float: none !important;
  transform: none !important;
  z-index: auto !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 0 18px !important;
  padding: 18px !important;
  overflow: visible !important;
  border: 1px solid var(--um-alert-border);
  border-radius: 16px;
  background: var(--um-alert-card);
  color: var(--um-alert-text);
  box-shadow: var(--um-alert-shadow);
  box-sizing: border-box !important;
}

.um-emergency-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 13px;
  background: #202923;
  color: #fff;
}

.um-emergency-intro-copy {
  min-width: 0;
  max-width: 760px;
}

.um-emergency-eyebrow {
  margin: 0 0 6px;
  color: #078c3e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.um-emergency-intro .um-emergency-eyebrow {
  color: #70e49a;
}

.um-emergency-intro h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.03em;
}

.um-emergency-intro p:not(.um-emergency-eyebrow) {
  margin: 8px 0 0;
  color: #c8d2cb;
  font-size: 13px;
  line-height: 1.55;
}

.um-emergency-call {
  display: flex;
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #b42318;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 5px 15px rgba(0,0,0,.18);
}

.um-emergency-call span {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.um-emergency-call small {
  max-width: 110px;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.um-emergency-status {
  margin-top: 13px;
  padding: 15px 16px;
  border: 1px solid var(--um-alert-border);
  border-radius: 12px;
  background: var(--um-alert-soft);
}

.um-emergency-status-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.um-emergency-status-heading strong {
  font-size: 13px;
}

.um-emergency-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00a94f;
  box-shadow: 0 0 0 4px rgba(0,200,83,.12);
}

.um-emergency-status-note {
  margin-left: auto;
  color: var(--um-alert-muted);
  font-size: 10px;
}

#um-emergency-status-text {
  margin: 8px 0 12px;
  color: var(--um-alert-muted);
  font-size: 12px;
  line-height: 1.5;
}

.um-emergency-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.um-emergency-metrics > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--um-alert-card);
}

.um-emergency-metrics strong {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.um-emergency-metrics span {
  color: var(--um-alert-muted);
  font-size: 10px;
  line-height: 1.35;
}

.um-emergency-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 21px 0 10px;
}

.um-emergency-section-head h3 {
  margin: 0;
  color: var(--um-alert-text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.um-emergency-section-head > span {
  color: var(--um-alert-muted);
  font-size: 11px;
}

.um-emergency-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.um-emergency-plan {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--um-alert-border);
  border-radius: 11px;
  background: var(--um-alert-card);
}

.um-emergency-plan summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.um-emergency-plan summary::-webkit-details-marker {
  display: none;
}

.um-emergency-plan summary::after {
  margin-left: auto;
  color: #078c3e;
  font-size: 17px;
  font-weight: 700;
  content: "＋";
}

.um-emergency-plan[open] summary::after {
  content: "−";
}

.um-emergency-plan-icon {
  display: flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0,200,83,.09);
  font-size: 20px;
}

.um-emergency-plan summary strong,
.um-emergency-plan summary small {
  display: block;
}

.um-emergency-plan summary strong {
  color: var(--um-alert-text);
  font-size: 12px;
  font-weight: 800;
}

.um-emergency-plan summary small {
  margin-top: 3px;
  color: var(--um-alert-muted);
  font-size: 10px;
  line-height: 1.35;
}

.um-emergency-plan-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--um-alert-border);
  font-size: 11px;
  line-height: 1.55;
}

.um-emergency-plan-body h4 {
  margin: 12px 0 4px;
  color: var(--um-alert-text);
  font-size: 11px;
  font-weight: 850;
}

.um-emergency-plan-body ul {
  margin: 0;
  padding-left: 17px;
  color: var(--um-alert-muted);
}

.um-emergency-plan-body li {
  margin: 3px 0;
}

.um-emergency-plan-body a,
.um-emergency-kit > a {
  display: inline-block;
  margin: 10px 12px 0 0;
  color: #078c3e !important;
  font-size: 11px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.um-emergency-bottom-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 12px;
  margin-top: 14px;
}

.um-emergency-kit,
.um-emergency-resources {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--um-alert-border);
  border-radius: 12px;
  background: var(--um-alert-soft);
}

.um-emergency-section-head.compact {
  align-items: flex-start;
  margin: 0 0 11px;
}

.um-emergency-section-head.compact h3 {
  font-size: 16px;
}

.um-emergency-section-head.compact > span {
  font-size: 10px;
  text-align: right;
}

.um-emergency-checklist {
  display: grid;
  gap: 8px;
}

.um-emergency-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--um-alert-muted);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.um-emergency-checklist input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--um-alert-green);
}

.um-emergency-checklist input:checked + span {
  text-decoration: line-through;
}

.um-emergency-resources > a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--um-alert-border);
  text-decoration: none !important;
}

.um-emergency-resources > a:first-of-type {
  border-top: 0;
}

.um-emergency-resources > a strong,
.um-emergency-resources > a small {
  display: block;
}

.um-emergency-resources > a strong {
  color: var(--um-alert-text);
  font-size: 11px;
}

.um-emergency-resources > a small {
  margin-top: 2px;
  color: var(--um-alert-muted);
  font-size: 10px;
}

.um-emergency-resources > a:hover strong {
  color: #078c3e;
}

.um-emergency-disclaimer {
  margin: 13px 2px 0;
  color: var(--um-alert-muted);
  font-size: 10px;
  line-height: 1.5;
}

/* Emergency safety menu and modal */
.um-emergency-source-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.um-emergency-menu {
  position: fixed;
  z-index: 12000;
  top: 62px;
  right: 22px;
  display: grid;
  width: min(290px, calc(100vw - 24px));
  gap: 5px;
  padding: 9px;
  border: 1px solid #e1e7e2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(0,0,0,.2);
}

.um-emergency-menu[hidden],
.um-emergency-modal[hidden] {
  display: none !important;
}

.um-emergency-menu button,
.um-emergency-menu a {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #202720;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.um-emergency-menu button:hover,
.um-emergency-menu a:hover {
  background: #effaf3;
  color: #008f3b;
}

.um-emergency-menu .um-emergency-menu-911 {
  background: #a92720;
  color: #fff;
  font-weight: 850;
}

.um-emergency-modal {
  position: fixed;
  z-index: 13000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.um-emergency-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12,20,15,.62);
  backdrop-filter: blur(3px);
}

.um-emergency-modal-card {
  position: relative;
  display: flex;
  width: min(900px, 100%);
  max-height: min(86vh, 900px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  color: #202720;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}

.um-emergency-modal-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 19px;
  border-bottom: 1px solid #e8ece9;
  background: #fff;
}

.um-emergency-modal-card > header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
}

.um-emergency-modal-card > header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: #f0f3f1;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.um-emergency-modal-content {
  min-height: 0;
  padding: 18px 20px 22px;
  overflow: auto;
  overscroll-behavior: contain;
}

.um-emergency-plan-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.um-emergency-plan-menu-list button {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e3e9e4;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.um-emergency-plan-menu-list button.active {
  border-color: var(--um-alert-green);
  background: #effaf3;
  color: #087d38;
}

.um-emergency-plan-detail {
  padding: 4px 2px;
}

.um-emergency-plan-detail .um-emergency-plan-body {
  display: block !important;
}

.um-emergency-modal-content .um-emergency-kit,
.um-emergency-modal-content .um-emergency-resources,
.um-emergency-modal-content .um-emergency-status {
  display: block !important;
}

.um-emergency-modal-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: #f3f6f4;
  font-size: 12px;
  line-height: 1.5;
}

body.um-emergency-modal-open {
  overflow: hidden !important;
}

/* Disclaimer and keyboard focus */
.um-alerts-page button:focus-visible,
.um-alerts-page a:focus-visible,
.um-alerts-page input:focus-visible,
.um-emergency-menu button:focus-visible,
.um-emergency-menu a:focus-visible {
  outline: 2px solid var(--um-alert-green);
  outline-offset: 2px;
}

.um-alerts-page img,
.um-alerts-page iframe,
.um-alerts-page video {
  max-width: 100%;
}

/* Dark mode */
body.dark-mode .um-alerts-page,
body.night-mode .um-alerts-page,
body.dark .um-alerts-page,
body[data-theme="dark"] .um-alerts-page,
html[data-theme="dark"] .um-alerts-page,
html[data-theme="nova-dark"] .um-alerts-page {
  --um-alert-bg: #171a1d;
  --um-alert-card: #22272b;
  --um-alert-soft: #252e32;
  --um-alert-border: #394148;
  --um-alert-text: #e6e9eb;
  --um-alert-muted: #b1bdb6;
  background: var(--um-alert-bg);
  color: var(--um-alert-text);
}

body.dark-mode .um-alerts-toolbar,
body.night-mode .um-alerts-toolbar,
body.dark .um-alerts-toolbar,
body[data-theme="dark"] .um-alerts-toolbar,
html[data-theme="dark"] .um-alerts-toolbar,
body.dark-mode .um-alerts-sidebar,
body.night-mode .um-alerts-sidebar,
body.dark .um-alerts-sidebar,
body[data-theme="dark"] .um-alerts-sidebar,
html[data-theme="dark"] .um-alerts-sidebar,
body.dark-mode .um-alerts-disclaimer,
body.night-mode .um-alerts-disclaimer,
body.dark .um-alerts-disclaimer,
body[data-theme="dark"] .um-alerts-disclaimer,
html[data-theme="dark"] .um-alerts-disclaimer,
body.dark-mode .um-service-floating-box,
body.night-mode .um-service-floating-box,
body.dark .um-service-floating-box,
body[data-theme="dark"] .um-service-floating-box,
html[data-theme="dark"] .um-service-floating-box,
body.dark-mode .um-alerts-alert-card,
body.night-mode .um-alerts-alert-card,
body.dark .um-alerts-alert-card,
body[data-theme="dark"] .um-alerts-alert-card,
html[data-theme="dark"] .um-alerts-alert-card {
  background: #22272b;
  color: #e6e9eb;
  border-color: #394148;
}

body.dark-mode .um-alerts-title,
body.night-mode .um-alerts-title,
body.dark .um-alerts-title,
body[data-theme="dark"] .um-alerts-title,
html[data-theme="dark"] .um-alerts-title,
body.dark-mode .um-alerts-sidebar-header h2,
body.night-mode .um-alerts-sidebar-header h2,
body.dark .um-alerts-sidebar-header h2,
body[data-theme="dark"] .um-alerts-sidebar-header h2,
html[data-theme="dark"] .um-alerts-sidebar-header h2 {
  color: #f0f2f3;
}

body.dark-mode .um-alerts-location-name,
body.night-mode .um-alerts-location-name,
body.dark .um-alerts-location-name,
body[data-theme="dark"] .um-alerts-location-name,
html[data-theme="dark"] .um-alerts-location-name {
  color: #f0f2f3;
}

body.dark-mode .um-alerts-search input,
body.night-mode .um-alerts-search input,
body.dark .um-alerts-search input,
body[data-theme="dark"] .um-alerts-search input,
html[data-theme="dark"] .um-alerts-search input {
  border-color: #3a434a;
  background: #1b2024;
  color: #f0f2f3;
}

body.dark-mode .um-alerts-panel-tabs,
body.night-mode .um-alerts-panel-tabs,
body.dark .um-alerts-panel-tabs,
body[data-theme="dark"] .um-alerts-panel-tabs,
html[data-theme="dark"] .um-alerts-panel-tabs {
  background: #1b211d;
}

body.dark-mode .um-alerts-panel-tabs button.active,
body.night-mode .um-alerts-panel-tabs button.active,
body.dark .um-alerts-panel-tabs button.active,
body[data-theme="dark"] .um-alerts-panel-tabs button.active,
html[data-theme="dark"] .um-alerts-panel-tabs button.active {
  background: #303a33;
  color: #8ee0a8;
}

body.dark-mode .um-alerts-status,
body.night-mode .um-alerts-status,
body.dark .um-alerts-status,
body[data-theme="dark"] .um-alerts-status,
html[data-theme="dark"] .um-alerts-status,
body.dark-mode .um-alerts-services-status,
body.night-mode .um-alerts-services-status,
body.dark .um-alerts-services-status,
body[data-theme="dark"] .um-alerts-services-status {
  background: #1b211d;
  color: #b1bdb6;
}

body.dark-mode .um-alerts-alert-card h4,
body.night-mode .um-alerts-alert-card h4,
body.dark .um-alerts-alert-card h4,
body[data-theme="dark"] .um-alerts-alert-card h4,
html[data-theme="dark"] .um-alerts-alert-card h4 {
  color: #edf3ef;
}

body.dark-mode .um-alerts-alert-card p,
body.night-mode .um-alerts-alert-card p,
body.dark .um-alerts-alert-card p,
body[data-theme="dark"] .um-alerts-alert-card p,
html[data-theme="dark"] .um-alerts-alert-card p {
  color: #b4c0b8;
}

body.dark-mode .um-alerts-load-more,
body.night-mode .um-alerts-load-more,
body.dark .um-alerts-load-more,
body[data-theme="dark"] .um-alerts-load-more,
html[data-theme="dark"] .um-alerts-load-more {
  border-color: #365b41;
  background: #24372a;
  color: #a3e7b6;
}

body.dark-mode .um-alerts-inline-action,
body.night-mode .um-alerts-inline-action,
body.dark .um-alerts-inline-action,
body[data-theme="dark"] .um-alerts-inline-action,
html[data-theme="dark"] .um-alerts-inline-action,
body.dark-mode .um-alert-read-more,
body.night-mode .um-alert-read-more,
body.dark .um-alert-read-more,
body[data-theme="dark"] .um-alert-read-more,
html[data-theme="dark"] .um-alert-read-more {
  color: #9be3af;
}

body.dark-mode .um-place-detail-heading h3,
body.night-mode .um-place-detail-heading h3,
body.dark .um-place-detail-heading h3,
body[data-theme="dark"] .um-place-detail-heading h3,
html[data-theme="dark"] .um-place-detail-heading h3,
body.dark-mode .um-place-detail-row span:not(.um-place-detail-icon),
body.night-mode .um-place-detail-row span:not(.um-place-detail-icon),
body.dark .um-place-detail-row span:not(.um-place-detail-icon),
body[data-theme="dark"] .um-place-detail-row span:not(.um-place-detail-icon),
html[data-theme="dark"] .um-place-detail-row span:not(.um-place-detail-icon) {
  color: #e0e7e1;
}

body.dark-mode .um-place-detail-heading,
body.night-mode .um-place-detail-heading,
body.dark .um-place-detail-heading,
body[data-theme="dark"] .um-place-detail-heading,
html[data-theme="dark"] .um-place-detail-heading,
body.dark-mode .um-place-detail-row,
body.night-mode .um-place-detail-row,
body.dark .um-place-detail-row,
body[data-theme="dark"] .um-place-detail-row {
  border-color: #39413b;
}

body.dark-mode .um-emergency-center,
body.night-mode .um-emergency-center,
body.dark .um-emergency-center,
body[data-theme="dark"] .um-emergency-center,
html[data-theme="dark"] .um-emergency-center,
html[data-theme="nova-dark"] .um-emergency-center {
  background: #20272b;
  color: #edf2ef;
}

body.dark-mode .um-emergency-intro,
body.night-mode .um-emergency-intro,
body.dark .um-emergency-intro,
body[data-theme="dark"] .um-emergency-intro,
html[data-theme="dark"] .um-emergency-intro,
html[data-theme="nova-dark"] .um-emergency-intro {
  background: #141c18;
}

body.dark-mode .um-emergency-modal-card,
body.night-mode .um-emergency-modal-card,
body.dark .um-emergency-modal-card,
body[data-theme="dark"] .um-emergency-modal-card,
html[data-theme="dark"] .um-emergency-modal-card {
  background: #20272b;
  color: #edf2ef;
}

body.dark-mode .um-emergency-modal-card > header,
body.night-mode .um-emergency-modal-card > header,
body.dark .um-emergency-modal-card > header,
body[data-theme="dark"] .um-emergency-modal-card > header,
html[data-theme="dark"] .um-emergency-modal-card > header {
  border-color: #394148;
  background: #20272b;
}

body.dark-mode .um-emergency-menu,
body.night-mode .um-emergency-menu,
body.dark .um-emergency-menu,
body[data-theme="dark"] .um-emergency-menu,
html[data-theme="dark"] .um-emergency-menu {
  border-color: #394148;
  background: #22272b;
}

body.dark-mode .um-emergency-menu button,
body.night-mode .um-emergency-menu button,
body.dark .um-emergency-menu button,
body[data-theme="dark"] .um-emergency-menu button,
html[data-theme="dark"] .um-emergency-menu button,
body.dark-mode .um-emergency-menu a,
body.night-mode .um-emergency-menu a,
body.dark .um-emergency-menu a,
body[data-theme="dark"] .um-emergency-menu a,
html[data-theme="dark"] .um-emergency-menu a {
  color: #e6e9eb;
}

/* Wide screens: show side panel only when enough width remains for map */
@media (min-width: 1450px) {
  .um-alerts-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
    align-items: stretch;
  }

  .um-alerts-map-area {
    height: min(68vh, 680px);
    min-height: 480px;
    max-height: 75vh;
  }

  .um-alerts-sidebar {
    max-height: min(680px, 75vh);
    overflow: hidden;
  }

  .um-alerts-sidebar-content {
    max-height: calc(min(680px, 75vh) - 55px);
    overflow: auto;
  }
}

@media (max-width: 1100px) {
  .um-alerts-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .um-alerts-shell {
    padding: 12px;
  }

  .um-alerts-hero-copy {
    width: 78%;
  }

  .um-alerts-hero-art {
    width: 30%;
    min-width: 190px;
    opacity: .75;
  }

  .um-alerts-hero-pin {
    right: 20%;
    width: 68px;
    height: 68px;
  }

  .um-alerts-hero-pin span {
    font-size: 39px;
  }

  .um-alerts-hero-orbit-one {
    width: 240px;
    height: 240px;
  }

  .um-alerts-hero-orbit-two {
    width: 175px;
    height: 175px;
  }

  .um-alerts-map-area {
    height: 62vh;
    min-height: 400px;
  }

  .um-alerts-sidebar {
    max-height: none;
  }

  .um-alerts-sidebar-content {
    max-height: 540px;
    overflow: auto;
  }

  .um-emergency-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .um-emergency-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .um-alerts-shell {
    padding: 10px;
  }

  .um-alerts-header.um-alerts-hero {
    align-items: flex-start;
    padding: 15px 16px;
    border-radius: 12px;
  }

  .um-alerts-hero-copy {
    width: 100%;
  }

  .um-alerts-hero .um-alerts-title {
    max-width: 330px;
    font-size: 25px;
  }

  .um-alerts-hero .um-alerts-subtitle {
    max-width: 420px;
    padding-right: 5px;
    font-size: 12px;
  }

  .um-alerts-hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .um-alerts-hero-art {
    right: -100px;
    width: 230px;
    min-width: 0;
    opacity: .22;
  }

  .um-alerts-hero-mini-card {
    display: none;
  }

  .um-alerts-hero-refresh {
    white-space: normal;
  }

  .um-alerts-toolbar {
    gap: 9px;
    padding: 9px;
  }

  .um-alerts-location {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .um-alerts-location .um-alerts-button {
    grid-column: 2;
    justify-self: start;
  }

  .um-alerts-location-status {
    white-space: normal;
  }

  .um-alerts-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .um-alerts-search > button {
    min-width: 70px;
    padding: 8px 10px;
  }

  .um-alerts-map-area {
    height: 60vh;
    min-height: 370px;
    max-height: 560px;
  }

  .um-alerts-map-controls {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .um-alerts-map-controls .um-alerts-button {
    padding: 7px 9px;
    font-size: 11px;
  }

  .um-map-safety-trigger {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .um-emergency-menu {
    top: auto;
    right: 10px;
    bottom: 75px;
    width: min(290px, calc(100vw - 20px));
  }

  .um-emergency-modal {
    padding: 8px;
  }

  .um-emergency-modal-card {
    max-height: 94vh;
    border-radius: 13px;
  }

  .um-emergency-modal-content {
    padding: 13px;
  }

  .um-emergency-plan-menu-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .um-emergency-modal-card > header h2 {
    font-size: 16px;
  }

  .um-emergency-center {
    padding: 11px !important;
    border-radius: 13px;
  }

  .um-emergency-intro {
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  .um-emergency-intro h2 {
    font-size: 22px;
  }

  .um-emergency-call {
    min-width: 76px;
    min-height: 72px;
    padding: 8px;
  }

  .um-emergency-call span {
    font-size: 24px;
  }

  .um-emergency-call small {
    font-size: 9px;
  }

  .um-emergency-status {
    padding: 12px;
  }

  .um-emergency-status-note {
    width: 100%;
    margin-left: 16px;
  }

  .um-emergency-metrics {
    gap: 6px;
  }

  .um-emergency-metrics > div {
    padding: 8px;
  }

  .um-emergency-metrics strong {
    font-size: 18px;
  }

  .um-emergency-metrics span {
    font-size: 9px;
  }

  .um-emergency-section-head {
    align-items: flex-start;
  }

  .um-emergency-section-head h3 {
    font-size: 16px;
  }

  .um-emergency-section-head > span {
    max-width: 105px;
    font-size: 10px;
    text-align: right;
  }

  .um-service-floating-box {
    right: 10px;
    bottom: 10px;
    width: min(330px, calc(100vw - 20px));
  }
}

@media (max-width: 420px) {
  .um-alerts-title {
    font-size: 23px;
  }

  .um-alerts-header.um-alerts-hero .um-alerts-title {
    font-size: 22px;
  }

  .um-alerts-location-name {
    white-space: normal;
  }

  .um-alerts-map-area {
    min-height: 340px;
  }

  .um-emergency-intro {
    flex-wrap: wrap;
  }
}

/* =========================================================
   UNITYMIX ALERTS — FLOATING EMERGENCY WINDOWS
   Add at the END of alerts.css
   ========================================================= */

/* Emergency Center: removed from normal page flow */
#um-emergency-center.um-emergency-window {
    display: none;
    position: fixed;
    z-index: 100500;
    top: 90px;
    right: 28px;
    width: min(720px, calc(100vw - 40px));
    max-height: calc(100vh - 120px);
    margin: 0;
    overflow: hidden;
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 16px 55px rgba(0, 0, 0, .24);
}

#um-emergency-center.um-emergency-window.is-open {
    display: flex;
    flex-direction: column;
}

#um-emergency-center .um-emergency-window-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 14px;
    background: #00c853;
    color: #fff;
    cursor: move;
    user-select: none;
    touch-action: pan-y;
}

.um-emergency-window-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
}

.um-emergency-window-controls {
    display: flex;
    gap: 5px;
}

.um-emergency-window-controls button {
    width: 32px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.um-emergency-window-controls button:hover {
    background: rgba(255,255,255,.3);
}

#um-emergency-center .um-emergency-window-body {
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
    overscroll-behavior: contain;
}

/* Minimized Emergency Center */
#um-emergency-center.is-minimized {
    width: 300px;
    height: auto;
    max-height: none;
}

#um-emergency-center.is-minimized .um-emergency-window-body {
    display: none;
}

/* Maximized Emergency Center */
#um-emergency-center.is-maximized {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
    bottom: 12px;
    width: auto;
    max-height: none;
    height: auto;
}

#um-emergency-center.is-maximized .um-emergency-window-body {
    flex: 1;
}

/* Restore launcher */
.um-emergency-restore {
    display: none;
    position: fixed;
    z-index: 100400;
    right: 24px;
    bottom: 24px;
    align-items: center;
    gap: 9px;
    padding: 12px 17px;
    border: 0;
    border-radius: 9px;
    background: #00c853;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
    cursor: pointer;
}

.um-emergency-restore.is-visible {
    display: inline-flex;
}

/* Individual emergency plan windows */
.um-plan-popout {
    position: fixed;
    z-index: 100600;
    top: 125px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    width: min(570px, calc(100vw - 32px));
    max-height: calc(100vh - 155px);
    overflow: hidden;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 15px 50px rgba(0,0,0,.25);
}

.um-plan-popout-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #00c853;
    color: #fff;
    cursor: move;
    user-select: none;
    touch-action: pan-y;
}

.um-plan-popout-title {
    font-weight: 700;
}

.um-plan-popout-controls {
    display: flex;
    gap: 5px;
}

.um-plan-popout-controls button {
    width: 31px;
    height: 29px;
    border: 0;
    border-radius: 5px;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 19px;
    cursor: pointer;
}

.um-plan-popout-content {
    overflow-y: auto;
    padding: 20px;
}

.um-plan-popout.is-minimized {
    width: min(350px, calc(100vw - 32px));
    max-height: 54px;
}

.um-plan-popout.is-minimized .um-plan-popout-content {
    display: none;
}

.um-plan-popout.is-maximized {
    inset: 12px;
    transform: none;
    width: auto;
    max-height: none;
}

.um-plan-popout.is-maximized .um-plan-popout-content {
    flex: 1;
}

/* The original plan cards remain in the DOM for cloning,
   but are hidden inside the Emergency Center window. */
#um-emergency-plans .um-emergency-plan {
    margin-bottom: 8px;
}

#um-emergency-plans .um-emergency-plan-body {
    display: none;
}

/* Mobile window positioning */
@media (max-width: 767px) {
    #um-emergency-center.um-emergency-window {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100dvh - 20px);
        border-radius: 12px;
    }

    #um-emergency-center.is-minimized {
        left: auto;
        width: min(280px, calc(100vw - 20px));
    }

    #um-emergency-center.is-maximized {
        inset: 5px !important;
    }

    .um-plan-popout {
        top: 10px;
        left: 10px;
        transform: none;
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
    }

    .um-plan-popout.is-maximized {
        inset: 5px;
        width: auto;
    }

    .um-emergency-restore {
        right: 12px;
        bottom: 12px;
    }
}

/* =========================================================
   UNITYMIX ALERTS — PAGE LAYOUT CORRECTION
   Fix narrow content, hidden sidebar, and emergency windows
   ========================================================= */

/* Use the full available page width */
.um-weather-sngine-grid {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.um-weather-left-sidebar,
.weather-site-sidebar {
    display: none !important;
}

.um-weather-main,
.weather-main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Alerts page width */
.um-alerts-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 22px 24px !important;
    box-sizing: border-box !important;
}

.um-alerts-shell {
    width: 100% !important;
    max-width: 1450px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Emergency Center must NOT occupy normal page space */
#um-emergency-center.um-emergency-window {
    display: none !important;
    position: fixed !important;
    z-index: 100500 !important;
    top: 70px !important;
    right: 24px !important;
    left: auto !important;
    bottom: auto !important;
    width: min(760px, calc(100vw - 40px)) !important;
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 100px) !important;
    height: auto !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 55px rgba(0,0,0,.22) !important;
}

#um-emergency-center.um-emergency-window.is-open {
    display: flex !important;
    flex-direction: column !important;
}

#um-emergency-center.is-minimized .um-emergency-window-body {
    display: none !important;
}

#um-emergency-center .um-emergency-window-body {
    display: block;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Plan cards */
#um-emergency-plans {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
}

#um-emergency-plans .um-emergency-plan {
    min-width: 0 !important;
    margin: 0 !important;
}

#um-emergency-plans .um-emergency-plan summary {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    cursor: pointer !important;
}

/* Map and alerts panel */
.um-alerts-workspace {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 370px !important;
    align-items: stretch !important;
    gap: 18px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.um-alerts-map-area {
    min-width: 0 !important;
    width: 100% !important;
}

#um-alerts-map {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 520px !important;
}

.um-alerts-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 700px;
    overflow: hidden;
}

.um-alerts-sidebar-content {
    min-width: 0 !important;
    overflow-y: auto !important;
}

/* Emergency plan popout */
.um-plan-popout {
    z-index: 100600 !important;
    width: min(620px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 40px) !important;
    background: #fff !important;
    color: #242b26 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 55px rgba(0,0,0,.25) !important;
}

.um-plan-popout-content {
    min-width: 0 !important;
    overflow-x: hidden !important;
}

/* Medium screens */
@media (max-width: 1000px) {
    .um-alerts-workspace {
        grid-template-columns: minmax(0, 1fr) 320px !important;
    }

    #um-alerts-map {
        min-height: 440px !important;
    }
}

/* Mobile */
@media (max-width: 700px) {
    .um-alerts-page {
        padding: 12px !important;
    }

    .um-alerts-workspace {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    #um-alerts-map {
        min-height: 360px !important;
    }

    .um-alerts-sidebar {
        max-height: none !important;
    }

    #um-emergency-center.um-emergency-window {
        top: 8px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100dvh - 16px) !important;
    }

    #um-emergency-plans {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .um-plan-popout {
        top: 8px !important;
        left: 8px !important;
        width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        transform: none !important;
    }
}
