/* hero-map.css — Styles for the full-width Leaflet hero map section.
 * Owns: .hm-* class styles for the dark map hero component.
 * Does NOT own: global theme, nav, or other page sections.
 */

/* ── Hero container ──────────────────────────────────────────────────────── */
.hm-hero {
  position: relative;
  height: 640px;
  min-height: 560px;
  overflow: hidden;
  background: #07080F;
}

/* ── Map layer ───────────────────────────────────────────────────────────── */
.hm-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.hm-leaflet-map .leaflet-container { cursor: default !important; }
.hm-leaflet-map .leaflet-control-zoom,
.hm-leaflet-map .leaflet-control-attribution { display: none !important; }

/* Radial gradient overlay: left side heavy for text; radial dark vignette */
.hm-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to right, rgba(7,8,15,0.85) 0%, rgba(7,8,15,0.60) 38%, rgba(7,8,15,0.10) 65%, rgba(7,8,15,0) 100%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

/* ── Overlay content ─────────────────────────────────────────────────────── */
.hm-overlay-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 0 80px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Left column ─────────────────────────────────────────────────────────── */
.hm-left {
  flex: 0 1 40%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hm-m25-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.25);
  color: #22C55E;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 14px 6px 10px;
  border-radius: 9999px;
  margin-bottom: 26px;
  width: fit-content;
  text-transform: uppercase;
}
.hm-pulse-dot {
  width: 8px; height: 8px;
  background: #22C55E;
  border-radius: 50%;
  flex-shrink: 0;
  animation: hm-gpulse 2s ease-in-out infinite;
}
@keyframes hm-gpulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.7); }
}

.hm-h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -1px;
}
.hm-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: rgba(236,238,246,0.52);
  line-height: 1.6;
  margin: 0 0 26px;
  max-width: 400px;
}
.hm-trust-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-trust-col {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(236,238,246,0.55);
  letter-spacing: 0.02em;
}
.hm-trust-sep { font-size: 0.78rem; color: rgba(236,238,246,0.18); }

/* ── Booking card ────────────────────────────────────────────────────────── */
.hm-booking-card {
  flex: 0 0 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hm-card-header { display: flex; align-items: center; justify-content: space-between; }
.hm-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.25);
  color: #16a34a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 11px 5px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}
