/* cca-wildfire — shared custom styles layered on the NYC Core theme
   (same conventions as the CCA data-service fleet: field-label/value,
   stat-badge, map-frame, map-legend, filter-chip, lookup-tile). */

.field-label {
  font-weight: 600;
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}
.field-value {
  font-size: 1.1rem;
  color: #2C3E50;
  margin-bottom: 20px;
}
.field-value.large {
  font-size: 1.5rem;
  font-weight: 600;
  color: #C62828;
}

.stat-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.stat-badge.primary   { background-color: #E3F2FD; color: #1976D2; }
.stat-badge.info      { background-color: #E3F2FD; color: #1976D2; }
.stat-badge.success   { background-color: #C8E6C9; color: #2E7D32; }
.stat-badge.warning   { background-color: #FFF9C4; color: #F57F17; }
.stat-badge.danger    { background-color: #FFCDD2; color: #C62828; }
.stat-badge.secondary { background-color: #ECEFF1; color: #546E7A; }
.stat-badge.purple    { background-color: #EDE7F6; color: #5E35B1; }
.stat-badge.fire      { background-color: #FFE0B2; color: #E64A19; }

/* stat tiles on the home page */
.stat-tile .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #C62828;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-tile .stat-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6c757d;
  font-weight: 600;
}

/* service explainer panel */
.svc-explain {
  background: #FFF8F2;
  border: 1px solid #F3D9C4;
  border-radius: 8px;
  padding: .75rem 1rem;
}
.svc-explain-icon {
  font-size: 1.6rem;
  color: #E64A19;
  margin-top: .15rem;
  min-width: 2rem;
  text-align: center;
}

.meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-strip .meta-times { font-size: 0.85rem; }

.search-container { max-width: 700px; margin: 0 auto; }
.search-input {
  font-size: 1.25rem;
  padding: 15px 20px;
  border: 2px solid #C62828;
  border-radius: 8px;
}
.search-input:focus {
  border-color: #8E0000;
  box-shadow: 0 0 0 0.2rem rgba(198, 40, 40, 0.25);
}
.search-btn { font-size: 1.25rem; padding: 15px 40px; border-radius: 8px; }

.loading-spinner { display: none; text-align: center; padding: 40px; }
.loading-spinner.show { display: block; }
.error-message { display: none; margin-top: 20px; }
.error-message.show { display: block; }
.result-area { display: none; }
.result-area.show { display: block; }

.alert-info-custom {
  background-color: #FFF3E0;
  border-left: 4px solid #F57C00;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}
.limitations-banner {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background-color: #FFF3E0;
  border-left: 4px solid #F57C00;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: .9rem;
}
.limitations-banner > i { font-size: 1.3rem; color: #E65100; margin-top: .15rem; }

/* ---- maps ---- */
.map-frame {
  position: relative;
  height: 420px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  overflow: hidden;
}
.map-frame--tall { height: clamp(460px, 68vh, 780px); }
.map-pop .badge { font-variant-numeric: tabular-nums; }
.maplibregl-popup-content { padding: 12px 14px; }
.maplibregl-popup { z-index: 6; }

.lookup-tile { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.lookup-tile:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-2px); }

/* ---- filter pills ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  border: 1px solid #CFD8DC;
  background: #fff;
  color: #37474F;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
}
.filter-chip:hover { border-color: #C62828; color: #C62828; text-decoration: none; }
.filter-chip.active { background: #C62828; border-color: #C62828; color: #fff; }
.filter-chip .count { opacity: 0.65; font-weight: 500; margin-left: 2px; }

/* ---- chips ---- */
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.5;
}
.chip-wildfire { background: #FFCDD2; color: #B71C1C; }
.chip-rx       { background: #C8E6C9; color: #1B5E20; }
.chip-cause-human   { background: #FFE0B2; color: #E65100; }
.chip-cause-natural { background: #B3E5FC; color: #01579B; }
.chip-cause-unknown { background: #ECEFF1; color: #546E7A; }
.chip-sev-low       { background: #C8E6C9; color: #2E7D32; }
.chip-sev-moderate  { background: #FFF9C4; color: #F9A825; }
.chip-sev-high      { background: #FFCCBC; color: #D84315; }

/* ---- human vs natural cause split bar ---- */
.cause-split { margin-top: .35rem; }
.cause-split-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden;
  background: #ECEFF1; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.cause-split-sm .cause-split-bar { height: 8px; }
.cause-split-human   { background: #FB8C00; }
.cause-split-natural { background: #29B6F6; }
.cause-split-legend {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: .3rem; font-size: .8rem; color: #546E7A; font-weight: 600;
}
.cause-split-legend .fa-person-digging, .cause-split-legend .fa-bolt { margin-right: .25rem; }
.cause-split-legend .fa-person-digging { color: #EF6C00; }
.cause-split-legend .fa-bolt { color: #0288D1; }
.cause-split-sm .cause-split-legend { font-size: .72rem; margin-top: .2rem; }

/* ---- map legend ---- */
.map-legend {
  position: absolute;
  bottom: 40px;
  left: 10px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 0;
  font-size: 0.76rem;
  display: flex;
  flex-direction: column;
  max-height: 60%;
  max-width: 250px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.map-legend-collapse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 5px 9px;
  border: 0;
  background: rgba(248, 249, 250, 0.96);
  color: #37474F;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.map-legend-collapse:hover { background: #fbeeee; color: #C62828; }
.map-legend-body { min-height: 0; padding: 5px 12px 8px; overflow-y: auto; }
.map-legend.is-collapsed .map-legend-body { display: none; }
.map-legend-hint { font-size: 0.66rem; color: #6c757d; margin: 3px 0; letter-spacing: .01em; }
.map-legend-row { display: flex; align-items: center; gap: 7px; line-height: 1.8; white-space: nowrap; }
.map-legend-swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  border: 2px solid;
  flex: none;
}
.map-legend-swatch.round { border-radius: 50%; }
.map-legend-swatch.dashed { border-style: dashed; }
.map-legend-label { flex: 1 1 auto; }
.map-legend-row.toggle { cursor: pointer; user-select: none; border-radius: 3px; padding: 0 4px; margin: 0 -4px; }
.map-legend-row.toggle:hover { background: rgba(198, 40, 40, 0.08); }
.map-legend-eye { margin-left: 8px; font-size: 0.72rem; color: #9aa0a6; flex: none; }
.map-legend-row.toggle:hover .map-legend-eye { color: #C62828; }
.map-legend-row.is-hidden { opacity: 0.5; }
.map-legend-row.is-hidden .map-legend-label { text-decoration: line-through; }

/* map overlay controls */
.map-overlay-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background: rgba(255,255,255,.95);
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
  padding: 8px 10px;
  font-size: .8rem;
  max-width: 230px;
}
.map-overlay-panel .form-group { margin-bottom: .4rem; }
.map-status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  background: rgba(33,33,33,.82);
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .74rem;
  font-weight: 600;
  display: none;
}
.map-status-pill.show { display: inline-block; }

/* ---- tables ---- */
.table { font-size: 0.9rem; }
.table-responsive { max-height: 74vh; }
.table-responsive thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  box-shadow: inset 0 -2px 0 #dee2e6;
}
tr[data-href] { cursor: pointer; }
tr[data-href]:hover { background-color: #fdeeee !important; }
tr[data-href] .row-chevron { color: #9aa5b1; }
tr[data-href]:hover .row-chevron { color: #C62828; }
.acres { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* ---- skeletons ---- */
@keyframes wf-shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
.skeleton-block {
  border-radius: .3rem; min-height: 14px;
  background: linear-gradient(90deg, #eceff1 25%, #f7f9fa 37%, #eceff1 63%);
  background-size: 800px 100%;
  animation: wf-shimmer 1.3s linear infinite;
}

.empty-state { text-align: center; padding: 2.2rem 1rem; color: #555; }
.empty-state i { font-size: 2.2rem; color: #adb5bd; margin-bottom: .7rem; display: block; }

/* ---- nav: More dropdown + mobile hamburger ---- */
.nav-more { position: relative; }
.nav-more-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; color: #212529; border: 1px solid #d5d9dd; border-radius: .3rem;
  min-width: 185px; box-shadow: 0 4px 14px rgba(0,0,0,.18); z-index: 60; padding: .3rem 0;
}
.nav-more-menu.show { display: block; }
.nav-more-menu a { display: block; padding: .45rem .9rem; color: #212529 !important; white-space: nowrap; }
.nav-more-menu a:hover { background: #fdeeee; text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.45); border-radius: .25rem;
  color: #fff; padding: .25rem .6rem; font-size: 1.05rem;
}
.nav-kbd { font-size: .7rem; }

.wrap-header { background: linear-gradient(90deg, #7B1E1E 0%, #C62828 60%, #E64A19 100%); color: #fff; }
.wrap-header h1 { color: #fff; }

@media (max-width: 767px) {
  .nav-toggle { display: inline-block; }
  #primary-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: #111; z-index: 70; padding: .4rem 1rem .7rem;
    box-shadow: 0 6px 14px rgba(0,0,0,.4);
  }
  #primary-nav.show { display: block; }
  #primary-nav ul { flex-direction: column; align-items: flex-start !important; gap: 0 !important; }
  #primary-nav li { width: 100%; }
  #primary-nav a { display: block; padding: .55rem .25rem; }
  .nav-more-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 1.1rem; }
  .nav-more-menu a { color: #fff !important; padding: .45rem .25rem; }
  #nyc-top-header { position: relative; }
  .search-input, .search-btn { width: 100%; }
  .form-control, input, select, textarea { font-size: 16px; }
  .table-responsive { max-height: none; }
}

/* toast */
.toast-region {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 1080;
  display: flex; flex-direction: column; gap: .5rem; max-width: 340px;
}
.toast-msg {
  background: #fff; border-left: 4px solid #C62828; border-radius: .3rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); padding: .6rem .9rem; font-size: .88rem;
}
.toast-msg.warning { border-left-color: #F57C00; }
.toast-msg.success { border-left-color: #2E7D32; }

/* API docs */
.api-doc code, .api-path { font-family: SFMono-Regular, Menlo, Consolas, monospace; }
.api-method {
  display: inline-block; font-weight: 700; font-size: .72rem; padding: 2px 8px;
  border-radius: 4px; margin-right: .5rem; letter-spacing: .5px;
}
.api-method.get { background: #E3F2FD; color: #1565C0; }
.api-endpoint {
  border: 1px solid #e3e6ea; border-radius: .4rem; margin-bottom: 1rem; overflow: hidden;
}
.api-endpoint > summary {
  padding: .7rem .9rem; background: #f8f9fa; font-weight: 600; cursor: pointer;
  display: flex; align-items: center;
}
.api-endpoint[open] > summary { border-bottom: 1px solid #e3e6ea; }
.api-endpoint .api-body { padding: .9rem; }
.api-path { font-size: .95rem; }
pre.code-block {
  background: #1d2733; color: #e6edf3; border-radius: .4rem; padding: 1rem;
  overflow-x: auto; font-size: .82rem; line-height: 1.5;
}

/* ---- Command / Ctrl + K search palette ---- */
.cmdk-hint {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 6px; padding: 1px 6px; font-size: .68rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.4); border-radius: 4px;
  background: rgba(255,255,255,.1); color: #fff; vertical-align: middle;
}
.cmdk-hint i { font-size: .62rem; }
.cmdk-overlay {
  display: none; position: fixed; inset: 0; z-index: 1090;
  background: rgba(17,24,33,.55); backdrop-filter: blur(2px);
  padding: 12vh 1rem 1rem;
}
.cmdk-overlay.show { display: block; }
.cmdk-panel {
  max-width: 560px; margin: 0 auto; background: #fff;
  border-radius: .6rem; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden; animation: cmdk-pop .12s ease-out;
}
@keyframes cmdk-pop { from { transform: translateY(-8px); opacity: .6; } to { transform: none; opacity: 1; } }
.cmdk-input-row { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid #eceff1; }
.cmdk-input-icon { color: #C62828; font-size: 1rem; }
.cmdk-input {
  flex: 1; border: 0; outline: 0; font-size: 1.05rem; background: transparent; color: #212529;
}
.cmdk-input::placeholder { color: #9aa5b1; }
.cmdk-esc {
  font-size: .68rem; font-weight: 600; color: #6b7580;
  border: 1px solid #d5d9dd; border-radius: 4px; padding: 1px 6px; background: #f8f9fa;
}
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: .35rem; }
.cmdk-item {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem;
  border-radius: .4rem; color: #212529 !important; text-decoration: none; cursor: pointer;
}
.cmdk-item:hover, .cmdk-item.active { background: #fdeeee; text-decoration: none; }
.cmdk-item-icon { width: 20px; text-align: center; color: #C62828; }
.cmdk-item-label { flex: 1; font-weight: 500; }
.cmdk-item-sub { font-weight: 400; color: #6b7580; font-size: .82rem; }
.cmdk-item-kind { font-size: .7rem; color: #9aa5b1; text-transform: uppercase; letter-spacing: .5px; }
.cmdk-empty { padding: 1.4rem; text-align: center; color: #9aa5b1; }
@media (max-width: 767px) { .cmdk-overlay { padding-top: 6vh; } }

