/* Tooltip for the apartment rectangles in .level-map__map. */
.level-map-tooltip,
.level-map-tooltip * {
  box-sizing: border-box;
}

.level-map-tooltip {
  --level-map-tooltip-arrow-left: 50%;
  display: block;
  position: fixed;
  z-index: 1000;
  width: min(311px, calc(100vw - 24px));
  padding: 24px 26px 20px;
  color: #333;
  font-family: "Golos Text", sans-serif;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-decoration: none;
  touch-action: manipulation;
  cursor: pointer;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 200ms ease,
    transform 200ms ease,
    visibility 0s linear 200ms;
}

.level-map-tooltip::after {
  position: absolute;
  left: var(--level-map-tooltip-arrow-left);
  width: 18px;
  height: 18px;
  content: "";
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.level-map-tooltip[data-placement="top"]::after {
  bottom: -8px;
}

.level-map-tooltip[data-placement="bottom"]::after {
  top: -8px;
}

.level-map-tooltip.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition-delay: 0s;
}

.level-map-tooltip__name {
  display: block;
  margin: 0 0 18px;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.level-map-tooltip:visited,
.level-map-tooltip:hover,
.level-map-tooltip:focus {
  color: #000;
}

.level-map-tooltip[aria-disabled="true"] {
  pointer-events: none;
}

.level-map-tooltip__prices {
  display: flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 13px;
  column-gap: 10px;
  white-space: nowrap;
}

.level-map-tooltip__current-price {
  min-width: 0;
  color: #ff1f5b;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.level-map-tooltip.is-regular-price .level-map-tooltip__current-price {
  color: #000;
}

.level-map-tooltip__old-price {
  min-width: 0;
  color: #6d6d6d;
  font-size: 14px;
  line-height: 18px;
  text-decoration: line-through;
  overflow-wrap: anywhere;
}

.level-map-tooltip__discount {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  background: #be8866;
  border-radius: 20px;
}

.level-map-tooltip__details {
  margin: 0;
}

.level-map-tooltip__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  min-height: 28px;
  column-gap: 12px;
  border-bottom: 1px solid #e8e1db;
  font-size: 12px;
  line-height: 16px;
}

.level-map-tooltip__row.is-last-visible {
  border-bottom: 0;
}

.level-map-tooltip__label {
  color: #696969;
}

.level-map-tooltip__value {
  max-width: 150px;
  color: #333;
  text-align: right;
  overflow-wrap: anywhere;
}

.level-map-tooltip__more {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  text-decoration: none;
  background: #f2eee9;
  border-radius: 6px;
}

.level-map-tooltip [hidden] {
  display: none !important;
}

.level-map-tooltip.is-mobile {
  right: 12px !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  left: 12px !important;
  width: auto;
  max-width: none;
  padding: 20px;
  transform: translate3d(0, 12px, 0);
}

.level-map-tooltip.is-mobile::after {
  display: none;
}

.level-map-tooltip.is-mobile.is-visible {
  transform: translate3d(0, 0, 0);
}

@media (max-width: 767px) {
  .level-map-tooltip__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .level-map-tooltip__row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 7px 0;
    font-size: 10px;
    line-height: 13px;
  }

  .level-map-tooltip__label,
  .level-map-tooltip__value {
    max-width: 100%;
    font-size: 10px;
    line-height: 13px;
    text-align: left;
  }

  .level-map-tooltip__more {
    display: block;
  }

  .level-map-tooltip__name {
    margin-bottom: 14px;
  }

  .level-map-tooltip__prices {
    flex-wrap: wrap;
    row-gap: 6px;
  }

}

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