/**
 * ══════════════════════════════════════════════════════════════════════════════
 * MAP PAGE — Interactive Map CSS
 * ══════════════════════════════════════════════════════════════════════════════
 * Pagină fullscreen cu hartă Leaflet pentru explorarea proprietăților
 *
 * Autor: Negoiță Andreea Iuliana | Coordonator: conf.univ.dr. Toader Florentina
 *
 * Notă: Acest fișier conține DOAR stiluri specifice paginii.
 * Componentele globale sunt în /assets/core/
 * ══════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS VARIABLES — MAP THEME
   ───────────────────────────────────────────────────────────────────────────── */

.page-map {
  /* Dark Theme (default) */
  --map-bg: #0f172a;
  --map-card-bg: rgba(10, 15, 28, 0.85);
  --map-text: #f8fafc;
  --map-text-muted: #94a3b8;
  --map-border: rgba(255, 255, 255, 0.08);
  --map-shadow: rgba(0, 0, 0, 0.35);
  --map-primary: #6366f1;
  --map-primary-light: rgba(99, 102, 241, 0.15);
  --map-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);

  /* Type Colors */
  --color-cabin: #22c55e;
  --color-villa: #8b5cf6;
  --color-apartment: #06b6d4;
  --color-guesthouse: #f59e0b;
  --color-studio: #ec4899;

  min-height: 100vh;
  min-height: 100dvh;
  background: var(--map-bg);
  overflow: hidden;
}

.page-map[data-mode="light"] {
  --map-bg: #f8fafc;
  --map-card-bg: rgba(10, 15, 28, 0.92);
  --map-text: #f8fafc;
  --map-text-muted: #cbd5e1;
  --map-border: rgba(255, 255, 255, 0.1);
  --map-shadow: rgba(0, 0, 0, 0.45);
}

/* ─────────────────────────────────────────────────────────────────────────────
  BASE LAYOUT
  ───────────────────────────────────────────────────────────────────────────── */

.map-page-container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  background: var(--map-primary);
  color: white;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FLOATING PANEL BASE
   ───────────────────────────────────────────────────────────────────────────── */

