/* ==========================================================================
   Navana Furniture - Modern Store Locator CSS
   ========================================================================== */

:root {
  --primary: #047857;           /* Rich Emerald Green */
  --primary-hover: #065f46;     /* Deep Forest Emerald */
  --primary-light: #ecfdf5;     /* Soft Mint / Emerald Tint */
  --primary-rgb: 4, 120, 87;
  
  --secondary: #1e293b;
  --secondary-light: #334155;
  
  --accent-gold: #d97706;
  --accent-blue: #0284c7;
  --accent-green: #059669;
  
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --sidebar-width: 440px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar Styling
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Header */
.sidebar-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #064e3b 0%, #047857 55%, #059669 100%);
  color: white;
  position: relative;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
  color: #ffffff;
}

.brand-text p {
  font-size: 0.78rem;
  opacity: 0.88;
  font-weight: 400;
}

.total-badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}

/* Search & Filters Section */
.search-filter-section {
  padding: 1rem 1.25rem 0.75rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Search Box */
.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: none;
  border-radius: 50%;
  font-size: 0.85rem;
}

.clear-search-btn:hover {
  color: var(--text-primary);
}

/* Filter Controls Row */
.filter-row {
  display: flex;
  gap: 0.5rem;
}

.custom-select {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-weight: 500;
}

.custom-select:focus {
  border-color: var(--primary);
  background: #ffffff;
}

.near-me-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid rgba(var(--primary-rgb), 0.2);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
}

.near-me-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.near-me-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  animation: pulse 2s infinite;
}

/* Category Pills */
.category-pills {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 5px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.category-pill:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.25);
}

/* Radius Slider Box (Hidden by default, shown when user location active) */
.radius-container {
  display: none;
  background: var(--primary-light);
  border: 1px dashed rgba(var(--primary-rgb), 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.78rem;
}

.radius-container.visible {
  display: block;
}

.radius-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--primary);
}

.radius-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Results Info Bar */
.results-info-bar {
  padding: 8px 1.25rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.results-count {
  font-weight: 700;
  color: var(--primary);
}

.sort-select {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

/* ==========================================================================
   Showroom Cards List
   ========================================================================== */
.store-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg-main);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.store-list-container::-webkit-scrollbar {
  width: 6px;
}

.store-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.store-list-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Store Card */
.store-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.store-card:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.store-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2), var(--shadow-lg);
  background: #fffdfd;
}

/* Card Header */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-title-group {
  flex: 1;
}

.store-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 4px;
}

.store-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.type-flagship {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.type-dealer {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.type-corporate {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.distance-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Details */
.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.detail-item i {
  color: var(--primary);
  width: 14px;
  margin-top: 3px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.detail-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.detail-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 0.75rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}

/* Card Actions */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-call {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.btn-call:hover {
  background: #15803d;
  color: white;
}

/* Empty State */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
  max-width: 260px;
}

/* ==========================================================================
   Map Viewport & Map Controls
   ========================================================================== */
.map-viewport {
  flex: 1;
  height: 100vh;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

/* Floating Controls Overlay on Map */
.map-floating-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-control-btn {
  background: white;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.map-control-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-toggle-btn {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.mobile-toggle-btn:hover {
  background: var(--primary-hover);
}

/* Custom Leaflet Markers */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-pin:hover {
  transform: scale(1.15) translateY(-4px);
  z-index: 9999 !important;
}

.pin-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #ffffff;
}

.pin-icon-wrap i {
  transform: rotate(45deg);
  font-size: 15px;
  color: white;
}

.pin-flagship .pin-icon-wrap {
  background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
  border-color: #fde047;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.5);
}

.pin-dealer .pin-icon-wrap {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  border-color: #ffffff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}

.pin-corporate .pin-icon-wrap {
  background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
  border-color: #ffffff;
}

/* User Location Marker */
.user-location-pin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
  position: relative;
}

.user-location-pulse {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  animation: radar-pulse 2s infinite ease-out;
}

@keyframes radar-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==========================================================================
   Leaflet Custom Popup
   ========================================================================== */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  background: #ffffff;
}

.leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
  width: 290px !important;
}

.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  color: #ffffff !important;
  font-size: 16px !important;
  width: 24px !important;
  height: 24px !important;
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  z-index: 1000 !important;
  padding: 0 !important;
}

.leaflet-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.5) !important;
  color: #ffffff !important;
  transform: scale(1.1);
}

