/**
 * critical-bundle.css - Optimized Critical Path CSS
 *
 * PURPOSE: Minimal render-blocking CSS for above-fold layout only
 * TARGET: ~20KB (reduced from 100KB)
 * OPTIMIZED: Jan 15, 2026
 *
 * CONTAINS ONLY:
 * - Root CSS variables (platform)
 * - Body/html base layout
 * - Map container (.nearby-section, #map)
 * - Content area (.content-area, .card-scroll-section)
 * - Tab system (.tab-overlay, .wb-tab-btn)
 * - Map overlay icons positioning
 * - Footer nav (.wb-footer-nav)
 * - Action buttons
 * - Horizontal cards base
 * - Splash overlay
 * - Critical mobile/desktop responsive
 *
 * NON-CRITICAL CSS MOVED TO CSSLoader.js:
 * - Auth modal -> deferred 'core'
 * - InfoWindow styles -> deferred 'mapMarkers'
 * - Form elements -> deferred 'utility'
 * - Modal styles -> deferred 'utility'
 * - Drawer menu details -> deferred 'core'
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES - Platform Variables
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Safe Area Insets */
  --wb-safe-top: env(safe-area-inset-top, 0px);
  --wb-safe-bottom: env(safe-area-inset-bottom, 0px);
  --wb-safe-left: env(safe-area-inset-left, 0px);
  --wb-safe-right: env(safe-area-inset-right, 0px);

  /* Map heights - svh excludes mobile browser UI */
  --wb-map-height: 68svh;

  /* Core design tokens */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --grey-100: #F5F5F5;
  --grey-200: #DCDCDC;
  --grey-300: #D3D3D3;
  --grey-700: #696969;
  --white: #FFFFFF;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 0 !important;
  margin: 0;
  color: #000;
  background: #fff;
  padding-bottom: 80px !important;
}

main {
  padding: 0 !important;
  margin: 0 !important;
}

/* Hide global header on homepage when drawer closed */
body:not(.drawer-open) header {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAP HERO - 68svh STICKY
   ═══════════════════════════════════════════════════════════════════════════ */

.nearby-section {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  width: 100% !important;
  max-width: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
  height: 68svh !important;
}

.section-label {
  display: none !important;
}

#map {
  width: 100% !important;
  height: 68svh !important;
  border-radius: 0 !important;
  transition: height .3s ease;
}

