:root {
  color-scheme: light;
  --mh-blue: #005baa;
  --mh-yellow: #ffe600;
  --mh-red: #ed1c24;
  --mh-text: #202124;
  --mh-muted: #62666d;
  --mh-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body,
.mh-map-app,
.mh-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

body {
  overflow: hidden;
  background: #e7e8eb;
  color: var(--mh-text);
  font-family: Arial, sans-serif;
}

.mh-map-app {
  position: relative;
}

.mh-map-status {
  position: absolute;
  z-index: 8;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 94px);
  padding: 9px 13px;
  border: 1px solid rgba(7, 93, 168, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 18px rgba(20, 24, 31, 0.14);
  color: var(--mh-text);
  font-size: 13px;
  line-height: 1.25;
  pointer-events: none;
}

.mh-map-error {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: #f2f3f5;
  color: var(--mh-muted);
  text-align: center;
}

.mh-map-error[hidden] {
  display: none;
}

.mh-map-error strong {
  color: var(--mh-text);
  font-size: 18px;
}

.mh-map-marker {
  position: relative;
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 3px solid var(--mh-blue);
  border-radius: 50% 50% 50% 12px;
  background: var(--mh-blue);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transform: rotate(-45deg);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.mh-map-marker:hover {
  box-shadow: 0 7px 22px rgba(0, 91, 170, 0.38);
  transform: rotate(-45deg) scale(1.08);
}

.mh-map-marker:focus-visible {
  outline: 3px solid var(--mh-yellow);
  outline-offset: 3px;
  box-shadow: 0 7px 22px rgba(0, 91, 170, 0.38);
  transform: rotate(-45deg) scale(1.08);
}

.mh-map-marker__logo {
  display: grid;
  width: 34px;
  height: 24px;
  place-items: center;
  transform: rotate(45deg);
}

.mh-map-marker__logo img {
  display: block;
  width: 30px;
  max-width: 100%;
  height: auto;
}

.mh-map-balloon {
  width: 290px;
  max-width: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

.mh-map-balloon__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 12px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef0f2;
}

.mh-map-balloon__title {
  margin: 0 0 7px;
  color: var(--mh-text);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.mh-map-balloon__text {
  margin: 0;
  color: var(--mh-muted);
  font-size: 14px;
  line-height: 1.45;
}

.mh-map-balloon__closed {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid var(--mh-red);
  border-radius: 7px;
  background: rgba(237, 28, 36, 0.08);
  color: var(--mh-text);
  font-size: 13px;
  font-weight: 700;
}

.mh-map-balloon__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 13px;
  padding: 9px 15px;
  border-radius: 9px;
  background: var(--mh-blue);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.mh-map-balloon__link:hover,
.mh-map-balloon__link:focus-visible {
  background: var(--mh-blue);
  box-shadow: 0 4px 14px rgba(0, 91, 170, 0.3);
}

@media (max-width: 600px) {
  .mh-map-status {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 76px);
    padding: 8px 11px;
    font-size: 12px;
  }

  .mh-map-balloon {
    width: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mh-map-marker {
    transition: none;
  }
}
