/* ===================================
   MODERN MAP & FLOATING CARD DESIGN
   ================================== */

/* Main container for the map section */
/* This overrides the default card styling to become a viewport-like container */
#current-objective.map-panel {
  position: relative;
  width: 100%;
  height: 78vh; /* Slightly taller map view */
  min-height: 540px;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #e5e7eb; /* Placeholder grey */
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

/* The Map itself - full background */
#map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  /* Keep as auto so leaflet controls can layer above sibling overlays when needed. */
  z-index: auto;
}

.map-filter-inline-host {
  width: 100%;
  margin-bottom: 8px;
}

.map-filter-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-filter-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #d7e2ee;
  background: #f8fbff;
}

.map-filter-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475569;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 8px;
  white-space: normal;
  min-height: 32px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.map-filter-btn:hover {
  background: rgba(37, 99, 235, 0.12);
}

.map-filter-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.map-filter-btn:active {
  transform: translateY(1px);
}

.map-filter-counter {
  display: none !important;
}

.map-poi-dropdown-control.leaflet-control {
  margin-top: 14px;
  margin-right: 12px;
  position: relative;
  z-index: 2600 !important;
}

.map-poi-dropdown-control.is-offset {
  margin-top: 128px;
}

.map-poi-dropdown-control.is-disabled {
  opacity: 0.55;
}

.map-poi-picker {
  position: relative;
}

.map-poi-picker__toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(6px);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}

.map-poi-picker__toggle:disabled {
  cursor: not-allowed;
}

.map-poi-picker__icon {
  font-size: 19px;
  line-height: 1;
}

.map-poi-picker__count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #ffffff;
  background: #2563eb;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.map-poi-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 26px));
  max-height: var(--map-poi-picker-max-height, min(58vh, 420px));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(10px);
  padding: 8px;
  display: none;
  z-index: 2605;
}

.map-poi-dropdown-control.is-open .map-poi-picker__menu {
  display: block;
}

.map-poi-picker__divider {
  height: 1px;
  margin: 6px 4px;
  background: #e2e8f0;
}