.map-container {
  position: relative;
  height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT AREA - Scrolls over sticky map
   ═══════════════════════════════════════════════════════════════════════════ */

body:not(.drawer-open) .content-area {
  position: relative;
  min-height: calc(100vh - 68vh);
  background: #fff;
  z-index: 1001;
  padding-top: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

body.drawer-open .content-area {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAB SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.tab-overlay {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border-bottom: none;
}

.wb-tab-btn {
  width: 66px;
  background: #F0FFF0;
  border: 2px solid #e5e7eb;
  padding: 6px 3px;
  border-radius: 12px;
  border-bottom-left-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  box-shadow: -1.5px 1.5px 0 #000000;
}

.wb-tab-btn:hover {
  background: #f5f5f5;
  border-color: #cbd5e1;
}

.wb-tab-btn.active {
  color: #fff !important;
  border: 0.5px solid #000;
  box-shadow: -1.5px 1.5px 0 #000000;
}

.wb-tab-btn.active .tab-line-1,
.wb-tab-btn.active .tab-line-2 {
  color: #fff !important;
}

/* Tab Colors */
.wb-tab-btn[data-tab="nearby"].active { background: #B22222; }
.wb-tab-btn[data-tab="civic"].active { background: #F28C28; }
.wb-tab-btn[data-tab="groups"].active { background: #4682B4; }
.wb-tab-btn[data-tab="zones"].active { background: #5F9EA0; }
.wb-tab-btn[data-tab="circle"].active { background: #7F00FF; }

.wb-tab-btn .tab-line-1 {
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  display: block;
}

.wb-tab-btn .tab-line-2 {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  display: block;
}

.mobile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.desktop-text {
  display: none;
  font-weight: 700;
  white-space: nowrap;
}

.wb-tab-btn[data-tab="groups"] {
  max-width: 70px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HORIZONTAL CARD SCROLL (LCP Element)
   ═══════════════════════════════════════════════════════════════════════════ */

.card-scroll-section {
  overflow-x: auto;
  overflow-y: hidden;
  height: 120px;
  padding: 12px 10px;
  background-color: #F0FFF0;
  background-image: linear-gradient(rgba(240, 255, 240, 0.85), rgba(240, 255, 240, 0.85)), url('/assets/patterns/hero-wallpaper.svg');
  background-repeat: repeat;
  background-size: 600px 600px;
  border-top: 1px solid #e5e7eb;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.card-scroll-container {
  display: flex;
  gap: 12px;
  height: 100%;
}

.horizontal-card {
  flex: 0 0 260px;
  width: 260px;
  height: 100px;
  background: #f9fafb;
  border: 1.5px solid transparent;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.horizontal-card:hover {
  transform: translateY(-2px);
  box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.7);
}

/* Card type borders */
.incident-card { border-color: #B22222 !important; }
.civic-card { border-color: #F28C28 !important; }
.petition-card { border-color: #2F4F4F !important; }
.group-card { border-color: #4682B4 !important; }
.zone-card { border-color: #5F9EA0 !important; }
.circle-card { border-color: #7F00FF !important; }

/* Teaser placeholder card */
.horizontal-card.teaser-placeholder {
  flex: 0 0 calc(100vw - 44px);
  max-width: 600px;
  height: 100px;
  padding: 10px;
  cursor: pointer;
  margin: 0 auto;
  border: 1.5px solid #1E90FF !important;
  display: flex;
  flex-direction: column;
  position: relative;
}

.horizontal-card.teaser-placeholder:hover {
  transform: translateY(-2px);
  box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.7);
}

/* Placeholder text responsive */
.placeholder-body-desktop { display: -webkit-box !important; }
.placeholder-body-mobile { display: none !important; }

@media (max-width: 768px) {
  .placeholder-body-desktop { display: none !important; }
  .placeholder-body-mobile { display: -webkit-box !important; }
}

@media (min-width: 769px) {
  .horizontal-card.teaser-placeholder { max-width: 480px; }
}

/* Selection glow */
.card-selected-glow {
  border: 2px solid #1E90FF !important;
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.6) !important;
}

/* Scrollbar styling */
.card-scroll-section::-webkit-scrollbar { height: 6px; }
.card-scroll-section::-webkit-scrollbar-track { background: #f1f5f9; }
.card-scroll-section::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAP OVERLAY ICONS
   ═══════════════════════════════════════════════════════════════════════════ */

.map-overlay-icon {
  position: fixed;
  width: 38px;
  height: 38px;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.2s ease;
  z-index: 1004;
  box-sizing: border-box;
}

.map-overlay-icon:hover { background: #f5f5f5; }
.map-overlay-icon:active { transform: scale(0.98); }
.map-overlay-icon svg {
  width: 19px !important;
  height: 19px !important;
  fill: #000;
}

/* Search container */
body:not(.drawer-open) .map-search-container {
  position: fixed;
  bottom: calc(32svh + 12px);
  right: 12px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 1005;
}

.map-search-input {
  width: 0;
  opacity: 0;
  border: 0.5px solid #000;
  border-radius: 6px;
  padding: 0;
  margin-right: 8px;
  font-size: 13px;
  height: 38px;
  background: #fff;
  transition: all 0.3s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.map-search-container.expanded .map-search-input {
  width: 260px;
  opacity: 1;
  padding: 0 12px;
  pointer-events: auto;
}

.map-search-input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.map-search-container .map-overlay-icon {
  position: relative;
  flex-shrink: 0;
  border-width: 0.5px;
}

/* Recenter button */
body:not(.drawer-open) #recenterBtn {
  position: fixed;
  bottom: calc(32svh + 12px + 38px + 8px);
  right: 12px;
  border-width: 0.5px;
}

/* Messages/notifications button - stacked above recenter */
body:not(.drawer-open) #mapMessagesBtn {
  position: fixed;
  bottom: calc(32svh + 12px + 38px + 12px + 38px + 12px);
  right: 12px;
  border-width: 0.5px;
}

/* Right stack buttons */
.map-overlay-icon.right-stack {
  right: 12px;
  border-width: 0.5px;
}
.map-overlay-icon.right-stack-1 { top: 64px; }
.map-overlay-icon.right-stack-2 { top: 114px; }
.map-overlay-icon.right-stack-3 { top: 164px; }

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid white;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#messagesBadge {
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  pointer-events: none;
}

/* Google Places dropdown */
.pac-container {
  z-index: 1006 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 6px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

body:not(.drawer-open) .action-buttons {
  position: fixed;
  left: 16px;
  bottom: calc(32svh + 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1004;
}

.wb-action-btn {
  background: #fff;
  border: 0.5px solid #000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  color: #000;
  text-align: center;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  padding: 8px;
}

.wb-action-btn:hover {
  background: #f5f5f5;
  transform: scale(1.05);
}

#reportBtn {
  width: 66px;
  height: 62px;
  border: 2px solid #B22222;
  font-size: 10px;
  line-height: 1.3;
  padding: 4px;
  border-top-left-radius: 6px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 12px;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.6);
}

#civicBtn {
  width: 66px;
  height: 62px;
  border: 2px solid #F28C28;
  font-size: 10px;
  line-height: 1.3;
  padding: 4px;
  border-top-left-radius: 6px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 6px;
  border-bottom-left-radius: 12px;
  box-shadow: -3px 3px 6px rgba(0, 0, 0, 0.6);
  position: relative;
}

#superheroSchoolBtn {
  border: 2px solid #007BFF !important;
}
#superheroSchoolBtn svg {
  width: 19px !important;
  height: 19px !important;
}

.connector-line { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.wb-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 2px 0 6px 0;
  z-index: 1003;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  height: 80px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.wb-footer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.wb-footer-nav-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

.wb-footer-nav-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: color 0.2s ease;
}

.wb-footer-nav-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.wb-footer-nav-text {
  font-size: 12px;
  font-weight: 500;
  color: #515050ff;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.wb-footer-nav-text.mobile-text { display: block; }
.wb-footer-nav-text.desktop-text { display: none; }

.wb-footer-nav-item:hover .wb-footer-nav-icon { color: #0366d6; }
.wb-footer-nav-item:hover .wb-footer-nav-text { color: #0366d6; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPLASH OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

#splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-video {
  width: 40%;
  max-width: 300px;
  height: auto;
  border-radius: 20px;
}

.splash-logo {
  margin-top: -8px;
  width: 180px;
  max-width: 50%;
  height: auto;
  animation: logoPulse 2s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.5s 1;
}

@keyframes logoPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#splash-overlay.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRAWER BASE (positioning only - details in deferred CSS)
   ═══════════════════════════════════════════════════════════════════════════ */

#wb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 10000;
}

#wb-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

#wb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(65vw, 640px);
  max-width: 90vw;
  background: #fff;
  box-shadow: -16px 0 32px rgba(0, 0, 0, .15);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

#wb-drawer.open {
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DRAWER MENU STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

.wb-d-head {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.wb-d-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
}

.wb-d-main {
  padding: 16px 3px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.wb-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#wb-menu-main {
  flex: 1;
}

.wb-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
  color: #111;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  width: 100%;
  cursor: pointer;
}

.wb-menu-item:hover {
  opacity: .85;
}

.wb-menu-item:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 3px;
}

.wb-menu-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  flex: 0 0 22px;
}

.wb-menu-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
}

.wb-menu-icon i {
  font-size: 22px;
  color: inherit;
}

.wb-menu-separator {
  height: 1px;
  background: #ddd;
  margin: 8px 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .wb-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border: 0.5px solid #000 !important;
  }

  .map-overlay-icon {
    width: 38px !important;
    height: 38px !important;
    border: 1.5px solid #000 !important;
  }

  .map-overlay-icon svg {
    width: 19px !important;
    height: 19px !important;
  }

  body:not(.drawer-open) .map-search-container {
    bottom: calc(32svh + 12px) !important;
    z-index: 1005 !important;
  }

  .map-search-input {
    font-size: 16px !important;
  }

  body:not(.drawer-open) #recenterBtn {
    bottom: calc(32svh + 12px + 38px + 12px) !important;
  }

  body:not(.drawer-open) #mapMessagesBtn {
    bottom: calc(32svh + 12px + 38px + 12px + 38px + 12px) !important;
  }

  #reportBtn {
    width: 66px !important;
    height: 62px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
    padding: 4px !important;
  }

  #civicBtn {
    width: 66px !important;
    height: 62px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    padding: 4px !important;
  }

  .wb-tab-btn {
    font-size: 11px !important;
    max-width: 66px !important;
    padding: 6px 3px !important;
  }

  .wb-tab-btn[data-tab="groups"] {
    max-width: 70px !important;
  }

  .wb-footer-nav {
    padding: 4px 0 12px 0;
    height: 80px;
  }

  .wb-footer-nav-icon {
    width: 22px;
    height: 22px;
  }

  .wb-footer-nav-icon svg {
    width: 18px;
    height: 18px;
  }

  .wb-footer-nav-text {
    font-size: 13px;
  }

  body {
    padding-bottom: 66px !important;
  }
}

/* Prevent blue tap highlight on mobile */
.map-overlay-icon,
.wb-action-btn,
.wb-tab-btn,
.wb-footer-nav-item {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP SIDEBAR (768px+)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  .nearby-section, #map {
    width: 100% !important;
    margin-left: 0 !important;
  }

  body:not(.drawer-open) .action-buttons {
    left: calc(8vw + 16px) !important;
  }

  #main-logo {
    left: calc(8vw + 8px) !important;
  }

  /* Hide hamburger on desktop */
  #main-menu-button, .wb-menu-btn {
    display: none !important;
  }

  /* Right sidebar drawer */
  #wb-drawer {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: 16vw !important;
    height: 100vh !important;
    max-width: none !important;
    transform: none !important;
    z-index: 900 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06), -1px 0 4px rgba(0, 0, 0, 0.04), inset 4px 0 7px -1px rgba(0, 0, 0, 0.12) !important;
    border-radius: 16px 0 0 16px !important;
    padding-top: 16px !important;
  }

  #wb-overlay {
    display: none !important;
    pointer-events: none !important;
  }

  #map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0 !important;
    margin: 0 !important;
  }

  .nearby-section {
    width: 100% !important;
    margin: 0 !important;
    position: static !important;
    height: calc(68vh + 50px) !important;
  }

  body {
    padding-right: 16vw !important;
  }

  body:not(.drawer-open) .map-search-container,
  body:not(.drawer-open) #recenterBtn,
  body:not(.drawer-open) #mapMessagesBtn,
  body:not(.drawer-open) .map-overlay-icon.right-stack {
    right: calc(16vw + 12px) !important;
  }

  body:not(.drawer-open) .action-buttons {
    bottom: calc(32svh + 12px - 50px) !important;
  }

  body:not(.drawer-open) .map-search-container {
    bottom: calc(32svh + 12px - 50px) !important;
  }

  body:not(.drawer-open) #recenterBtn {
    bottom: calc(32svh + 12px + 38px + 8px - 50px) !important;
  }

  body:not(.drawer-open) #mapMessagesBtn {
    bottom: calc(32svh + 12px + 38px + 12px + 38px + 12px - 50px) !important;
  }

  body:not(.drawer-open) #communityMapControl {
    bottom: calc(32svh + 104px - 50px) !important;
  }

  body:not(.drawer-open) .map-overlay-icon.bottom-left {
    bottom: calc(30svh + 12px - 50px) !important;
  }

  body:not(.drawer-open) .content-area {
    z-index: 1010 !important;
  }

  /* Desktop tabs */
  .tab-overlay {
    gap: 2.5vw !important;
    padding: 10px 2.5vw !important;
  }

  .tab-overlay .wb-tab-btn {
    width: auto !important;
    flex: 1 !important;
    max-width: none !important;
    font-size: 13px !important;
    padding: 8px 4px !important;
    color: #000 !important;
  }

  .tab-overlay .wb-tab-btn.active {
    color: #fff !important;
  }

  .tab-overlay .wb-tab-btn .mobile-text {
    display: none !important;
  }

  .tab-overlay .wb-tab-btn .desktop-text {
    display: block !important;
    font-weight: 700 !important;
    color: inherit !important;
  }

  /* Desktop drawer menu adjustments */
  #wb-drawer .wb-menu-item {
    font-size: 16px !important;
    padding: 11px 12px !important;
    gap: 10px !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
    border-radius: 8px !important;
    margin: 0 8px !important;
  }

  #wb-drawer .wb-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    color: #000 !important;
  }

  #wb-drawer .wb-menu-icon,
  #wb-drawer .wb-menu-icon svg,
  #wb-drawer .wb-menu-icon i {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    flex: 0 0 18px !important;
  }

  #wb-drawer .wb-d-head {
    display: none !important;
  }

}

/* ═══════════════════════════════════════════════════════════════════════════
   PWA / STANDALONE MODE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (display-mode: standalone) {
  .wb-header {
    padding-top: var(--wb-safe-top);
  }
  .wb-footer-nav {
    padding-bottom: var(--wb-safe-bottom);
  }

  /* Android PWA tab adjustment */
  body.android-device .tab-overlay {
    margin-top: -40px !important;
  }
  body.android-device .content-area {
    margin-top: 40px !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .wb-footer-nav {
    padding-bottom: max(var(--wb-safe-bottom), 20px);
  }
}

/* Keyboard handling */
@media (max-height: 500px) and (orientation: portrait) {
  .wb-footer-nav {
    display: none;
  }
}

/* svh fallback */
@supports not (height: 100svh) {
  :root {
    --wb-map-height: 62vh;
  }
}
