/* ============================================================
   FACILITIES-MAP.CSS — Sovereign Facility Map
   Institutional-Grade SRHR Map Engine Styles
   Whitish Glassmorphism Theme · Ask Aunty Mimi
   ============================================================ */

/* ── PAGE LAYOUT ──────────────────────────────────────── */
.fmap-page {
  display: grid;
  grid-template-columns: 420px 1fr;
  grid-template-rows: 68px 1fr;
  height: 100vh;
  background: #FAFAFA;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
@media(max-width:1100px) { .fmap-page { grid-template-columns: 360px 1fr; } }
@media(max-width:900px) {
  .fmap-page {
    grid-template-columns: 1fr;
    grid-template-rows: 68px 45vh 1fr;
  }
  .fmap-sidebar { grid-row: 3 !important; grid-column: 1 !important; max-height: none; }
  .fmap-map-area { grid-row: 2 !important; grid-column: 1 !important; }
  .fmap-nav { grid-column: 1 !important; }
}

/* ── TOP NAV BAR ──────────────────────────────────────── */
.fmap-nav {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 20px rgba(0,0,0,0.05);
  z-index: 1000;
}
.fmap-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.fmap-nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff;
  box-shadow: 0 4px 16px rgba(20,184,166,0.3);
}
.fmap-nav-title {
  font-size: 15px; font-weight: 800; color: #111827;
  letter-spacing: -0.02em;
}
.fmap-nav-sub {
  font-size: 10px; color: #9CA3AF; font-weight: 600;
  letter-spacing: 0.3px;
}
.fmap-nav-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}
.fmap-count-badge {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #059669;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.fmap-chat-btn {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 12px; font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(20,184,166,0.3);
  text-decoration: none;
  transition: all 0.2s;
}
.fmap-chat-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(20,184,166,0.4); }
@media(max-width:600px) { .fmap-chat-btn span { display: none; } .fmap-chat-btn { padding: 10px 12px; } }

/* ── SIDEBAR ──────────────────────────────────────────── */
.fmap-sidebar {
  grid-column: 1;
  grid-row: 2;
  background: #FFFFFF;
  border-right: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Sidebar Header: Search + Locate */
.fmap-search-header {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: #FFFFFF;
}
.fmap-search-row {
  display: flex; gap: 8px;
}
.fmap-search-input {
  flex: 1;
  background: #F8FAFC;
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: 12px;
  padding: 11px 14px 11px 38px;
  font-size: 13px;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.fmap-search-input:focus { border-color: rgba(20,184,166,0.5); background-color: #fff; }
.fmap-search-input::placeholder { color: #9CA3AF; }
.fmap-locate-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(20,184,166,0.25);
}
.fmap-locate-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(20,184,166,0.35); }
.fmap-locate-btn.locating {
  animation: locatePulse 1s infinite;
}
@keyframes locatePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20,184,166,0.5); }
  50% { box-shadow: 0 0 0 10px rgba(20,184,166,0); }
}

/* Stats Bar */
.fmap-stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: #FAFBFC;
}
.fmap-stat {
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid rgba(0,0,0,0.04);
}
.fmap-stat:last-child { border-right: none; }
.fmap-stat-num {
  font-size: 18px; font-weight: 900; color: #111827;
  letter-spacing: -0.03em;
}
.fmap-stat-label {
  font-size: 9px; color: #9CA3AF; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}

/* View Toggle */
.fmap-view-toggle {
  display: flex;
  padding: 8px 18px;
  gap: 4px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: #FAFBFC;
}
.fmap-view-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  font-size: 11px; font-weight: 700;
  color: #6B7280;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s;
}
.fmap-view-btn.active {
  background: rgba(20,184,166,0.1);
  color: #0D9488;
  font-weight: 800;
}
.fmap-view-btn:hover:not(.active) { background: rgba(0,0,0,0.03); }

