/* ==========================================================================
   Wind Zone Lookup — page hero (used only on /wind-zone-lookup)
   Video background with the Florida-beach-wind clip + dark overlay.
   ========================================================================== */
.wzl-hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 90px;
  color: #fff;
  background: #0b1320;  /* dark fallback while poster/video load */
}

.wzl-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.wzl-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(11, 19, 32, 0.55) 0%, rgba(11, 19, 32, 0.65) 60%, rgba(11, 19, 32, 0.78) 100%);
}

.wzl-hero .container {
  position: relative;
  z-index: 2;
}

.wzl-hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #facc15;
  margin-bottom: 14px;
  padding: 4px 12px;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.08);
}

.wzl-hero__title {
  font-size: clamp(1.85rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 18px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.wzl-hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
  margin: 0 auto;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 575px) {
  .wzl-hero { padding: 80px 0 60px; }
}

/* ==========================================================================
   Wind Zone Explorer
   Interactive Florida wind speed + building code lookup.
   ========================================================================== */

.wze {
  --wze-radius: 10px;
  --wze-border: rgba(15, 23, 42, 0.08);
  --wze-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  --wze-bg: #fff;
  --wze-panel-bg: #f6f7f9;
  --wze-text: #1a1a2e;
  --wze-muted: #6b7280;
  --wze-primary: #1a3a6b;

  /* Wind speed scale: blue (low) → cyan → green → yellow → orange → red */
  --wze-color-115: #3b82f6;
  --wze-color-120: #38bdf8;
  --wze-color-130: #22d3ee;
  --wze-color-140: #34d399;
  --wze-color-150: #facc15;
  --wze-color-160: #fb923c;
  --wze-color-170: #f97316;
  --wze-color-175: #ef4444;
  --wze-color-180: #dc2626;
  --wze-color-190: #991b1b;
  --wze-color-200: #7f1d1d;

  --wze-zone-hvhz: #dc2626;
  --wze-zone-wbd: #f97316;
  --wze-zone-wbd-likely: #f59e0b;
  --wze-zone-standard: #3b82f6;

  background: var(--wze-bg);
  color: var(--wze-text);
}

/* ---------- Header ---------- */
.wze__header {
  max-width: 760px;
}

/* ---------- Input area ---------- */
.wze__input {
  margin-bottom: 24px;
}

.wze__search {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 720px;
}

.wze__search-field {
  position: relative;
  flex: 1 1 320px;
  min-width: 0;
}

.wze__search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--wze-muted);
  display: inline-flex;
  pointer-events: none;
  z-index: 1;
}

.wze__address-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 40px;
  font-size: 1rem;
  border-radius: var(--wze-radius);
  border: 1px solid var(--wze-border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wze__address-input:focus {
  outline: none;
  border-color: var(--wze-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 107, 0.16);
}

.wze__locate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--wze-primary);
  background: #fff;
  border: 1px solid var(--wze-border);
  border-radius: var(--wze-radius);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wze__locate-btn:hover {
  background: var(--wze-primary);
  color: #fff;
  border-color: var(--wze-primary);
}

.wze__hint,
.wze__noscript {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--wze-muted);
}

.wze__noscript {
  color: #b91c1c;
  font-weight: 600;
}

/* ---------- Body grid ---------- */
.wze__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 768px) {
  .wze__body {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1200px) {
  .wze__body {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 40px;
  }
}

/* ---------- Map ---------- */
.wze__map {
  background: var(--wze-panel-bg);
  border: 1px solid var(--wze-border);
  border-radius: var(--wze-radius);
  padding: 14px;
  box-shadow: var(--wze-shadow);
}

.wze__map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 600;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}

.wze__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: optimizeQuality;
}

.wze__outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Active map state — fades the unclipped backdrop once the canvas is masked */
.wze__map-frame--ready {
  background: transparent;
}

.wze__marker {
  position: absolute;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  pointer-events: none;
  display: none;
}

.wze__marker--visible {
  display: block;
  animation: wze-drop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wze__marker-dot {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #111827;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wze__marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.45);
  animation: wze-pulse 1.6s ease-out infinite;
}

@keyframes wze-pulse {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes wze-drop {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Legend */
.wze__legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--wze-muted);
  font-variant-numeric: tabular-nums;
}

.wze__legend-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--wze-color-115) 0%,
    var(--wze-color-130) 18%,
    var(--wze-color-140) 32%,
    var(--wze-color-150) 48%,
    var(--wze-color-160) 62%,
    var(--wze-color-170) 76%,
    var(--wze-color-180) 88%,
    var(--wze-color-200) 100%
  );
}

/* ---------- Risk category slider ---------- */
.wze__category {
  margin-top: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--wze-border);
  border-radius: var(--wze-radius);
}

.wze__category-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--wze-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.wze__category-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wze-primary);
  text-transform: none;
  letter-spacing: 0;
}

.wze__slider {
  width: 100%;
  margin: 4px 0 2px;
  accent-color: var(--wze-primary);
}

.wze__category-marks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  font-size: 0.72rem;
  color: var(--wze-muted);
  font-weight: 700;
}

.wze__category-marks > :nth-child(2) { text-align: center; }
.wze__category-marks > :nth-child(3) { text-align: right; }

.wze__category-note {
  margin-top: 8px;
  color: var(--wze-muted);
  line-height: 1.5;
}

/* ---------- Results panel ---------- */
.wze__results-col {
  min-height: 200px;
}

.wze__placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px;
  background: var(--wze-panel-bg);
  border: 1px dashed var(--wze-border);
  border-radius: var(--wze-radius);
  color: var(--wze-muted);
}

