html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

*,
*::after,
*::before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
}

#viewer {
  --side-inset: clamp(20px, -0.807rem + 5.06vw, 60px);
  --tower-scroll-bleed: 20px;
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
}

#viewer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.2) 45%,
    rgba(0, 0, 0, 0) 100%
  );
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  line-height: 1;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
  color: white;
  /* border-radius: 8px; */
  /* transition: 300ms ease; */
  border-radius: 50px;
  flex-shrink: 0;
  white-space: nowrap;
}

button:disabled {
  cursor: not-allowed;
}

@media screen and (hover: hover) {
  button:not(:disabled):hover {
    background-color: hsl(0 0% 100%);
    color: #414244;
  }
}

button[aria-current='true'] {
  background-color: hsl(0 0% 100%);
  color: #414244;
}
.viewer-logo {
  position: absolute;
  top: 40px;
  right: 60px;
  right: clamp(20px, -0.807rem + 5.06vw, 60px);
  z-index: 20;
  display: block;
  line-height: 0;
}

.viewer-logo svg {
  display: block;
  width: 152px;
  height: auto;
}

.tower-controls-area {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  z-index: 20;
  padding-inline: var(--side-inset);
  pointer-events: none;
}

.tower-controls-scroll {
  margin-inline: calc(-1 * var(--tower-scroll-bleed));
  padding-inline: var(--tower-scroll-bleed);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  pointer-events: none;
}

.tower-controls {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  position: relative;
  overflow: hidden;
  border-radius: 50px;
  background-color: transparent;
  border: 1px solid #ffffff;
  pointer-events: auto;
  touch-action: pan-x;
}

.tower-controls::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--tower-highlight-left, 0);
  width: var(--tower-highlight-width, 0);
  height: 100%;
  border-radius: 50px;
  background-color: #ffffff;
}

.tower-controls[data-highlight-ready='true']::before {
  transition: left 220ms ease, width 220ms ease;
}

.tower-controls button {
  position: relative;
  z-index: 1;
  background-color: transparent;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color 220ms ease;
}

.tower-controls button[aria-current='true'] {
  background-color: transparent;
  color: #ffffff;
}

.tower-controls button[data-highlighted='true'] {
  background-color: transparent;
  color: #414244;
}

.floor-controls-area {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  z-index: 20;
  padding-inline: var(--side-inset);
  pointer-events: none;
}

.floor-controls-scroll {
  margin-inline: calc(-1 * var(--tower-scroll-bleed));
  padding-inline: var(--tower-scroll-bleed);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  pointer-events: none;
}

.tower-controls-scroll[data-overflowing='true'],
.floor-controls-scroll[data-overflowing='true'] {
  pointer-events: auto;
}

.floor-controls {
  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  width: max-content;
  border-radius: 50px;
  pointer-events: auto;
  touch-action: pan-x;
}

.floor-controls button {
  flex-shrink: 0;
  white-space: nowrap;
}

.floor-controls button[aria-current='true'] {
  border: 1px solid #fff;
}
.floor-controls button[aria-current='false'] {
  border: 1px solid #fff;
}