/* Filter Chips */
.fmap-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: #FFFFFF;
}
.fmap-filter-chip {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px; font-weight: 700;
  background: #F3F4F6;
  border: 1px solid rgba(0,0,0,0.06);
  color: #4B5563;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.fmap-filter-chip:hover { border-color: rgba(20,184,166,0.3); color: #0D9488; }
.fmap-filter-chip.active {
  background: rgba(20,184,166,0.1);
  border-color: rgba(20,184,166,0.3);
  color: #0D9488;
}
.fmap-filter-chip.active.youth { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #059669; }
.fmap-filter-chip.active.lgbtiq { background: rgba(168,85,247,0.1); border-color: rgba(168,85,247,0.3); color: #7C3AED; }
.fmap-filter-chip.active.emergency { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); color: #DC2626; }
.fmap-filter-chip.active.free { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #059669; }

/* Advanced Filter Panel */
.fmap-adv-filters {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #FAFBFC;
  border-bottom: 1px solid transparent;
}
.fmap-adv-filters.open {
  max-height: 300px;
  padding: 14px 18px;
  border-bottom-color: rgba(0,0,0,0.05);
}
.fmap-adv-group-title {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: #9CA3AF; margin-bottom: 8px;
}
.fmap-adv-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fmap-adv-row:last-child { margin-bottom: 0; }

/* Facility List */
.fmap-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FAFAFA;
}

/* Individual Facility Card */
.fmap-card {
  background: #FFFFFF;
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.fmap-card:hover {
  border-color: rgba(20,184,166,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.fmap-card.selected {
  border-color: #14B8A6;
  background: rgba(20,184,166,0.03);
  box-shadow: 0 4px 20px rgba(20,184,166,0.12);
}
.fmap-card.nearest {
  border-color: rgba(20,184,166,0.4);
  background: linear-gradient(135deg, rgba(20,184,166,0.04), rgba(16,185,129,0.02));
}
.fmap-card.nearest::before {
  content: '📍 NEAREST';
  position: absolute; top: 8px; right: 8px;
  font-size: 8px; font-weight: 900;
  background: linear-gradient(135deg, #14B8A6, #10B981);
  color: #fff; padding: 3px 8px; border-radius: 50px;
  letter-spacing: 0.5px;
}
.fmap-card-header {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px;
}
.fmap-card-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.fmap-card-icon.hospital { background: rgba(239,68,68,0.08); }
.fmap-card-icon.clinic { background: rgba(124,58,237,0.08); }
.fmap-card-icon.health-centre { background: rgba(16,185,129,0.08); }
.fmap-card-name {
  font-size: 13px; font-weight: 700; color: #111827;
  line-height: 1.3; margin-bottom: 2px;
}
.fmap-card-type {
  font-size: 10px; color: #9CA3AF; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* Status: Open/Closed Indicator */
.fmap-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
  margin-bottom: 8px;
}
.fmap-status.open-now {
  background: rgba(16,185,129,0.1);
  color: #059669;
}
.fmap-status.closed-now {
  background: rgba(239,68,68,0.08);
  color: #DC2626;
}
.fmap-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.fmap-status.open-now .fmap-status-dot {
  background: #10B981;
  animation: statusPulse 2s infinite;
}
.fmap-status.closed-now .fmap-status-dot {
  background: #EF4444;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

/* Badges */
.fmap-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.fmap-badge {
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 50px;
  border: 1px solid;
  display: inline-flex; align-items: center; gap: 3px;
}
.fmap-badge.youth { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #059669; }
.fmap-badge.pep { background: rgba(249,115,22,0.08); border-color: rgba(249,115,22,0.2); color: #EA580C; }
.fmap-badge.prep { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.2); color: #0891B2; }
.fmap-badge.srhr { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.2); color: #7C3AED; }
.fmap-badge.art { background: rgba(234,179,8,0.08); border-color: rgba(234,179,8,0.2); color: #CA8A04; }
.fmap-badge.gbv { background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.2); color: #E11D48; }
.fmap-badge.lgbtiq { background: rgba(168,85,247,0.06); border-color: rgba(168,85,247,0.2); color: #7C3AED; }
.fmap-badge.free { background: rgba(16,185,129,0.06); border-color: rgba(16,185,129,0.2); color: #059669; }
.fmap-badge.ec { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); color: #DC2626; }

/* Stock Level */
.fmap-stock {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  margin-bottom: 6px;
}
.fmap-stock.in-stock { background: rgba(16,185,129,0.08); color: #059669; }
.fmap-stock.low-stock { background: rgba(245,158,11,0.08); color: #D97706; }
.fmap-stock.out-stock { background: rgba(239,68,68,0.06); color: #DC2626; }

/* Rating + Distance Row */
.fmap-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.fmap-card-stars {
  display: flex; align-items: center; gap: 2px;
}
.fmap-card-stars i { font-size: 10px; color: #CA8A04; }
.fmap-card-stars .star-inactive { color: #E5E7EB; }
.fmap-card-rating {
  font-size: 11px; color: #6B7280; font-weight: 600;
  margin-left: 4px;
}
.fmap-card-distance {
  font-size: 11px; color: #0D9488; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.fmap-card-province {
  font-size: 10px; color: #9CA3AF; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}

/* Vibe Scores Mini */
.fmap-vibe-mini {
  display: flex; gap: 8px; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid rgba(0,0,0,0.04);
}
.fmap-vibe-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700; color: #6B7280;
}
.fmap-vibe-bar {
  width: 32px; height: 4px;
  background: #E5E7EB; border-radius: 50px; overflow: hidden;
}
.fmap-vibe-fill {
  height: 100%; border-radius: 50px;
  transition: width 0.5s ease;
}
.fmap-vibe-fill.excellent { background: #10B981; }
.fmap-vibe-fill.good { background: #14B8A6; }
.fmap-vibe-fill.fair { background: #F59E0B; }
.fmap-vibe-fill.poor { background: #EF4444; }

/* ── MAP AREA ─────────────────────────────────────────── */
.fmap-map-area {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  background: #F0F4F8;
}
#facilityMap { width: 100%; height: 100%; z-index: 1; }

/* Map Loading Overlay */
.fmap-loading {
  position: absolute; inset: 0; z-index: 400;
  background: #FAFAFA;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  transition: opacity 0.4s ease;
}
.fmap-loading.hidden { opacity: 0; pointer-events: none; }
.fmap-loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(0,0,0,0.06);
  border-top-color: #14B8A6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fmap-loading-text {
  font-size: 14px; font-weight: 700; color: #6B7280;
}

/* Map Controls Overlays */
.fmap-map-controls {
  position: absolute; top: 16px; right: 16px;
  z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
}
.fmap-map-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #4B5563;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.fmap-map-btn:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  color: #0D9488;
}
.fmap-map-btn.active { background: rgba(20,184,166,0.1); color: #0D9488; border-color: rgba(20,184,166,0.3); }

/* Map Legend */
.fmap-legend {
  position: absolute; bottom: 24px; left: 16px;
  z-index: 500;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px; padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  min-width: 180px;
}
.fmap-legend-title {
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: #9CA3AF; margin-bottom: 10px;
}
.fmap-legend-item {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.fmap-legend-item:last-child { margin-bottom: 0; }
.fmap-legend-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.fmap-legend-label {
  font-size: 11px; font-weight: 600; color: #4B5563;
}

/* ── DETAIL PANEL ─────────────────────────────────────── */
.fmap-panel-overlay {
  position: absolute; inset: 0;
  z-index: 600;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.fmap-panel-overlay.open { opacity: 1; pointer-events: auto; }

.fmap-detail-panel {
  position: absolute; bottom: 0; right: 0;
  width: 440px; max-width: 100%;
  height: 100%;
  z-index: 700;
  background: #FFFFFF;
  border-left: 1px solid rgba(0,0,0,0.06);
  box-shadow: -8px 0 40px rgba(0,0,0,0.10);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.fmap-detail-panel.open { transform: translateX(0); }
@media(max-width:900px) {
  .fmap-detail-panel {
    position: fixed; inset: 0;
    width: 100%; max-width: 100%;
    border-left: none;
    border-radius: 0;
    transform: translateY(100%);
  }
  .fmap-detail-panel.open { transform: translateY(0); }
}

.fmap-panel-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  background: #F3F4F6; border: 1px solid rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
  color: #4B5563; font-size: 14px; cursor: pointer;
  transition: all 0.2s; z-index: 10;
}
.fmap-panel-close:hover { background: #E5E7EB; }

.fmap-panel-hero {
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.fmap-panel-name {
  font-size: 22px; font-weight: 900; color: #111827;
  letter-spacing: -0.02em; margin-bottom: 4px;
  padding-right: 40px;
}
.fmap-panel-meta {
  font-size: 12px; color: #6B7280; font-weight: 600;
  margin-bottom: 10px;
}
.fmap-panel-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }

/* Panel Info Grid */
.fmap-panel-info {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.fmap-info-card {
  background: #F8FAFC; border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px; padding: 12px;
}
.fmap-info-label {
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #9CA3AF; margin-bottom: 4px;
}
.fmap-info-value {
  font-size: 13px; font-weight: 700; color: #111827;
}

/* Action Buttons */
.fmap-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.fmap-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-radius: 12px;
  font-size: 12px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.fmap-action-btn.directions {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.fmap-action-btn.directions:hover { box-shadow: 0 6px 20px rgba(16,185,129,0.35); transform: translateY(-1px); }
.fmap-action-btn.booking {
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff; box-shadow: 0 4px 12px rgba(20,184,166,0.25);
}
.fmap-action-btn.booking:hover { box-shadow: 0 6px 20px rgba(20,184,166,0.35); transform: translateY(-1px); }
.fmap-action-btn.uber {
  background: #000; color: #fff;
}
.fmap-action-btn.apple-maps {
  background: #F3F4F6; color: #111827;
  border: 1px solid rgba(0,0,0,0.08);
}
.fmap-action-btn.safe-route {
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.25);
  grid-column: 1 / -1;
}

/* Vibe Ratings Section */
.fmap-vibe-section {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.fmap-section-title {
  font-size: 13px; font-weight: 800; color: #111827;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.fmap-vibe-grid {
  display: flex; flex-direction: column; gap: 10px;
}
.fmap-vibe-row {
  display: flex; align-items: center; gap: 12px;
}
.fmap-vibe-label {
  font-size: 12px; font-weight: 600; color: #4B5563;
  min-width: 90px;
}
.fmap-vibe-track {
  flex: 1; height: 8px;
  background: #F3F4F6; border-radius: 50px;
  overflow: hidden;
}
.fmap-vibe-progress {
  height: 100%; border-radius: 50px;
  transition: width 0.6s ease;
}
.fmap-vibe-score {
  font-size: 12px; font-weight: 800;
  min-width: 32px; text-align: right;
}

/* Reviews Section */
.fmap-reviews-section {
  padding: 16px 24px;
  flex: 1;
}
.fmap-review-item {
  background: #F8FAFC; border: 1px solid rgba(0,0,0,0.04);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.fmap-review-stars { display: flex; gap: 2px; margin-bottom: 6px; }
.fmap-review-stars i { font-size: 11px; color: #CA8A04; }
.fmap-review-text { font-size: 12px; color: #4B5563; line-height: 1.6; }
.fmap-review-meta { font-size: 10px; color: #9CA3AF; font-weight: 600; margin-top: 6px; }

/* Add Review */
.fmap-add-review {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: #FAFBFC;
}
.fmap-review-input {
  width: 100%; min-height: 70px;
  background: #fff; border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: 12px; padding: 12px;
  font-size: 13px; font-family: inherit; color: #111827;
  outline: none; resize: none;
  margin-bottom: 10px;
}
.fmap-review-input:focus { border-color: rgba(20,184,166,0.5); }
.fmap-star-picker {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.fmap-star-pick {
  font-size: 22px; cursor: pointer;
  color: #D1D5DB; transition: color 0.15s;
}
.fmap-star-pick.active { color: #CA8A04; }
.fmap-submit-review {
  width: 100%; padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff; font-size: 13px; font-weight: 800;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.fmap-submit-review:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(20,184,166,0.3); }

/* ── QR BOOKING MODAL ─────────────────────────────────── */
.fmap-qr-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
}
.fmap-qr-modal.open { display: flex; }
.fmap-qr-card {
  background: #FFFFFF;
  border: 1px solid rgba(20,184,166,0.15);
  border-radius: 24px;
  padding: 0; max-width: 400px; width: 92%;
  box-shadow: 0 24px 80px rgba(0,0,0,0.15);
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fmap-qr-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(20,184,166,0.06), rgba(16,185,129,0.04));
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; gap: 14px;
}
.fmap-qr-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(20,184,166,0.3);
}
.fmap-qr-title { font-size: 16px; font-weight: 800; color: #111827; }
.fmap-qr-subtitle { font-size: 11px; color: #6B7280; font-weight: 600; }
.fmap-qr-body { padding: 24px; text-align: center; }
.fmap-qr-image-wrap {
  width: 200px; height: 200px; margin: 0 auto 16px;
  background: #F8FAFC; border-radius: 16px; padding: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed rgba(20,184,166,0.2);
}
.fmap-qr-image { width: 100%; height: 100%; object-fit: contain; }
.fmap-qr-code-text {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 18px; font-weight: 900;
  color: #14B8A6; letter-spacing: 3px;
  margin-bottom: 8px;
}
.fmap-qr-facility-name { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 4px; }
.fmap-qr-facility-loc { font-size: 12px; color: #6B7280; margin-bottom: 4px; }
.fmap-qr-topic { font-size: 11px; color: #0D9488; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.fmap-qr-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: space-between;
  background: #FAFBFC;
}
.fmap-qr-privacy {
  font-size: 10px; color: #059669; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.fmap-qr-actions { display: flex; gap: 8px; }
.fmap-qr-btn {
  padding: 8px 16px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
  background: #F3F4F6; border: 1px solid rgba(0,0,0,0.06);
  color: #111827; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: all 0.2s;
}
.fmap-qr-btn:hover { background: #E5E7EB; }
.fmap-qr-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,0,0,0.05); border: none;
  display: flex; align-items: center; justify-content: center;
  color: #6B7280; font-size: 14px; cursor: pointer;
}

/* ── SAFE ROUTE INDICATOR ─────────────────────────────── */
.fmap-safe-route-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(168,85,247,0.06));
  border: 1px solid rgba(124,58,237,0.2);
  padding: 6px 14px; border-radius: 50px;
  font-size: 10px; font-weight: 700; color: #7C3AED;
  margin-bottom: 10px;
}

/* ── LEAFLET POPUP OVERRIDES (Whitish) ────────────────── */
.leaflet-popup-content-wrapper {
  background: rgba(255,255,255,0.97) !important;
  border: 1px solid rgba(20,184,166,0.15) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12) !important;
  color: #111827 !important;
}
.leaflet-popup-tip { background: rgba(255,255,255,0.97) !important; }
.leaflet-popup-content { margin: 14px 16px !important; font-family: 'Plus Jakarta Sans', sans-serif !important; }
.mimi-popup .leaflet-popup-content-wrapper { border-color: rgba(20,184,166,0.2) !important; }

/* Popup Internals */
.fmap-popup { min-width: 240px; }
.fmap-popup-name { font-size: 14px; font-weight: 800; color: #111827; margin-bottom: 3px; }
.fmap-popup-type { font-size: 10px; color: #6B7280; font-weight: 600; text-transform:uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.fmap-popup-status { margin-bottom: 8px; }
.fmap-popup-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.fmap-popup-rating { font-size: 11px; color: #6B7280; margin-bottom: 4px; }
.fmap-popup-hours { font-size: 11px; color: #9CA3AF; margin-bottom: 10px; }
.fmap-popup-btn {
  display: block; width: 100%;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  color: #fff; padding: 10px; border-radius: 10px;
  font-size: 12px; font-weight: 700;
  text-align: center; cursor: pointer;
  margin-top: 6px; border: none;
  transition: all 0.2s;
}
.fmap-popup-btn:hover { transform: translateY(-1px); }

/* ── EMPTY STATE ──────────────────────────────────────── */
.fmap-empty {
  text-align: center; padding: 48px 24px;
  color: #9CA3AF;
}
.fmap-empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.4; display: block; color: #14B8A6; }
.fmap-empty-title { font-size: 14px; font-weight: 800; color: #4B5563; margin-bottom: 6px; }
.fmap-empty-text { font-size: 12px; font-weight: 500; }

/* ── SCROLLBAR ────────────────────────────────────────── */
.fmap-list::-webkit-scrollbar { width: 5px; }
.fmap-list::-webkit-scrollbar-track { background: transparent; }
.fmap-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
.fmap-list::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
.fmap-detail-panel::-webkit-scrollbar { width: 5px; }
.fmap-detail-panel::-webkit-scrollbar-track { background: transparent; }
.fmap-detail-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 3px; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media(max-width:600px) {
  .fmap-nav { padding: 0 12px; gap: 8px; }
  .fmap-nav-title { font-size: 13px; }
  .fmap-count-badge { font-size: 10px; padding: 4px 10px; }
  .fmap-panel-name { font-size: 18px; }
  .fmap-actions { grid-template-columns: 1fr; }
  .fmap-panel-info { grid-template-columns: 1fr; }
  .fmap-legend { display: none; }
  .fmap-stats-bar { grid-template-columns: repeat(2, 1fr); }
}
