/* ZaynaGo salon map overlay — adapted from Rentyx search-map, cream/gold/ink tokens */
/* OSM tiles via Leaflet (self-hosted vendor under /assets/vendor/leaflet/) */

.salon-map-overlay {
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 520;
  display: flex;
  flex-direction: column;
  background: var(--paper, #fffdf9);
  overflow: hidden;
  border-top: 1px solid var(--line, #e8e1d6);
}

.salon-map-overlay[hidden] {
  display: none;
}

body.salon-map-open {
  overflow: hidden;
}

.salon-map-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line, #e8e1d6);
  background: #fff;
}

.salon-map-header__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.salon-map-header__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.salon-map-all-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--gold-light, #d7bb8a);
  border-radius: 999px;
  background: #fff;
  color: var(--gold, #b8945a);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(31, 25, 17, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.salon-map-all-btn:hover {
  border-color: var(--gold, #b8945a);
  background: linear-gradient(180deg, #fffdf9 0%, #f5ecd8 100%);
  color: #8a6838;
}

.salon-map-all-btn[hidden] {
  display: none;
}

.salon-map-back-cities {
  flex-shrink: 0;
  margin-top: 2px;
  padding: 6px 12px;
  border: 1px solid var(--line, #e8e1d6);
  border-radius: 999px;
  background: var(--cream, #f7f3ec);
  color: var(--ink, #171614);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.salon-map-back-cities:hover {
  border-color: var(--gold-light, #d7bb8a);
}

.salon-map-back-cities[hidden] {
  display: none;
}

.salon-map-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--cream, #f7f3ec);
  color: var(--muted, #77736b);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.salon-map-city-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line, #e8e1d6);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.salon-map-city-row:hover {
  border-color: var(--gold-light, #d7bb8a);
  box-shadow: 0 4px 16px rgba(31, 25, 17, 0.08);
}

.salon-map-city-row__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 50%;
  background: var(--gold, #b8945a);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.salon-map-city-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.salon-map-city-row__body strong {
  font-size: 0.9375rem;
}

.salon-map-city-row__body .muted {
  font-size: 0.75rem;
  color: var(--muted, #77736b);
}

.salon-map-city-row__go {
  color: var(--gold, #b8945a);
  font-weight: 700;
}

.salon-map-header__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink, #171614);
}

.salon-map-header__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted, #77736b);
}

.salon-map-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line, #e8e1d6);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #171614);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.salon-map-close:hover {
  background: var(--cream, #f7f3ec);
  border-color: var(--gold-light, #d7bb8a);
}

.salon-map-cities {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line, #e8e1d6);
  background: var(--cream, #f7f3ec);
}

.salon-map-city {
  padding: 6px 12px;
  border: 1px solid var(--line, #e8e1d6);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #171614);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.salon-map-city:hover {
  border-color: var(--gold-light, #d7bb8a);
}

.salon-map-city.is-active {
  background: var(--ink, #171614);
  border-color: var(--ink, #171614);
  color: #fff;
}

.salon-map-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  min-height: 0;
}

.salon-map-list {
  border-right: 1px solid var(--line, #e8e1d6);
  overflow-y: auto;
  background: #fff;
}

.salon-map-list__items {
  padding: 10px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.salon-map-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  font: inherit;
  color: inherit;
}

.salon-map-card:hover,
.salon-map-card.is-active {
  border-color: var(--gold-light, #d7bb8a);
  box-shadow: 0 4px 16px rgba(31, 25, 17, 0.08);
}

.salon-map-card__media {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--cream, #f7f3ec);
}

.salon-map-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.salon-map-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.salon-map-card__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.salon-map-card__meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted, #77736b);
}

.salon-map-card__price {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--ink, #171614);
}

.salon-map-card__price strong {
  color: var(--gold, #b8945a);
}

.salon-map-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted, #77736b);
  font-size: 0.875rem;
}

.salon-map-empty--panel {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 280px;
  padding: 24px;
}

.salon-map-panel {
  position: relative;
  min-height: 280px;
  background: #e8ece8;
}

#salon-map-canvas {
  width: 100%;
  height: 100%;
}

.salon-map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid var(--line, #e8e1d6);
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--ink, #171614);
}

.salon-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.salon-map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.salon-map-legend__dot--city {
  width: 14px;
  height: 14px;
  background: var(--gold, #b8945a);
}

.salon-map-legend__dot--salon {
  background: var(--ink, #171614);
}

.salon-map-city-pin {
  border-radius: 50%;
  background: var(--gold, #b8945a);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  cursor: pointer;
}

.salon-map-salon-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink, #171614);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  cursor: pointer;
}

.salon-map-salon-pin.is-active {
  background: var(--gold, #b8945a);
  box-shadow: 0 0 0 3px rgba(184, 148, 90, 0.35);
}

.salon-map-marker-popup {
  font-size: 0.8125rem;
  line-height: 1.4;
  font-family: "DM Sans", system-ui, sans-serif;
}

.salon-map-marker-popup strong {
  display: block;
  margin-bottom: 4px;
}

.salon-map-marker-popup a {
  color: var(--gold, #b8945a);
  font-weight: 600;
}

/* Toolbar map button on homepage */
.map-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--ink, #171614);
  background: var(--ink, #171614);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.map-open-btn:hover {
  background: #2a2825;
}

.map-open-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.filters {
  align-items: center;
}

@media (max-width: 900px) {
  .salon-map-overlay {
    top: 66px;
  }

  .salon-map-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 42vh 1fr;
  }

  .salon-map-list {
    border-right: none;
    border-bottom: 1px solid var(--line, #e8e1d6);
    max-height: 42vh;
  }

  .salon-map-panel {
    min-height: 48vh;
  }
}