.popup-card {
  display: flex;
  flex-direction: column;
}

.popup-header-banner {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #ffffff;
  padding: 12px 14px 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popup-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.popup-badge.type-flagship {
  background: #fef3c7;
  color: #92400e;
}

.popup-badge.type-dealer {
  background: #dbeafe;
  color: #1e40af;
}

.popup-badge.type-corporate {
  background: #f3e8ff;
  color: #6b21a8;
}

.popup-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
  padding-right: 20px;
}

.popup-body {
  padding: 10px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px !important;
  background: #ffffff;
}

.leaflet-popup-content p,
.leaflet-container p,
.popup-body p,
.popup-body div {
  margin: 0 !important;
  padding: 0 !important;
}

.popup-item,
.popup-address,
.popup-contact {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0 !important;
  padding: 0 !important;
}

.popup-item i,
.popup-address i,
.popup-contact i {
  color: var(--primary);
  font-size: 0.85rem;
  margin-top: 2px;
  width: 14px;
  flex-shrink: 0;
  text-align: center;
}

.popup-item a,
.popup-contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.popup-item a:hover,
.popup-contact a:hover {
  text-decoration: underline;
}

.popup-footer {
  padding: 8px 14px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: var(--transition);
  cursor: pointer;
}

.popup-btn.btn-primary,
.leaflet-popup-content a.btn-primary {
  background: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.25);
}

.popup-btn.btn-primary:hover,
.leaflet-popup-content a.btn-primary:hover {
  background: #065f46 !important;
  color: #ffffff !important;
}

.popup-btn.btn-primary i,
.leaflet-popup-content a.btn-primary i {
  color: #ffffff !important;
}

.popup-btn.btn-call,
.leaflet-popup-content a.btn-call {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1.5px solid #a7f3d0 !important;
}

.popup-btn.btn-call:hover,
.leaflet-popup-content a.btn-call:hover {
  background: #047857 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
}

.popup-btn.btn-call i,
.leaflet-popup-content a.btn-call i {
  color: #047857 !important;
}

.popup-btn.btn-call:hover i,
.leaflet-popup-content a.btn-call:hover i {
  color: #ffffff !important;
}

/* Sidebar Collapse Toggle */
.sidebar-collapse-btn {
  position: absolute;
  top: 18px;
  left: var(--sidebar-width);
  z-index: 1001;
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-left: none;
  width: 32px;
  height: 48px;
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 4px 2px 10px rgba(0, 0, 0, 0.08);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, color 0.2s;
  font-size: 0.95rem;
}

.sidebar-collapse-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.sidebar {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
  margin-left: calc(-1 * var(--sidebar-width));
}

.app-container.sidebar-hidden .sidebar-collapse-btn {
  left: 0;
  border-left: 1.5px solid var(--border);
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.2);
  width: 38px;
  height: 52px;
}

.app-container.sidebar-hidden .sidebar-collapse-btn:hover {
  background: var(--primary-hover);
}

@media (max-width: 768px) {
  .sidebar-collapse-btn {
    display: none;
  }
}

/* Sidebar Footer Credits */
.sidebar-footer {
  padding: 9px 1.25rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.sidebar-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
}

.sidebar-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 380px;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column-reverse;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65vh;
    border-radius: 20px 20px 0 0;
    border-right: none;
    border-top: 1px solid var(--border);
    transform: translateY(calc(100% - 70px));
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.expanded {
    transform: translateY(0);
  }

  .sidebar-header {
    cursor: pointer;
    border-radius: 20px 20px 0 0;
    padding: 1rem 1.25rem;
  }

  .sidebar-header::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    margin: 0 auto 10px;
  }

  .map-viewport {
    height: 100vh;
  }

  .mobile-toggle-btn {
    display: flex;
  }
}
