/* Shared hero imagery and neutral command-menu treatment. */
.command-menu-toggle,
.command-menu-toggle:hover,
.command-menu-toggle:focus-visible,
.internal-command-menu,
.internal-command-menu:hover,
.internal-command-menu:focus-visible {
  border-color: #406b91 !important;
  box-shadow: 0 0 16px rgba(46,140,255,.16), inset 0 0 12px rgba(46,140,255,.08) !important;
}

.view:not(#overview):not(#map) > .hazmat-page-hero:not(.emergenz-page-header) {
  background-position: right center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
.view:not(#overview):not(#map) > .hazmat-page-hero:not(.emergenz-page-header)::before {
  opacity: 1 !important;
  background:
    linear-gradient(90deg, rgba(2,11,20,.98) 0%, rgba(2,11,20,.92) 34%, rgba(2,11,20,.58) 62%, rgba(2,11,20,.18) 100%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important;
  background-size: auto, 42px 42px, 42px 42px !important;
}

/* Center title/subtitle; place the command menu on its own line below. */
.view:not(#overview) .hazmat-page-hero .hazmat-page-hero-content {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 clamp(18px, 6vw, 96px) 62px !important;
  text-align: center !important;
}
.view:not(#overview) .hazmat-page-hero .internal-command-title-row { display: contents !important; }
.view:not(#overview) .hazmat-page-hero .hazmat-hero-title,
.view:not(#overview) .hazmat-page-hero .plume-page-title {
  width: 100%;
  text-align: left !important;
}
.view:not(#overview) .hazmat-page-hero .hazmat-hero-subtitle {
  width: 100%;
  margin-inline: 0 !important;
  text-align: center !important;
}
.view:not(#overview) .hazmat-page-hero .internal-command-menu {
  position: absolute !important;
  left: 0;
  bottom: 0;
  transform: none !important;
}
.view:not(#overview) .hazmat-page-hero .internal-command-title-row .internal-command-menu,
.view:not(#overview) .hazmat-page-hero .internal-command-title-row .internal-command-menu:hover,
.view:not(#overview) .hazmat-page-hero .internal-command-title-row .internal-command-menu:focus-visible,
#overview.view.active .command-menu-toggle,
#overview.view.active .command-menu-toggle:hover,
#overview.view.active .command-menu-toggle:focus-visible {
  border: 2px solid #406b91 !important;
  border-color: #406b91 !important;
}
@media (max-width: 760px) {
  .view:not(#overview) .hazmat-page-hero .hazmat-page-hero-content { padding: 0 18px 60px !important; }
}

.view:not(#overview) .variant-incident { background-image: url("assets/incident-command-hero-v2.webp") !important; }
.view:not(#overview) .variant-chemical { background-image: url("assets/hazard-id-level-a-hero-v1.webp") !important; }
.view:not(#overview) .variant-chemical-profile { background-image: url("assets/chemical-id-search-background-v2.webp") !important; }
.view:not(#overview) .variant-guided-response { background-image: url("assets/guided-response-hero.webp") !important; }
.view:not(#overview) .variant-planning { background-image: url("assets/home-planning-tools-hero-v4.webp") !important; }
.view:not(#overview) .variant-reports { background-image: url("assets/reports-hero-v2.webp") !important; }
.view:not(#overview) .variant-monitoring { background-image: url("assets/equipment-hero-v2.webp") !important; }
.view:not(#overview) .variant-my-chemicals { background-image: url("assets/my-chemicals-hero-v2.webp") !important; }
.view:not(#overview) .variant-about { background-image: url("assets/incident-command-hero-v2.webp") !important; }
@media (max-width: 760px) {
  .view:not(#overview):not(#map) > .hazmat-page-hero:not(.emergenz-page-header) { background-position: 68% center !important; }
}

/* Keep the map controls as a shallow command strip so the map remains the
   primary workspace below the hero. */
#map .live-map-operations {
  min-height: 0;
  padding: 4px 12px 5px;
  gap: 6px 10px;
}
#map .live-map-control-groups { gap: 12px; }
#map .live-map-utility-group .live-map-control-buttons { align-items: stretch; }
#map .live-map-utility-group .live-map-tools { align-self: stretch; min-width: 0; }
#map .live-map-utility-group .live-map-tools summary { min-height: 28px; padding: 4px 7px; gap: 4px; }
#map .live-map-control-group { gap: 3px; }
#map .live-map-mode-button,
#map .live-map-parent-button {
  min-height: 28px;
  padding: 4px 7px;
  gap: 4px;
  font-size: .6rem;
}
#map .live-map-mode-button svg,
#map .live-map-parent-button svg { width: 13px; height: 13px; }
#map .live-map-status-strip { gap: 7px; font-size: .52rem; }
#map .live-map-status-item b { font-size: .52rem; }
/* All page title headers use the Incident Command height, including compact variants. */
.view:not(#overview):not(#map) > .hazmat-page-hero:not(.emergenz-page-header) {
  min-height: clamp(138px, 15vw, 205px) !important;
  padding: 14px 18px !important;
}
@media (max-width: 760px) {
  .view:not(#overview):not(#map) > .hazmat-page-hero:not(.emergenz-page-header) { min-height: 138px !important; padding: 12px !important; }
}