.wze__placeholder-icon {
  color: var(--wze-primary);
  opacity: 0.6;
}

.wze__result-card {
  background: #fff;
  border: 1px solid var(--wze-border);
  border-radius: var(--wze-radius);
  box-shadow: var(--wze-shadow);
  overflow: hidden;
}

.wze__result-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--wze-border);
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.wze__speed-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--wze-color-150);
  color: #1a1a2e;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  border: 4px solid #fff;
  outline: 1px solid var(--wze-border);
  font-variant-numeric: tabular-nums;
}

.wze__speed-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  padding-top: 10px;
}

.wze__speed-unit {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
  opacity: 0.85;
}

.wze__hero-meta {
  flex: 1;
  min-width: 0;
}

.wze__hero-county {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wze-muted);
  margin-bottom: 2px;
}

.wze__hero-address {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wze-text);
  line-height: 1.3;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wze__zone-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  border-radius: 999px;
  background: var(--wze-zone-standard);
}

.wze__zone-badge--hvhz       { background: var(--wze-zone-hvhz); }
.wze__zone-badge--wbd        { background: var(--wze-zone-wbd); }
.wze__zone-badge--wbd_likely { background: var(--wze-zone-wbd-likely); }
.wze__zone-badge--standard   { background: var(--wze-zone-standard); }

/* Result detail rows */
.wze__details {
  padding: 4px 0;
}

.wze__detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 38%) 1fr;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--wze-border);
  font-size: 0.92rem;
  align-items: start;
}

.wze__detail-row:last-child {
  border-bottom: 0;
}

.wze__detail-label {
  color: var(--wze-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wze__detail-value {
  color: var(--wze-text);
  line-height: 1.45;
}

.wze__detail-value strong {
  color: #111827;
}

.wze__detail-value small {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--wze-muted);
}

/* Insurance + risk panels */
.wze__insurance,
.wze__risk {
  padding: 18px 24px;
  background: var(--wze-panel-bg);
  border-top: 1px solid var(--wze-border);
}

.wze__insurance h4,
.wze__risk h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wze-muted);
  margin: 0 0 8px;
}

.wze__insurance-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: #047857;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.wze__insurance-amount small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wze-muted);
}

.wze__insurance p {
  font-size: 0.82rem;
  color: var(--wze-muted);
  margin: 6px 0 0;
}

.wze__risk-meter {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #d1fae5 0%, #fef3c7 50%, #fee2e2 100%);
  overflow: hidden;
  margin-bottom: 8px;
}

.wze__risk-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.85);
}

.wze__risk-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
  margin-left: 6px;
}

.wze__risk p {
  font-size: 0.84rem;
  color: var(--wze-text);
  line-height: 1.5;
  margin: 0;
}

/* Result CTAs */
.wze__result-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--wze-border);
}

.wze__result-cta .btn {
  flex: 1 1 200px;
}

/* ---------- Static fallback (visible to crawlers + no-JS) ---------- */
.wze__static {
  margin-top: 32px;
}

.wze--interactive .wze__static {
  display: none;
}

.wze__zone-table {
  font-size: 0.92rem;
}

.wze__zone-table th {
  background: var(--wze-panel-bg);
  text-align: left;
}

/* ---------- Disclaimer ---------- */
.wze__disclaimer {
  border-top: 1px solid var(--wze-border);
  padding-top: 16px;
  line-height: 1.55;
}

/* ---------- Search submit button ---------- */
.wze__search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 50px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: var(--wze-primary);
  border: 1px solid var(--wze-primary);
  border-radius: var(--wze-radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.wze__search-btn:hover { background: #142d52; }
.wze__search-btn:active { transform: translateY(1px); }

/* ---------- Typeahead suggestions (anchored to .wze__search-field) ---------- */
.wze__suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--wze-border);
  border-radius: var(--wze-radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 30;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}

.wze__suggestions--open { display: block; }

.wze__suggestion {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}
.wze__suggestion:last-child { border-bottom: 0; }
.wze__suggestion:hover,
.wze__suggestion.is-active {
  background: var(--wze-panel-bg);
}

.wze__suggestion-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wze-text);
  line-height: 1.2;
}
.wze__suggestion-label mark {
  background: rgba(250, 204, 21, 0.45);
  color: inherit;
  padding: 0;
}

.wze__suggestion-sub {
  font-size: 0.78rem;
  color: var(--wze-muted);
  margin-top: 2px;
}

/* Loading spinner on the input while Census fetch is in flight */
.wze__address-input.is-loading {
  background-image: linear-gradient(90deg, transparent 60%, rgba(26, 58, 107, 0.08) 80%, transparent 100%);
  background-size: 200% 100%;
  animation: wze-shimmer 1.2s linear infinite;
}
@keyframes wze-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767px) {
  .wze.section {
    padding: 28px 0 !important;
  }
  .wze__input { margin-bottom: 18px; }
  .wze__search { gap: 8px; }
  .wze__search-field { flex-basis: 100%; }
  .wze__search-btn,
  .wze__locate-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    height: 46px;
    padding: 0 12px;
    line-height: 1rem;
  }
}

@media (max-width: 575px) {
  .wze__detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .wze__result-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .wze__speed-badge {
    width: 76px;
    height: 76px;
  }
  .wze__speed-value { font-size: 1.5rem; }
  .wze__address-input { height: 46px; font-size: 0.95rem; }
  .wze__search-icon { left: 12px; }
  .wze__address-input { padding-left: 36px; }
}
