.gls-results-toolbar__field--map {
  min-width: 160px;
}

.gls-results-toolbar__map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  white-space: nowrap;
  min-height: 32px;
  padding: 0 14px;
  border: 0px solid #c99b1f;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7dc74 0%, #e2b638 100%);
  color: #352500!important;
  box-shadow: 0 0px 0px rgba(201, 155, 31, 0.18);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.gls-results-toolbar__map-button:hover,
.gls-results-toolbar__map-button:focus-visible {
  border-color: #af8211;
  background: linear-gradient(180deg, #f9e287 0%, #d9aa26 100%);
  color: #352500;
  transform: translateY(-1px);
  box-shadow: 0 0px 0px rgba(175, 130, 17, 0.22);
}

.gls-results-toolbar__map-button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px rgba(247, 220, 116, 0.38),
    0 10px 20px rgba(175, 130, 17, 0.22);
}

.gls-results-toolbar__map-button[disabled] {
  cursor: not-allowed;
  opacity: 1;
  border-color: #dfcea0;
  background: linear-gradient(180deg, #f4ecd4 0%, #eadfb8 100%);
  color: #8d7a4a;
  box-shadow: none;
  transform: none;
}

body.gls-map-modal-open {
  overflow: hidden;
}

.gls-map-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gls-map-modal[hidden],
.gls-map-modal__loading[hidden],
.gls-map-modal__empty[hidden],
.gls-map-modal__canvas[hidden] {
  display: none !important;
}

.gls-map-modal__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 15, 28, 0.72), rgba(8, 15, 28, 0.5)),
    rgba(8, 15, 28, 0.48);
  backdrop-filter: blur(4px);
}

.gls-map-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(217, 239, 255, 0.9), rgba(255, 255, 255, 0) 28%),
    #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.gls-map-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid #e6ebf2;
}

.gls-map-modal__header-copy {
  min-width: 0;
}

.gls-map-modal__title {
  margin: 0;
  color: #101828;
  font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.7rem);
  line-height: 1.1;
}

.gls-map-modal__subtitle {
  margin: 6px 0 0;
  color: #667085;
  font-size: 0.95rem;
}

.gls-map-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d6deea;
  border-radius: 999px;
  background: #fff;
  color: #18202a;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.gls-map-modal__close:hover,
.gls-map-modal__close:focus {
  border-color: #1f5eff;
  outline: 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.14);
}

.gls-map-modal__body {
  position: relative;
  background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 100%);
}

.gls-map-modal__canvas {
  width: 100%;
  height: 70vh;
  min-height: 520px;
}

.gls-map-modal__loading,
.gls-map-modal__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 70vh;
  padding: 24px;
  color: #475467;
  font-size: 1rem;
  text-align: center;
}

.gls-map-modal__empty {
  font-weight: 600;
}

.gls-map-modal__loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d7dde6;
  border-top-color: #1f5eff;
  border-radius: 50%;
  animation: gls-spin 0.8s linear infinite;
}

.gls-map-info {
  display: grid;
  gap: 10px;
  min-width: 220px;
  max-width: 280px;
  color: #18202a;
}

.gls-map-info__media {
  overflow: hidden;
  border-radius: 12px;
}

.gls-map-info__media img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.gls-map-info__body {
  display: grid;
  gap: 6px;
}

.gls-map-info__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.gls-map-info__location {
  color: #667085;
  font-size: 0.92rem;
}

.gls-map-info__price {
  color: #101828;
  font-size: 0.95rem;
  font-weight: 700;
}

.gls-map-info__link {
  color: #1f5eff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.gls-map-info__link:hover,
.gls-map-info__link:focus {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .gls-map-modal {
    padding: 12px;
  }

  .gls-map-modal__dialog {
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .gls-map-modal__canvas,
  .gls-map-modal__loading,
  .gls-map-modal__empty {
    min-height: 65vh;
    height: 65vh;
  }
}

@media (max-width: 640px) {
  .gls-results-toolbar__field--map {
    min-width: 0;
    flex: 1 1 180px;
  }

  .gls-map-modal {
    padding: 0;
    align-items: stretch;
  }

  .gls-map-modal__dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .gls-map-modal__header {
    padding: 18px 16px 16px;
  }

  .gls-map-modal__canvas,
  .gls-map-modal__loading,
  .gls-map-modal__empty {
    min-height: 65vh;
    height: 65vh;
  }

  .gls-map-info {
    min-width: 200px;
    max-width: 240px;
  }
}

.gls-map-modal__canvas .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: 0 0 24px 24px;
  font-family: inherit;
}

.gls-map-modal__canvas .leaflet-control-zoom {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.gls-map-modal__canvas .leaflet-control-zoom a {
  background: #ffffff;
  color: #1f5eff;
  border: 0;
}

.gls-map-modal__canvas .leaflet-control-zoom a:hover,
.gls-map-modal__canvas .leaflet-control-zoom a:focus {
  background: #eef4ff;
}

.gls-map-modal__canvas .leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  padding: 0;
}

.gls-map-modal__canvas .leaflet-popup-content {
  margin: 14px;
}

.gls-map-modal__canvas .leaflet-popup-tip {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.gls-map-modal__canvas .leaflet-popup-close-button {
  color: #667085;
}
