/* ========================================= */
/* SHANAYA — NEARBY MAP MODAL                */
/* ========================================= */

.map-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 7, 4, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 76px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.map-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.map-modal {
  width: min(1300px, 96vw);
  height: min(820px, 88vh);
  background: white;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  transform: scale(0.96) translateY(16px);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.map-modal-overlay.is-open .map-modal {
  transform: scale(1) translateY(0);
}

/* ─── HEADER ─── */
.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
  background: white;
  z-index: 10;
}

.map-modal-header-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.map-modal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 500;
  color: #1d1d1d;
}

.map-modal-subtitle {
  font-size: 12px;
  color: #aaa;
  letter-spacing: 0.5px;
}

.map-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.map-modal-close:hover {
  background: #f3f0ea;
  color: #1d1d1d;
}

/* ─── BODY ─── */
.map-modal-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ─── SIDEBAR ─── */
.map-modal-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(0, 0, 0, 0.07);
  overflow: hidden;
  background: #faf9f7;
}

.map-sidebar-search {
  padding: 14px 16px 0;
  flex-shrink: 0;
}

.map-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.map-search-input-wrap i {
  position: absolute;
  left: 14px;
  color: #bbb;
  font-size: 16px;
  pointer-events: none;
}

.map-search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  font-family: "Inter", sans-serif;
}

.map-search-input::placeholder { color: #bbb; }

.map-search-input:focus {
  border-color: #c4ab74;
}

/* category tabs */
.map-cat-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 12px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.map-cat-tabs::-webkit-scrollbar { display: none; }

.map-cat-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: white;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
}

.map-cat-tab:hover {
  border-color: #c4ab74;
  color: #1d1d1d;
  background: #faf9f7;
}

.map-cat-tab.is-active {
  background: #1d1d1d;
  color: white;
  border-color: #1d1d1d;
}

.map-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* place list */
.map-place-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.map-place-list::-webkit-scrollbar { width: 4px; }
.map-place-list::-webkit-scrollbar-track { background: transparent; }
.map-place-list::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }

.map-place-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.map-place-item:last-child { border-bottom: none; }

.map-place-item:hover {
  background: white;
}

.map-place-item.is-highlighted {
  background: white;
  box-shadow: inset 3px 0 0 #c4ab74;
}

.map-place-item[data-hidden="true"] {
  display: none;
}

.map-place-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.map-place-info {
  flex: 1;
  min-width: 0;
}

.map-place-name {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.map-place-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-place-cat-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
}

.map-place-dist {
  font-size: 11px;
  color: #999;
}

/* hotel "you are here" item */
.map-place-item.is-hotel .map-place-name {
  color: #c4ab74;
  font-weight: 600;
}

/* ─── MAP PANEL ─── */
.map-modal-map-panel {
  position: relative;
  overflow: hidden;
  background: #e8e0d5;
}

#shanayaLeafletMap {
  width: 100%;
  height: 100%;
}

/* Leaflet popup custom style */
.map-popup-content {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.map-popup-name {
  font-weight: 600;
  font-size: 13px;
  color: #1d1d1d;
  margin-bottom: 2px;
}

.map-popup-dist {
  color: #888;
}

/* custom Leaflet marker */
.map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 2px solid white;
}

.map-marker-inner {
  transform: rotate(45deg);
  font-size: 14px;
  line-height: 1;
}

/* hotel marker special */
.map-marker-hotel {
  background: linear-gradient(135deg, #c4ab74, #d4af37);
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 16px rgba(196,171,116,0.5);
}

/* ─── MOBILE MAP TOGGLE ─── */
.map-mobile-toggle {
  display: none;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1d;
  color: white;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  gap: 8px;
  align-items: center;
  font-family: "Inter", sans-serif;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .map-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
  }

  .map-modal-sidebar {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    border-right: none;
  }

  .map-modal-sidebar.show-list {
    display: flex;
  }

  .map-modal-map-panel {
    grid-row: 1;
  }

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

  .map-modal {
    height: 92vh;
    width: 100vw;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
  }

  .map-modal-overlay {
    align-items: flex-end;
  }
}

@media (max-width: 540px) {
  .map-modal-header {
    padding: 14px 16px 12px;
  }

  .map-modal-title {
    font-size: 20px;
  }

  .map-modal-subtitle {
    display: none;
  }
}