.floating-panel {
  background: var(--map-card-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--map-border);
  border-radius: 16px;
  box-shadow:
    0 8px 32px var(--map-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-panel:hover {
  box-shadow:
    0 12px 40px var(--map-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER BAR
   ───────────────────────────────────────────────────────────────────────────── */

.map-header-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}

.map-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--map-primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  color: var(--map-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.map-back-btn:hover {
  background: var(--map-gradient);
  color: white;
  border-color: transparent;
  transform: translateX(-3px);
}

.map-back-btn svg {
  width: 18px;
  height: 18px;
}

.map-title-section {
  text-align: center;
  flex: 1;
}

.map-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--map-text);
  margin: 0;
}

.map-title .title-icon {
  width: 28px;
  height: 28px;
  animation: titleFloat 3s ease-in-out infinite;
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.map-subtitle {
  font-size: 0.8rem;
  color: var(--map-text-muted);
  margin: 4px 0 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* PWA Install Button in map header */
.header-actions .btn-pwa-install {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

/* Mascota în map header - same size as other buttons */
.header-actions .navbar-mascot {
  display: flex;
  width: 44px;
  height: 44px;
}

.header-actions .mascot-gif {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid var(--map-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--map-text);
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background: var(--map-gradient);
  color: white;
  border-color: transparent;
}

.theme-toggle-btn .theme-icon {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FILTER CONTROLS BAR
   ───────────────────────────────────────────────────────────────────────────── */

.map-controls-bar {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 95%;
  padding: 12px 20px;
}

.map-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--map-border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--map-text);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.map-filter-btn:hover {
  background: var(--map-primary-light);
  border-color: var(--map-primary);
  transform: translateY(-2px);
}

.map-filter-btn.active {
  background: var(--map-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.map-filter-btn .filter-icon {
  width: 18px;
  height: 18px;
}

.map-filter-btn .filter-count {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.map-filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SIDEBARS
   ───────────────────────────────────────────────────────────────────────────── */

.map-sidebar-left {
  position: absolute;
  top: 170px;
  left: 16px;
  bottom: 90px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.map-sidebar-right {
  position: absolute;
  top: 170px;
  right: 80px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.sidebar-panel {
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--map-text);
}

.panel-title svg {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRICE RANGE SLIDER
   ───────────────────────────────────────────────────────────────────────────── */

.price-range-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.price-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.price-input-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-input-box label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--map-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.price-input-box input {
  width: 100%;
  padding: 10px 8px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid var(--map-border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--map-text);
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.price-input-box input:focus {
  outline: none;
  border-color: var(--map-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.price-separator {
  color: var(--map-text-muted);
  font-weight: 300;
  margin-top: 18px;
}

/* Dual Range Slider */
.dual-range-slider {
  position: relative;
  height: 6px;
  background: rgba(100, 116, 139, 0.3);
  border-radius: 6px;
  margin: 8px 0 16px 0;
}

.price-range-fill {
  position: absolute;
  height: 100%;
  background: var(--map-gradient);
  border-radius: 6px;
  top: 0;
  left: 0;
  width: 40%;
  transition: left 0.1s, width 0.1s;
}

.dual-range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  top: 0;
  left: 0;
  margin: 0;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--map-primary);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s;
  margin-top: -7px;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.dual-range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--map-primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   VIEW MODE SECTION
   ───────────────────────────────────────────────────────────────────────────── */

.view-mode-section {
  display: flex;
  gap: 10px;
}

.view-mode-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid var(--map-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--map-text);
  transition: all 0.3s ease;
}

.view-mode-btn svg {
  width: 18px;
  height: 18px;
}

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

.view-mode-btn.active {
  background: var(--map-gradient);
  color: white;
  border-color: transparent;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SEARCH PANEL
   ───────────────────────────────────────────────────────────────────────────── */

.map-search-panel {
  padding: 14px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid var(--map-border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: var(--map-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-input-wrapper svg {
  width: 20px;
  height: 20px;
  color: var(--map-text-muted);
  flex-shrink: 0;
}

.map-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--map-text);
  outline: none;
  min-width: 0;
}

.map-search-input::placeholder {
  color: var(--map-text-muted);
}

/* Search Suggestions */
.search-suggestions {
  margin: 10px 0 0;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  list-style: none;
  padding: 0;
}

.search-suggestions.active {
  display: block;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

.suggestion-item:hover {
  background: var(--map-primary-light);
}

.suggestion-item .suggestion-icon {
  width: 24px;
  height: 24px;
}

.suggestion-item .suggestion-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.suggestion-item .suggestion-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--map-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-item .suggestion-location {
  font-size: 0.7rem;
  color: var(--map-text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   WEATHER WIDGET
   ───────────────────────────────────────────────────────────────────────────── */

.weather-widget {
  padding: 16px;
}

.weather-content {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.weather-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-main-icon {
  width: 40px;
  height: 40px;
}

.weather-details {
  flex: 1;
}

.weather-temp {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--map-text);
  line-height: 1;
}

.weather-condition {
  font-size: 0.8rem;
  color: var(--map-text-muted);
  margin-top: 2px;
}

.weather-location {
  font-size: 0.7rem;
  color: var(--map-text-muted);
  margin-top: 2px;
}

.weather-extra {
  display: flex;
  gap: 16px;
}

.weather-extra-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--map-text-muted);
}

.weather-extra-item .weather-small-icon {
  width: 16px;
  height: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LEGEND PANEL
   ───────────────────────────────────────────────────────────────────────────── */

.map-legend-panel {
  padding: 16px;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
  text-align: left;
}

.legend-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.cabin { background: var(--color-cabin); }
.legend-dot.villa { background: var(--color-villa); }
.legend-dot.apartment { background: var(--color-apartment); }
.legend-dot.guesthouse { background: var(--color-guesthouse); }
.legend-dot.studio { background: var(--color-studio); }

.legend-name {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--map-text);
}

.legend-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--map-text-muted);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MAP CONTAINER
   ───────────────────────────────────────────────────────────────────────────── */

.map-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Leaflet overrides */
.leaflet-container {
  font-family: inherit;
  background: var(--map-bg);
}

.leaflet-control-attribution {
  background: var(--map-card-bg) !important;
  color: var(--map-text-muted) !important;
  font-size: 0.65rem;
  padding: 4px 8px !important;
  border-radius: 8px 0 0 0 !important;
  backdrop-filter: blur(10px);
}

.leaflet-control-attribution a {
  color: var(--map-primary) !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BOTTOM STATS BAR
   ───────────────────────────────────────────────────────────────────────────── */

.map-bottom-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-icon svg {
  width: 24px;
  height: 24px;
}

.stats-info {
  display: flex;
  flex-direction: column;
}

.stats-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--map-text);
  line-height: 1;
}

.stats-label {
  font-size: 0.65rem;
  color: var(--map-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.stats-divider {
  width: 1px;
  height: 32px;
  background: var(--map-border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   QUICK ACTIONS
   ───────────────────────────────────────────────────────────────────────────── */

.map-quick-actions {
  position: absolute;
  bottom: 90px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--map-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--map-border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--map-text);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px var(--map-shadow);
}

.quick-action-btn svg {
  width: 20px;
  height: 20px;
}

.quick-action-btn:hover {
  background: var(--map-gradient);
  color: white;
  border-color: transparent;
  transform: scale(1.08);
}

.quick-action-btn:active {
  transform: scale(0.95);
}

.quick-action-btn .btn-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 12px;
  background: var(--map-card-bg);
  border: 1px solid var(--map-border);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--map-text);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.quick-action-btn:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TOUR OVERLAY
   ───────────────────────────────────────────────────────────────────────────── */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.tour-overlay.active,
.tour-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.tour-card {
  background: var(--map-card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--map-border);
  border-radius: 20px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tour-card h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--map-text);
  margin: 0 0 8px;
}

.tour-card h3 svg {
  width: 20px;
  height: 20px;
}

.tour-card p {
  font-size: 0.85rem;
  color: var(--map-text-muted);
  margin: 0 0 16px;
}

.tour-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s, transform 0.3s;
}

.tour-dot.active {
  background: var(--map-primary);
  transform: scale(1.3);
}

.tour-actions {
  display: flex;
  gap: 12px;
}

.tour-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tour-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--map-border);
  color: var(--map-text);
}

.tour-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.tour-btn-primary {
  background: var(--map-gradient);
  border: none;
  color: white;
}

.tour-btn-primary:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   LOADING OVERLAY
   ───────────────────────────────────────────────────────────────────────────── */

.map-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--map-bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.map-loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--map-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-loading-overlay p {
  font-size: 0.9rem;
  color: var(--map-text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CUSTOM MARKERS
   ───────────────────────────────────────────────────────────────────────────── */

.custom-marker-wrapper {
  background: none !important;
  border: none !important;
}

.custom-marker {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: white;
  border: 3px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s;
  cursor: pointer;
}

.custom-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.custom-marker.marker-cabin { border-color: var(--color-cabin); }
.custom-marker.marker-villa { border-color: var(--color-villa); }
.custom-marker.marker-apartment { border-color: var(--color-apartment); }
.custom-marker.marker-guesthouse { border-color: var(--color-guesthouse); }
.custom-marker.marker-studio { border-color: var(--color-studio); }

.custom-marker .marker-icon {
  width: 22px;
  height: 22px;
}

/* Price Markers */
.price-marker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  background: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--map-primary);
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.price-marker:hover {
  transform: scale(1.1);
}

.price-marker .price-currency {
  font-size: 0.65rem;
  font-weight: 500;
  color: #6b7280;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MARKER CLUSTER STYLES
   ───────────────────────────────────────────────────────────────────────────── */

.marker-cluster {
  background: var(--map-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.marker-cluster-small {
  width: 40px;
  height: 40px;
}

.marker-cluster-medium {
  width: 50px;
  height: 50px;
  font-size: 1rem;
}

.marker-cluster-large {
  width: 60px;
  height: 60px;
  font-size: 1.1rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   POPUP STYLES
   ───────────────────────────────────────────────────────────────────────────── */

.leaflet-popup-content-wrapper {
  background: var(--map-card-bg) !important;
  backdrop-filter: blur(20px);
  border: 1px solid var(--map-border);
  border-radius: 16px !important;
  padding: 0 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 300px !important;
}

.leaflet-popup-tip {
  background: var(--map-card-bg) !important;
  border: 1px solid var(--map-border);
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: var(--map-text-muted) !important;
  font-size: 20px !important;
  width: 32px !important;
  height: 32px !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 10;
}

.leaflet-popup-close-button:hover {
  color: var(--map-text) !important;
}

.map-popup {
  overflow: hidden;
  border-radius: 16px;
}

.map-popup-image-container {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.map-popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: var(--map-gradient);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
}

.popup-rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
}

.popup-rating-badge svg {
  width: 12px;
  height: 12px;
  fill: #fbbf24;
}

.map-popup-content {
  padding: 14px;
}

.popup-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.map-popup-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--map-primary);
}

.popup-guests {
  font-size: 0.7rem;
  color: var(--map-text-muted);
}

.map-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--map-text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.map-popup-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--map-text-muted);
  margin: 0 0 10px;
}

.map-popup-location svg {
  width: 14px;
  height: 14px;
}

.map-popup-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.popup-amenity {
  font-size: 0.65rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--map-text-muted);
}

.map-popup-meta {
  margin-bottom: 12px;
}

.map-popup-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--map-text);
}

.map-popup-price span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--map-text-muted);
}

.map-popup-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--map-gradient);
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  transition: box-shadow 0.3s, transform 0.3s;
}

.map-popup-cta:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.map-popup-cta svg {
  width: 16px;
  height: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FULLSCREEN MODE
   ───────────────────────────────────────────────────────────────────────────── */

.fullscreen-mode .map-header-bar,
.fullscreen-mode .map-controls-bar,
.fullscreen-mode .map-sidebar-left,
.fullscreen-mode .map-sidebar-right,
.fullscreen-mode .map-bottom-bar {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.fullscreen-mode:hover .map-header-bar,
.fullscreen-mode:hover .map-controls-bar,
.fullscreen-mode:hover .map-sidebar-left,
.fullscreen-mode:hover .map-sidebar-right,
.fullscreen-mode:hover .map-bottom-bar {
  opacity: 1;
  visibility: visible;
}

.fullscreen-mode .map-quick-actions {
  bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .map-sidebar-left {
    width: 260px;
  }

  .map-sidebar-right {
    width: 240px;
    right: 16px;
  }

  .map-controls-bar {
    top: 90px;
  }

  .map-filter-btn span:not(.filter-count) {
    display: none;
  }

  .weather-widget {
    display: none;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .map-header-bar {
    top: 12px;
    left: 12px;
    right: 12px;
    padding: 10px 14px;
  }

  .map-title-section {
    display: none;
  }

  .map-controls-bar {
    top: 80px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 8px 12px;
    gap: 10px;
    overflow-x: visible;
    flex-wrap: nowrap;
    justify-content: center;
    width: auto;
    max-width: calc(100% - 24px);
  }

  .map-filter-btn {
    padding: 12px 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
  }

  .map-filter-btn .filter-icon {
    width: 22px;
    height: 22px;
  }

  .map-filter-btn span:not(.filter-count) {
    display: none;
  }

  .map-filter-btn .filter-count {
    display: none;
  }

  /* Hide sidebars on mobile - show only map */
  .map-sidebar-left,
  .map-sidebar-right {
    display: none;
  }

  .map-bottom-bar {
    bottom: 12px;
    left: 12px;
    right: 70px;
    transform: none;
    justify-content: center;
    padding: 10px 16px;
    gap: 12px;
  }

  .stats-item {
    gap: 6px;
  }

  .stats-icon {
    width: 28px;
    height: 28px;
  }

  .stats-icon svg {
    width: 18px;
    height: 18px;
  }

  .stats-value {
    font-size: 0.85rem;
  }

  .stats-label {
    font-size: 0.55rem;
  }

  .stats-divider {
    height: 24px;
  }

  .map-quick-actions {
    bottom: 12px;
    right: 12px;
  }

  .quick-action-btn {
    width: 44px;
    height: 44px;
  }

  .quick-action-btn svg {
    width: 20px;
    height: 20px;
  }

  .quick-action-btn .btn-tooltip {
    display: none;
  }

  .tour-overlay {
    padding: 16px;
  }

  .tour-card {
    padding: 20px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .map-back-btn span {
    display: none;
  }

  .map-back-btn {
    padding: 10px;
  }

  .theme-toggle-btn .theme-text {
    display: none;
  }

  .theme-toggle-btn {
    padding: 10px;
  }

  .map-filter-btn span:not(.filter-count) {
    display: none;
  }

  .stats-divider:nth-of-type(2) {
    display: none;
  }

  .stats-item:last-child {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION
   ───────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .map-title .title-icon,
  .loading-spinner {
    animation: none;
  }

  .tour-card {
    animation: none;
  }

  .floating-panel,
  .map-filter-btn,
  .quick-action-btn,
  .view-mode-btn,
  .legend-item,
  .suggestion-item {
    transition: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────────────────────── */

@media print {
  .map-header-bar,
  .map-controls-bar,
  .map-sidebar-left,
  .map-sidebar-right,
  .map-bottom-bar,
  .map-quick-actions,
  .tour-overlay,
  .map-loading-overlay {
    display: none !important;
  }

  .map-container {
    position: static;
    height: 100vh;
  }
}

