/* ========================================
   RIOTSPACE CUSTOM MAP
======================================== */
.rwe-custom-map {
  width: 100%;
  max-width: var(--rwe-map-max-width, 1400px);
  margin: 0 auto;
  position: relative;
  font-family: inherit;
}

.rwe-custom-map__canvas {
  width: 100%;
  height: var(--rwe-map-height, 520px);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid #e5e1da;
  border-radius: 3px;
  background: #eeeae4;
}

.rwe-custom-map--muted .leaflet-tile-pane {
  filter: saturate(.58) contrast(.94) brightness(1.035);
}

.rwe-custom-map--greyscale .leaflet-tile-pane {
  filter: grayscale(1) contrast(.94) brightness(1.04);
}

.rwe-custom-map .leaflet-control-zoom {
  margin: 18px 0 0 18px !important;
  border: 0 !important;
  border-radius: 3px !important;
  box-shadow: 0 5px 18px rgba(17,17,17,.10) !important;
  overflow: hidden;
}

.rwe-custom-map .leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 36px !important;
  border: 0 !important;
  border-bottom: 1px solid #e5e1da !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #111 !important;
  font-family: "Oswald", sans-serif !important;
  font-size: 20px !important;
  font-weight: 500 !important;
}

.rwe-custom-map .leaflet-control-zoom a:last-child {
  border-bottom: 0 !important;
}

.rwe-custom-map .leaflet-control-zoom a:hover,
.rwe-custom-map .leaflet-control-zoom a:focus-visible {
  background: #f6f4f0 !important;
  color: var(--rwe-map-pin, #c56a3b) !important;
}

.rwe-custom-map .leaflet-control-attribution {
  margin: 0 6px 6px 0 !important;
  padding: 2px 5px !important;
  border-radius: 2px !important;
  background: rgba(255,255,255,.78) !important;
  color: rgba(17,17,17,.56) !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
  box-shadow: none !important;
}

.rwe-custom-map .leaflet-control-attribution a {
  color: rgba(17,17,17,.68) !important;
  text-decoration: none !important;
}

.rwe-custom-map .leaflet-control-attribution a:hover,
.rwe-custom-map .leaflet-control-attribution a:focus-visible {
  color: #111 !important;
  text-decoration: underline !important;
}

/* Custom map pin */
.rwe-custom-map__marker {
  background: transparent !important;
  border: 0 !important;
}

.rwe-custom-map__pin-wrap {
  position: relative;
  width: 44px;
  height: 52px;
}

.rwe-custom-map__pin {
  position: absolute;
  left: 7px;
  top: 2px;
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--rwe-map-pin, #c56a3b);
  box-shadow: 0 5px 13px rgba(17,17,17,.22);
  transform: rotate(-45deg);
}

.rwe-custom-map__pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rwe-map-pin-dot, #fff);
  transform: translate(-50%, -50%);
}

.rwe-custom-map__pin-shadow {
  position: absolute;
  left: 13px;
  bottom: 1px;
  width: 19px;
  height: 6px;
  border-radius: 50%;
  background: rgba(17,17,17,.18);
  filter: blur(2px);
}

/* Popup */
.rwe-custom-map .leaflet-popup-content-wrapper {
  min-width: 235px;
  padding: 0;
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17,17,17,.14);
}

.rwe-custom-map .leaflet-popup-content {
  margin: 0 !important;
  min-width: 235px;
  padding: 22px 24px 20px;
  line-height: 1.45;
}

.rwe-custom-map .leaflet-popup-tip {
  background: #fff;
  box-shadow: none;
}

.rwe-custom-map .leaflet-popup-close-button {
  top: 7px !important;
  right: 7px !important;
  width: 28px !important;
  height: 28px !important;
  color: #777 !important;
  font-size: 21px !important;
  line-height: 26px !important;
}

.rwe-custom-map__popup-title {
  display: block;
  margin: 0 26px 7px 0;
  font-family: "Oswald", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  color: #111;
}

.rwe-custom-map__popup-title::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  margin-top: 9px;
  background: var(--rwe-map-pin, #c56a3b);
}

.rwe-custom-map__popup-subtitle {
  display: block;
  margin-top: 10px;
  color: #696969;
  font-size: 13px;
  line-height: 1.5;
}

.rwe-custom-map__directions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: "Oswald", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  text-transform: none !important;
  color: var(--rwe-map-pin, #c56a3b) !important;
}

.rwe-custom-map__directions:hover,
.rwe-custom-map__directions:focus-visible {
  color: #111 !important;
}

/* Address lookup fallback */
.rwe-custom-map__error {
  min-height: 260px;
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid #e5e1da;
  border-left: 4px solid var(--rwe-map-pin, #c56a3b);
  background: #f7f6f3;
  color: #111;
}

.rwe-custom-map__error-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--rwe-map-pin, #c56a3b);
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.rwe-custom-map__error strong,
.rwe-custom-map__error span {
  display: block;
}

.rwe-custom-map__error strong {
  margin-bottom: 5px;
  font-family: "Oswald", sans-serif;
  font-size: 18px;
}

.rwe-custom-map__error span {
  color: #666;
  font-size: 14px;
}

@media (max-width: 767px) {
  .rwe-custom-map__canvas {
    height: min(var(--rwe-map-height, 520px), 430px);
    min-height: 330px;
  }

  .rwe-custom-map .leaflet-control-zoom {
    margin: 12px 0 0 12px !important;
  }

  .rwe-custom-map__error {
    padding: 28px 22px;
  }
}
