.mas-contact-map {
  --mas-surface: #1f2023;
  --mas-surface-strong: #111214;
  --mas-border: rgba(255, 255, 255, 0.18);
  --mas-border-strong: rgba(255, 255, 255, 0.28);
  --mas-text: #ffffff;
  --mas-muted: rgba(255, 255, 255, 0.72);
  --mas-accent: #dd0000;
  --mas-focus: rgba(221, 0, 0, 0.38);
  color: var(--mas-text);
  width: 100%;
}

.mas-contact-map,
.mas-contact-map * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.mas-contact-map__canvas {
  background: var(--mas-surface-strong);
  border: 1px solid var(--mas-border-strong);
  border-radius: 15px 15px 0 0;
  height: 472px;
  min-height: 472px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.mas-contact-map__fallback {
  align-items: center;
  color: var(--mas-muted);
  display: flex;
  font-size: 15px;
  height: 100%;
  justify-content: center;
  line-height: 1.5;
  padding: 24px;
  text-align: center;
}

.mas-contact-map .maplibregl-map {
  background: var(--mas-surface-strong);
  color: #161719;
  font-family: inherit;
}

.mas-contact-map .maplibregl-ctrl-attrib {
  font-size: 11px;
}

.mas-contact-map .maplibregl-ctrl button {
  border-radius: 0;
}

.mas-contact-map .maplibregl-popup {
  max-width: min(430px, calc(100vw - 48px)) !important;
}

.mas-contact-map .maplibregl-popup-content {
  background: #1f2023;
  border: 1px solid var(--mas-border);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  color: var(--mas-text);
  padding: 18px 54px 18px 20px;
}

.mas-contact-map .maplibregl-popup-tip {
  border-top-color: #1f2023;
}

.mas-contact-map .maplibregl-popup-anchor-top .maplibregl-popup-tip,
.mas-contact-map .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.mas-contact-map .maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
  border-bottom-color: #1f2023;
}

.mas-contact-map .maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: #1f2023;
}

.mas-contact-map .maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: #1f2023;
}

.mas-contact-map .maplibregl-popup-close-button {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 24px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 12px !important;
  top: 10px !important;
  width: 32px;
}

.mas-contact-map .maplibregl-popup-close-button:hover,
.mas-contact-map .maplibregl-popup-close-button:focus {
  background: transparent;
  color: #ffffff;
}

.mas-contact-map .maplibregl-popup-close-button:focus {
  box-shadow: none;
  outline: 0;
}

.mas-contact-map .mas-map-pin {
  --mas-pin-fill: #dd0000;
  display: block;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.32));
  height: 58px;
  left: 5px;
  position: absolute;
  top: 0;
  transform: none;
  transition: transform 150ms ease, filter 150ms ease;
  width: 48px;
}

.mas-contact-map .mas-map-pin-wrap {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  cursor: pointer;
  display: block;
  height: 58px !important;
  margin: 0 !important;
  outline: 0;
  overflow: visible !important;
  padding: 0 !important;
  width: 58px !important;
}

.mas-contact-map .mas-map-pin-wrap:hover,
.mas-contact-map .mas-map-pin-wrap:focus,
.mas-contact-map .mas-map-pin-wrap:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.mas-contact-map .mas-map-pin__shape {
  fill: var(--mas-pin-fill);
  stroke: #ffffff;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.mas-contact-map .mas-map-pin__label {
  dominant-baseline: middle;
  fill: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  text-anchor: middle;
}

.mas-contact-map .mas-map-pin--active {
  filter: drop-shadow(0 0 10px rgba(221, 0, 0, 0.65));
  transform: scale(1.12);
}

.mas-contact-map .mas-map-popup {
  color: var(--mas-text);
  min-width: 330px;
}

.mas-contact-map .mas-map-popup h3 {
  color: var(--mas-text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.22;
  margin: 0 0 7px;
}

.mas-contact-map .mas-map-popup p {
  color: var(--mas-muted);
  font-size: 13px;
  line-height: 1.42;
  margin: 0 0 7px;
}

.mas-contact-map .mas-map-popup__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin-top: 10px;
}

.mas-contact-map .mas-popup-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--mas-border-strong);
  border-radius: 7px;
  box-sizing: border-box !important;
  color: var(--mas-text);
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  height: 44px !important;
  justify-content: center;
  line-height: 1;
  margin: 0 !important;
  max-height: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  vertical-align: top;
}

.mas-contact-map .mas-popup-action--primary {
  background: var(--mas-accent);
  border-color: var(--mas-accent);
  color: #ffffff;
}

.mas-contact-map .maplibregl-popup .mas-popup-action {
  color: var(--mas-text);
}

.mas-contact-map .maplibregl-popup .mas-popup-action--primary {
  color: #ffffff;
}

.mas-contact-map .maplibregl-popup .mas-popup-action:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #161719;
  text-decoration: none;
}

.mas-contact-map .maplibregl-popup .mas-popup-action--primary:hover {
  background: #f00000;
  border-color: #f00000;
  color: #ffffff;
}

.mas-contact-map .mas-popup-action:focus-visible {
  border-color: var(--mas-accent);
  box-shadow: 0 0 0 2px var(--mas-focus);
  outline: 0;
}

.mas-contact-map .mas-popup-action svg {
  flex: 0 0 15px;
  height: 15px;
  width: 15px;
}

@media (max-width: 1024px) {
  .mas-contact-map__canvas {
    height: 420px;
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .mas-contact-map__canvas {
    height: 360px;
    min-height: 360px;
  }

  .mas-contact-map .mas-map-popup {
    min-width: 260px;
  }

  .mas-contact-map .mas-map-popup__actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mas-contact-map .mas-popup-action,
  .mas-contact-map .mas-map-pin {
    transition: none;
  }
}