.hm-live-dot {
  width: 7px; height: 7px;
  background: #22C55E;
  border-radius: 50%;
  flex-shrink: 0;
  animation: hm-gpulse 2s ease-in-out infinite;
}
.hm-eta-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #6b7280;
}
.hm-eta-chip {
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.35);
  color: #ea580c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
}
.hm-trade-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9ca3af;
}
.hm-trade-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-pill {
  padding: 6px 13px;
  border-radius: 9999px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.hm-pill:hover { border-color: #d1d5db; background: #f3f4f6; color: #111827; }
.hm-pill.active {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.5);
  color: #ea580c;
  font-weight: 600;
}
.hm-input-wrap { position: relative; }
.hm-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(249,115,22,0.6);
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
}
.hm-input {
  width: 100%;
  padding: 13px 36px 13px 40px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  color: #111827;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.hm-input:focus { border-color: rgba(249,115,22,0.5); background: #fff; }
.hm-input::placeholder { color: #9ca3af; }
.hm-pc-check {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.hm-pc-check.valid  { display: flex; background: rgba(34,197,94,0.15); color: #16a34a; }
.hm-pc-check.invalid{ display: flex; background: rgba(239,68,68,0.12); color: #dc2626; }
.hm-error {
  color: #dc2626;
  font-size: 0.78rem;
  margin: 0;
  min-height: 16px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}
.hm-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.hm-eta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}
.hm-eta-dot {
  width: 7px; height: 7px;
  background: #22C55E;
  border-radius: 50%;
  flex-shrink: 0;
  animation: hm-gpulse 2s ease-in-out infinite;
}
.hm-cta {
  padding: 14px 24px;
  background: #f97316;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(249,115,22,0.3);
  white-space: nowrap;
}
.hm-cta:hover { background: #ea580c; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(249,115,22,0.4); }
.hm-cta:active { transform: translateY(0); }
.hm-bottom-strip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(236,238,246,0.32);
  text-align: center;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
}

/* ── AI triage preview ─────────────────────────────────────────────────────
 * Inline panel that appears below the typeahead input after debounced
 * /api/diagnose fetches a confident match. Shares the booking-card's light
 * surface; uses a soft orange wash to differentiate from plain inputs.
 */
.hm-triage {
  background: rgba(249,115,22,0.06);
  border: 1px solid rgba(249,115,22,0.20);
  border-radius: 12px;
  padding: 11px 12px 9px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.hm-triage.hidden { display: none; }
.hm-triage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.hm-triage-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.hm-triage-pill-high   { background: rgba(34,197,94,0.15); color: #16a34a; }
.hm-triage-pill-medium { background: rgba(249,115,22,0.15); color: #ea580c; }
.hm-triage-pill-low    { background: rgba(107,114,128,0.18); color: #4b5563; }
.hm-triage-title {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-triage-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #ea580c;
  flex-shrink: 0;
}
.hm-triage-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hm-triage-btn-primary,
.hm-triage-btn-secondary,
.hm-triage-btn-tertiary {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.1s;
  border: 1px solid transparent;
}
.hm-triage-btn-primary {
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(249,115,22,0.28);
}
.hm-triage-btn-primary:hover { background: #ea580c; transform: translateY(-1px); }
.hm-triage-btn-secondary {
  background: #ffffff;
  color: #374151;
  border-color: #e5e7eb;
}
.hm-triage-btn-secondary:hover { border-color: #d1d5db; background: #f9fafb; }
.hm-triage-btn-tertiary {
  background: transparent;
  color: rgba(75,85,99,0.78);
  font-size: 11.5px;
  padding: 6px 8px;
  font-weight: 500;
}
.hm-triage-btn-tertiary:hover { color: #374151; }

/* ── Engineer markers ────────────────────────────────────────────────────── */
.hm-eng-marker {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #f97316;
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 0 8px rgba(249,115,22,0.7);
}
.hm-eng-marker.hm-pulse { animation: hm-mpulse 2.4s ease-in-out infinite; }
@keyframes hm-mpulse {
  0%,100% { box-shadow: 0 0 6px rgba(249,115,22,0.6); transform: scale(1); }
  50% { box-shadow: 0 0 16px rgba(249,115,22,0.9); transform: scale(1.35); }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hm-hero { height: auto; min-height: 100vh; }
  .hm-overlay-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 20px 80px;
    gap: 24px;
    overflow-y: auto;
  }
  .hm-left { flex: none; width: 100%; }
  .hm-booking-card { flex: none; width: 100%; max-width: 480px; }
  .hm-map-overlay {
    background: linear-gradient(
      to bottom,
      rgba(7,8,15,0.88) 0%,
      rgba(7,8,15,0.65) 45%,
      rgba(7,8,15,0.22) 100%
    );
  }
  .hm-bottom-strip { display: none; }
}
@media (max-width: 600px) {
  .hm-hero { min-height: 100svh; }
  .hm-overlay-wrap { padding: 90px 16px 70px; }
  .hm-booking-card { padding: 18px 16px; border-radius: 14px; }
  .hm-trade-pills { gap: 5px; }
  .hm-pill { font-size: 11.5px; padding: 5px 11px; }
  .hm-cta { font-size: 13.5px; padding: 13px 18px; }
}
@media (max-width: 480px) {
  .hm-leaflet-map { height: 280px; position: relative; }
  .hm-hero { display: flex; flex-direction: column; }
  .hm-overlay-wrap {
    position: relative;
    inset: auto;
    padding: 24px 16px 40px;
    background: #07080F;
  }
  .hm-map-overlay { display: none; }
}