.time-controls {
  position: absolute;
  top: 120px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.hotspot[hidden],
.hotspot-card[hidden] {
  display: none !important;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  width: auto;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  backdrop-filter: blur(2px);
  transform: translate(-50%, -50%);
  padding: 12px 10px;
  transition: background-color 160ms ease, color 160ms ease, width 200ms ease, gap 200ms ease;
  gap: 6px;
  cursor: pointer;
  overflow: hidden;
}

.hotspot span {
  transition: visibility 150ms ease, width 200ms ease, margin 200ms ease;
  white-space: nowrap;
  font-size: 13px;
}

/* Скрываем текст при открытой карточке */
.hotspot.hotspot--text-hidden {
  gap: 0;
  height: 38px; /* Фиксируем высоту */
  min-height: 38px;
  width: 38px;
}

.hotspot.hotspot--text-hidden span {
  opacity: 0;
  visibility: hidden;
  width: 0;
  margin: 0;
  padding: 0;
}

.hotspot[aria-current='true'] {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  color: #fff;
}

.hotspot__icon {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.hotspot[aria-current='true'] .hotspot__icon {
  transform: rotate(45deg);
}

.hotspot-card {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  max-height: calc(100svh - 40px);
  padding: 20px;
  /* padding: clamp(20px, 0.736rem + 1.27vw, 30px); */
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  transform: translate(-50%, -100%);
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.hotspot-card__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.hotspot-card__body::-webkit-scrollbar {
  width: 4px;
}

.hotspot-card__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
}

.hotspot-card--below {
  transform: translate(-50%, 0);
}

.hotspot-card--left {
  transform: translate(-100%, -50%);
}

.hotspot-card--right {
  transform: translate(0, -50%);
}

.hotspot-card__close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 0;
  width: 40px;
  height: 40px;
  justify-content: center;
  border-radius: 50%;
  color: white;
}

.hotspot-card__close svg {
  display: block;
}

.hotspot-card__title {
  font-size: 24px;
  font-size: clamp(20px, 1.044rem + 0.51vw, 24px);
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

.hotspot-card__vvod:not([hidden]) {
  margin-bottom: 16px;
}

.hotspot-card__vvod:not([hidden]) + .hotspot-card__description {
  margin-top: 0;
}

.hotspot-card__description {
  font-size: 16px;
  font-size: clamp(14px, 0.703rem + 0.26vw, 14px);
  font-weight: 500;
  line-height: 1.4;
}


.hotspot-card__description p:not(:last-child) {
  margin-bottom: 8px;
}

.hotspot-card__description ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
  margin-bottom: 8px;
}

.hotspot-card__description li + li {
  margin-top: 4px;
}

.hotspot-slider__link {
  display: inline-block;
  margin-top: 12px;
  color: #ffffff;
  text-underline-offset: 2px;
}

.hotspot-slider {
  margin-top: 24px;
  overflow: hidden;
  border-radius: 24px;
}

.hotspot-slider__slide img {
  display: block;
  width: 100%;
  height: 205px;
  object-fit: cover;
  border-radius: 24px;
  object-position: bottom;
}

.hotspot-slider__pagination.swiper-pagination {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.hotspot-slider__pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  opacity: 1;
}

.hotspot-slider__pagination .swiper-pagination-bullet-active {
  background: #d5ba9f;
}

.hotspot-pick-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 200;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #4ade80;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.viewer-footer {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.4;
  z-index: 30;
}
.viewer-footer a {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .viewer-logo {
    display: none;
  }
}
@media (max-width: 650px) {
  .viewer-logo {
    display: none;
  }
  .floor-controls {
    flex-direction: row;
    align-items: center;
  }
  .hotspot-card {
    transform: translate(-50%, -50%);
    max-height: calc(100dvh - 40px);
    max-height: calc(100svh - 40px);
  }
  .hotspot-card__close {
    display: inline-flex;
  }
  .hotspot-card__title {
    padding-right: 36px;
  }
}
.hotspot-distance {
  margin-top: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.hotspot-distance__time {
  color: #ffffff;
  font-size: 16px;
}
.hotspot-distance__value {
  color: #c5c5c5;
  font-size: 16px;
}
.hotspot-distance__vvod {
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: block;
}

.hotspot-card__vvod .hotspot-distance__vvod {
  margin-bottom: 0;
}

.hotspot-distance--vvod {
  display: block;
  margin-top: 20px;
}

.hotspot-distance--vvod .hotspot-distance__vvod {
  margin-bottom: 0;
}

.hotspot-card__description a{
  display: block;
  width: fit-content;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-underline-offset: 2px;
}
.hotspot-card__description a:not(:last-child) {
  margin-bottom: 8px;
}
.viewer-year {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  position: fixed;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  z-index: 30;
}