/* HotelMap — изолированные стили (префикс .hotel-map) */

.hotel-map {
  --hotel-map-ink: #171816;
  --hotel-map-paper: #ecebe7;
  --hotel-map-accent: #dbe965;
  --hotel-map-muted: rgba(255, 255, 255, 0.58);

  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 480px;
  aspect-ratio: 0.78;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 48px;
  background: var(--hotel-map-paper);
  isolation: isolate;
  font-family: var(--sans, inherit);
  color: var(--hotel-map-ink);
}

.hotel-map--constructor {
  max-width: 600px;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border-radius: 36px;
  background: #e7e4dc;
}

.hotel-map__embed,
.hotel-map__embed iframe {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.hotel-map__embed > * {
  width: 100% !important;
  height: 100% !important;
}

.hotel-map__fallback-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--hotel-map-ink);
  text-align: center;
  text-underline-offset: 4px;
  background: #e7e4dc;
}

.hotel-map__fallback-link:focus-visible {
  outline: 2px solid var(--hotel-map-ink);
  outline-offset: -6px;
}

.hotel-map--ready .hotel-map__canvas {
  opacity: 1;
}

.hotel-map__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 300ms ease;
}

.hotel-map__canvas > * {
  width: 100%;
  height: 100%;
}

.hotel-map__shimmer {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    110deg,
    #ecebe7 0%,
    #f6f5f1 45%,
    #ecebe7 90%
  );
  background-size: 200% 100%;
  animation: hotel-map-shimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

.hotel-map--ready .hotel-map__shimmer,
.hotel-map--error .hotel-map__shimmer {
  display: none;
}

@keyframes hotel-map-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hotel-map__shimmer {
    animation: none;
  }

  .hotel-map__canvas {
    transition: none;
  }
}

.hotel-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(0deg, rgba(20, 20, 20, 0.06), transparent 30%);
}

.hotel-map__panel {
  position: absolute;
  z-index: 10;
  top: 24px;
  left: 24px;
  width: 190px;
  padding: 18px;
  color: #fff;
  background: rgba(24, 25, 23, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 27px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hotel-map__eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--hotel-map-muted);
}

.hotel-map__time {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.hotel-map__time strong {
  font-weight: 700;
}

.hotel-map__time-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--hotel-map-ink);
  background: var(--hotel-map-accent);
  font-size: 17px;
}

.hotel-map__button {
  position: absolute;
  z-index: 10;
  right: 20px;
  bottom: 30px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  color: var(--hotel-map-ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hotel-map__button:hover {
  transform: translateY(-2px);
  background: #fff;
}

.hotel-map__button:focus-visible {
  outline: 2px solid var(--hotel-map-ink);
  outline-offset: 3px;
}

.hotel-map__button-arrow {
  font-size: 20px;
  font-weight: 400;
}

.hotel-map__fallback {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 40px 28px;
  text-align: center;
  background: #efeee9;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hotel-map-ink);
}

.hotel-map--error .hotel-map__fallback {
  display: grid;
}

.hotel-map--error .hotel-map__panel,
.hotel-map--error .hotel-map__button {
  display: none;
}

.hotel-map__fallback p {
  margin: 0 0 10px;
}

.hotel-map__fallback a {
  color: var(--hotel-map-ink);
  font-weight: 600;
  text-underline-offset: 3px;
}

.hotel-map__fallback a:focus-visible {
  outline: 2px solid var(--hotel-map-ink);
  outline-offset: 3px;
}

/* Маркеры внутри YMapMarker (вне .hotel-map tree, но классы наши) */
.hotel-map-marker {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 7px;
  color: #fff;
  background: var(--hotel-map-ink, #171816);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: var(--sans, inherit);
}

.hotel-map-marker__icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #171816;
  background: #dbe965;
  font-size: 18px;
}

.hotel-map-marker__label {
  padding-right: 2px;
  font-size: 13px;
  font-weight: 600;
}

.hotel-map-route-dot {
  width: 13px;
  height: 13px;
  border: 4px solid #171816;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
}

.hotel-map__diag {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 28px 24px;
  text-align: center;
  background: #efeee9;
  color: #171816;
  font-size: 13px;
  line-height: 1.45;
}

.hotel-map__diag p {
  margin: 0;
}

.hotel-map__diag a {
  color: #171816;
  font-weight: 600;
}

@media (min-width: 768px) {
  .hotel-map:not(.hotel-map--constructor) {
    min-height: 600px;
  }
}

@media (max-width: 560px) {
  .hotel-map {
    max-width: none;
    min-height: 480px;
    aspect-ratio: 0.82;
    border-radius: 32px;
  }

  .hotel-map--constructor {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 28px;
  }

  .hotel-map__panel {
    top: 16px;
    left: 16px;
    width: min(190px, calc(100% - 32px));
    padding: 16px;
    border-radius: 24px;
  }

  .hotel-map__button {
    right: 16px;
    left: 16px;
    bottom: 20px;
    justify-content: center;
  }

  .hotel-map-marker__label {
    font-size: 12px;
  }
}