.map-poi-picker__option {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1e293b;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.map-poi-picker__option:hover {
  background: #eff6ff;
}

.map-poi-picker__option.is-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.map-poi-picker__option-icon {
  font-size: 14px;
  line-height: 1;
}

.map-poi-picker__option-label {
  min-width: 0;
}

.map-poi-picker__option-count {
  font-size: 11px;
  color: #64748b;
}

.map-poi-picker__option-check {
  width: 14px;
  text-align: right;
  font-size: 12px;
  color: #1d4ed8;
}

/* Remove old skip links visual clutter (keep accessible) */
.map-accessibility-actions {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  pointer-events: none;
}
.map-skip-link {
  pointer-events: auto;
}

/* User location consent prompt */
.map-location-prompt {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1200;
  width: min(360px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

.map-location-prompt__title {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.map-location-prompt__description {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
}

.map-location-prompt__action {
  width: 100%;
  min-height: 36px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

/* Lightweight POI marker used by app-core (no external image dependencies) */
.ce-poi-marker {
  background: transparent !important;
  border: 0 !important;
}

.ce-poi-marker__dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

.ce-poi-marker--emoji .ce-poi-marker__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.28);
}

.ce-poi-marker__dot,
.ce-poi-marker--emoji .ce-poi-marker__emoji,
.recommendation-marker__emoji {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.leaflet-marker-icon.map-marker-active {
  position: relative;
}

.leaflet-marker-icon.map-marker-active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid rgba(96, 165, 250, 0.95);
  background: rgba(191, 219, 254, 0.24);
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.4);
  transform: translate(-50%, -50%) scale(0.72);
  transform-origin: center;
  pointer-events: none;
  animation: ceMapMarkerPulseBlue 1.85s ease-out infinite;
}

.leaflet-marker-icon.map-marker-active.map-marker-active--recommendation::after {
  width: 44px;
  height: 44px;
}

.leaflet-marker-icon.map-marker-active .ce-poi-marker__dot {
  background: #60a5fa;
  border-color: #dbeafe;
  box-shadow:
    0 0 0 2px rgba(191, 219, 254, 0.88),
    0 8px 18px rgba(37, 99, 235, 0.34);
  transform: scale(1.08);
}

.leaflet-marker-icon.map-marker-active .ce-poi-marker__emoji,
.leaflet-marker-icon.map-marker-active .recommendation-marker__emoji {
  border-color: rgba(59, 130, 246, 0.82);
  box-shadow:
    0 0 0 2px rgba(191, 219, 254, 0.88),
    0 10px 22px rgba(30, 64, 175, 0.3);
  transform: scale(1.08);
}

@keyframes ceMapMarkerPulseBlue {
  0% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.74);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.48);
  }
  70% {
    opacity: 0.22;
    transform: translate(-50%, -50%) scale(1.42);
    box-shadow: 0 0 0 12px rgba(96, 165, 250, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.46);
    box-shadow: 0 0 0 14px rgba(96, 165, 250, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon.map-marker-active::after {
    animation: none;
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

@media (max-width: 768px) {
  .map-location-prompt {
    top: 12px;
    right: 12px;
    width: min(380px, calc(100% - 24px));
    padding: 10px 12px;
  }
}

/* ===================================
   FLOATING BOTTOM CARD
   ================================== */

.current-place-section {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  margin: 0 auto;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  padding: 16px 18px 14px;
  z-index: 1800;
  /* Animation for sliding up */
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

/* Navigation Header (Arrows + Counter) */
.current-place-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

/* Navigation Buttons (Arrows) */
.current-place-navigation button {
  background: #ffffff;
  border: 1px solid #dbe3f0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.current-place-navigation button:hover {
  background: #f9fafb;
  transform: scale(1.05);
  border-color: #d1d5db;
}

.current-place-navigation button:active {
  transform: scale(0.95);
}

.current-place-navigation button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* "X / Y" Counter Style styling */
.current-place-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.current-place-filter-hint {
  margin: 0 0 10px;
  min-height: 16px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* ===================================
   CONTENT TYPOGRAPHY
   ================================== */

.current-place-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#currentPlaceName {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: #166534;
  line-height: 1.2;
  font-family: 'Jost', sans-serif;
}

.spinner-small {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

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

/* Badges Row */
.place-badges {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.place-badges-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  flex: 1;
}

#currentPlaceSaveBtn.ce-save-star {
  width: 34px;
  height: 34px;
  font-size: 18px;
  box-shadow: none;
  flex: 0 0 auto;
  margin-left: 8px;
}

.badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-type {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.badge-xp {
  background: #0ea5e9; /* Bright blue */
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
  border: none;
}

.badge-trophy {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
  display: flex;
  align-items: center;
  gap: 4px;
}

#currentPlaceDescription {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #4f5f74;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit description to 3 lines initially */
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================================
   ACTION BUTTONS
   ================================== */

.current-place-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 8px;
  margin-top: 8px;
}

.current-place-actions.is-recommendation {
  grid-template-columns: 1fr 1fr;
}

.current-place-actions button {
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  padding: 0 12px;
}

/* Primary Action (Check-in) */
.current-place-actions button.btn.primary {
  background: #0284c7; /* Vivid Blue */
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.current-place-actions button.btn.primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

/* Secondary Actions (Outline) */
.current-place-actions button.btn.secondary {
  min-width: 40px;
  padding-inline: 10px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid #dbe3f0;
  color: #334155;
}

.current-place-actions .btn.is-hidden {
  display: none !important;
}

.current-place-actions button.btn.secondary:hover {
  background: #eef2ff;
  border-color: #cbd5e1;
}

.current-place-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.current-place-checkin-status {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.current-place-section.is-filter-empty #currentPlaceName,
.current-place-section.is-filter-empty #currentPlaceDescription,
.current-place-section.is-filter-empty .badge-xp,
.current-place-section.is-filter-empty .badge-trophy,
.current-place-section.is-filter-empty .badge-type {
  opacity: 0.62;
}

.current-place-section.is-filter-empty .current-place-actions button {
  opacity: 0.6;
}

/* Icon styling inside buttons - Add fontawesome or similar if needed, or simple SVG */
.btn-icon-svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS (BOTTOM SHEET REDESIGN)
   ================================== */

@media (max-width: 768px) {
  /* Map takes full viewport height relative to its container */
  #current-objective.map-panel {
    height: calc(100svh - 42px);
    min-height: 540px;
    max-height: none;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
  }

  /* Leaflet Controls Position Adjustment */
  /* Move zoom controls to top-right to avoid covering bottom sheet */
  .leaflet-top.leaflet-left {
    top: 10px;
    left: auto;
    right: 10px;
  }
  
  .leaflet-control-zoom {
    margin-top: 60px !important; /* Push down below any top overlays */
  }

  .map-filter-inline-host {
    margin-bottom: 4px;
  }

  .map-filter-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .map-filter-btn {
    font-size: 10px;
    padding: 6px 6px;
    min-height: 30px;
  }

  .map-filter-counter {
    font-size: 9px;
    padding: 4px 6px;
  }

  .map-poi-dropdown-control.leaflet-control {
    margin-top: 10px;
    margin-right: 10px;
    z-index: 2600 !important;
  }

  .map-poi-dropdown-control.is-offset {
    margin-top: 122px;
  }

  .map-poi-picker__toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .map-poi-picker__icon {
    font-size: 17px;
  }

  .map-poi-picker__menu {
    width: min(300px, calc(100vw - 22px));
    max-height: var(--map-poi-picker-max-height, min(48vh, 320px));
    padding: 7px;
  }

  .map-poi-picker__option {
    font-size: 11px;
    gap: 7px;
    padding: 7px 8px;
  }

  /* Bottom Sheet Container */
  .current-place-section {
    position: absolute; /* Absolute within map panel */
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    
    background: #ffffff;
    border-radius: 20px 20px 0 0; /* Rounded top corners only */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 14px 14px;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 1800;
    
    /* Ensure it sits above map */
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* Navigation Row (Arrows & Counter) - Integrated into Sheet Header */
  .current-place-navigation {
    margin-bottom: 4px;
    justify-content: center; /* Center the counter */
    gap: 12px;
    position: relative;
  }
  
  .current-place-navigation button {
    width: 32px;
    height: 32px;
    background: #f3f4f6; /* Subtle grey background */
    border: none;
    font-size: 1.1rem;
  }
  
  .current-place-heading {
    font-size: 0.8rem;
    color: #6b7280;
  }

  .current-place-filter-hint {
    font-size: 10px;
    margin-bottom: 4px;
  }

  /* Content Typography */
  #currentPlaceName {
    font-size: 1.05rem;
    margin-bottom: 2px;
  }

  /* Description - Truncate to 2 lines to save space */
  #currentPlaceDescription {
    font-size: 0.82rem;
    margin-bottom: 10px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #6b7280;
  }
  
  /* Badges Row */
  .place-badges {
    margin-bottom: 8px;
  }

  /* Actions Layout - Compact Row */
  .current-place-actions {
    display: grid;
    grid-template-columns: 1fr auto auto; /* Main button + 2 icon buttons */
    gap: 8px;
    grid-template-areas: "check comments nav";
    margin-top: 0;
  }

  .current-place-actions.is-recommendation {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "comments nav";
  }
  
  /* Check-in Button (Primary) */
  .current-place-actions button:nth-child(1) { 
    grid-area: check;
    height: 42px; /* Taller touch target */
    font-size: 0.92rem;
  }
  
  /* Secondary Buttons (Icon only or compact) */
  .current-place-actions button.btn.secondary {
    padding: 0;
    width: 42px; /* Square buttons */
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
  }
  
  .current-place-actions button.btn.secondary span:not(.btn-icon) {
    display: none; /* Hide text label on mobile */
  }
  
  .current-place-actions button.btn.secondary .btn-icon {
    font-size: 1.2rem;
    margin: 0;
  }

  .current-place-actions.is-recommendation button.btn.secondary {
    width: auto;
    padding: 0 12px;
  }

  .current-place-actions.is-recommendation button.btn.secondary span:not(.btn-icon) {
    display: inline;
    font-size: 0.8rem;
    margin-left: 4px;
  }

  .current-place-actions.is-recommendation button.btn.secondary .btn-icon {
    font-size: 1rem;
    margin: 0;
  }

  /* Hide XP badge if it clutters, or keep small */
  .badge-xp {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
}

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

/* ===================================
   USER LOCATION MARKER (Blue Dot)
   ================================== */
.user-location-marker {
  background: transparent !important;
  border: none !important;
  pointer-events: none !important;
}

.user-dot {
  position: relative;
  width: 24px;
  height: 24px;
  pointer-events: none !important;
}

.user-dot-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
  z-index: 2;
}

.user-dot-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  animation: userPulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes userPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

/* ===================================
   MOBILE LEAFLET POPUP OPTIMIZATION
   ================================== */
@media (max-width: 768px) {
  .leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }

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

  /* All Popup Images - very compact */
  .leaflet-popup-content img {
    height: 80px !important;
    max-height: 80px !important;
    width: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 0 !important;
  }

  /* Popup Content Text */
  .leaflet-popup-content h3 {
    font-size: 0.95rem !important;
    margin: 8px 10px 4px !important;
    line-height: 1.2;
  }

  .leaflet-popup-content p {
    font-size: 0.8rem !important;
    margin: 0 10px 8px !important;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Compact Buttons in Popups */
  .leaflet-popup-content button,
  .leaflet-popup-content a[style*="background"] {
    margin: 0 10px 10px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    height: auto !important;
    width: calc(100% - 20px) !important;
  }

  /* Close Button */
  .leaflet-container a.leaflet-popup-close-button {
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    padding: 0;
  }

  /* ===================================
     RECOMMENDATION POPUP SPECIFIC
     ================================== */
  .recommendation-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
  }
  
  .recommendation-popup .leaflet-popup-content {
    width: 220px !important;
    max-width: 220px !important;
  }
  
  /* Rec popup image */
  .rec-map-popup img {
    height: 70px !important;
    max-height: 70px !important;
    margin-bottom: 6px !important;
    border-radius: 8px !important;
  }
  
  /* Rec popup category row */
  .rec-map-popup > div:first-of-type {
    font-size: 10px !important;
    margin-bottom: 4px !important;
  }
  
  /* Rec popup title */
  .rec-map-popup h3 {
    font-size: 0.9rem !important;
    margin: 0 0 4px 0 !important;
  }
  
  /* Rec popup location */
  .rec-map-popup > div:nth-of-type(2) {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }
  
  /* Rec popup button */
  .rec-map-popup button {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
  }
}
