.afpv {
  --afpv-sale: 84, 111, 224;
  --afpv-sold: 214, 78, 88;
  --afpv-reserved: 178, 143, 92;
  --afpv-accent: #a7ba77;
  --afpv-text: #252525;
  --afpv-muted: #7c7c7c;
  color: var(--afpv-text);
  font-family: inherit;
  width: 100%;
}

.afpv *,
.afpv *::before,
.afpv *::after {
  box-sizing: border-box;
}

.afpv__tabs {
  align-items: stretch;
  border-bottom: 1px solid #e7e7e7;
  display: flex;
  gap: clamp(18px, 4vw, 72px);
  margin: 0 auto 26px;
  max-width: 1480px;
  overflow-x: auto;
  padding: 0 18px;
  scrollbar-width: thin;
}

.afpv__tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #868686;
  cursor: pointer;
  flex: 0 0 auto;
  font: 600 16px/1.2 inherit;
  letter-spacing: 0;
  min-height: 58px;
  padding: 0 22px 16px;
  text-transform: uppercase;
}

.afpv__tab[aria-selected="true"] {
  border-color: #333;
  color: #202020;
}

.afpv__floor-select-label {
  display: none;
}

.afpv__floor-select-label span {
  color: var(--afpv-muted);
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.afpv__floor-select {
  appearance: none;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  color: var(--afpv-text);
  font: 600 16px/1.2 inherit;
  min-height: 46px;
  padding: 0 42px 0 14px;
  width: 100%;
}

.afpv__stage {
  margin: 0 auto;
  max-width: 1680px;
  overflow: visible;
  padding: 0 18px;
}

.afpv__viewport {
  min-height: 360px;
}

.afpv__plan {
  margin: 0 auto;
  min-width: 0;
  position: relative;
  width: 100%;
}

.afpv__image {
  display: block;
  height: auto;
  user-select: none;
  width: 100%;
}

.afpv__overlay {
  inset: 0;
  position: absolute;
  width: 100%;
  height: 100%;
}

.afpv__apartment {
  cursor: pointer;
  fill-opacity: 0.32;
  outline: none;
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 0.35;
  transition: fill-opacity 180ms ease, stroke 180ms ease;
}

.afpv__apartment--sale {
  fill: rgb(var(--afpv-sale));
  fill-opacity: 0.28;
}

.afpv__apartment--sold {
  cursor: default;
  fill: rgb(var(--afpv-sold));
  fill-opacity: 0.32;
}

.afpv__apartment--reserved {
  fill: rgb(var(--afpv-reserved));
  fill-opacity: 0.34;
}

.afpv__apartment--reserve {
  cursor: default;
  fill: rgb(var(--afpv-reserved));
  fill-opacity: 0.34;
}

.afpv__apartment:hover,
.afpv__apartment:focus-visible {
  fill-opacity: 0.82;
  stroke: #fff;
}

.afpv__tooltip {
  background: #333;
  border-radius: 4px;
  color: #fff;
  display: grid;
  font-size: 15px;
  gap: 6px;
  left: 0;
  line-height: 1.2;
  min-width: 170px;
  opacity: 0;
  padding: 14px 16px;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, calc(-100% - 18px));
  transition: opacity 140ms ease;
  z-index: 3;
}

.afpv__tooltip::after {
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #333;
  bottom: -9px;
  content: "";
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.afpv__tooltip.is-visible {
  opacity: 1;
}

.afpv__tooltip strong {
  font-weight: 700;
}

.afpv__tooltip span {
  color: #f0f0f0;
}

.afpv__legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 18px auto 0;
  max-width: 1480px;
  padding: 0 18px;
}

.afpv__legend span {
  align-items: center;
  color: var(--afpv-muted);
  display: inline-flex;
  font-size: 14px;
  gap: 8px;
}

.afpv__dot {
  border-radius: 999px;
  display: inline-block;
  height: 11px;
  width: 11px;
}

.afpv__dot--sale {
  background: rgb(var(--afpv-sale));
}

.afpv__dot--sold {
  background: rgb(var(--afpv-sold));
}

.afpv__dot--reserved {
  background: rgb(var(--afpv-reserved));
}

.afpv__loading,
.afpv__error {
  color: var(--afpv-muted);
  padding: 80px 18px;
  text-align: center;
}

.afpv-modal-open {
  overflow: hidden;
}

.afpv-modal {
  align-items: center;
  background: rgba(24, 24, 24, 0.64);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 24px;
  position: fixed;
  transition: opacity 220ms ease;
  z-index: 999999;
}

.afpv-modal.is-open {
  opacity: 1;
}

.afpv-modal__dialog {
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  display: grid;
  grid-template-columns: minmax(380px, 1.16fr) minmax(320px, 0.84fr);
  max-height: min(860px, calc(100vh - 48px));
  max-width: 1120px;
  overflow: auto;
  position: relative;
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms ease;
  width: min(100%, 1120px);
}

.afpv-modal.is-open .afpv-modal__dialog {
  transform: translateY(0) scale(1);
}

.afpv-modal__close {
  align-items: center;
  appearance: none;
  background: #f1f1f1;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 42px;
  z-index: 5;
}

.afpv-modal__gallery {
  align-items: center;
  background: #efefed;
  display: flex;
  justify-content: center;
  min-height: 600px;
  overflow: hidden;
  padding: 0;
  position: relative;
  touch-action: pan-y;
}

.afpv-modal__gallery img {
  background: #fff;
  cursor: zoom-in;
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: 1;
  position: absolute;
  transition: opacity 180ms ease, transform 220ms ease;
  width: 100%;
  z-index: 1;
}

.afpv-modal__gallery img.is-changing {
  opacity: 0;
  transform: scale(1.015);
}

.afpv-modal__nav {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.84);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  font-size: 42px;
  height: 46px;
  justify-content: center;
  line-height: 0;
  padding: 0 0 5px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  z-index: 4;
}

.afpv-modal__nav--prev {
  left: 16px;
}

.afpv-modal__nav--next {
  right: 16px;
}

.afpv-modal__counter {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  bottom: 16px;
  color: var(--afpv-muted);
  font-size: 13px;
  z-index: 4;
  padding: 5px 10px;
  position: absolute;
  right: 16px;
}

.afpv-modal__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 54px 40px 34px;
}

.afpv-modal__head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.afpv-modal__head h3 {
  color: var(--afpv-accent);
  font: 800 clamp(32px, 4vw, 46px)/1.08 inherit;
  margin: 0;
}

.afpv-modal__head span {
  background: #2f3a22;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 58, 34, 0.16);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  white-space: nowrap;
}

.afpv-modal__meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
}

.afpv-modal__area {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.afpv-modal__area-icon {
  color: #7f9b35;
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.afpv-modal__status {
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  padding: 6px 10px;
}

.afpv-modal__status--sale {
  background: rgb(var(--afpv-sale));
}

.afpv-modal__status--sold {
  background: rgb(var(--afpv-sold));
}

.afpv-modal__status--reserved {
  background: rgb(var(--afpv-reserved));
}

.afpv-modal__status--reserve {
  background: rgb(var(--afpv-reserved));
}

.afpv-modal__details {
  color: #555;
  columns: 2;
  column-gap: 28px;
  font-size: 13px;
  line-height: 1.32;
  margin: 0;
  padding-left: 18px;
}

.afpv-modal__details li {
  break-inside: avoid;
  margin: 0 0 7px;
}

.afpv-modal__price {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
  color: #4a4a4a;
  font-size: 28px;
  padding: 15px 20px;
  width: fit-content;
}

.afpv-modal__price-label {
  color: #7f9b35;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.afpv-modal__form {
  margin-top: auto;
}

.afpv-modal__form p {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 18px;
}

.afpv-modal__phone {
  align-items: center;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #b7b7b7;
  border-radius: 0;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0;
  position: relative;
  width: 100%;
}

.afpv-modal__phone:focus-within {
  border-color: #7f9b35;
}

.afpv-modal__country-picker {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
}

.afpv-modal__country-toggle {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: #3b444d;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  min-height: 54px;
  padding: 0 2px 0 0;
}

.afpv-modal__country-toggle span:first-child {
  font-size: 22px;
  line-height: 1;
}

.afpv-modal__country-toggle:focus-visible {
  outline: none;
}

.afpv-modal__country-caret {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #5a6168;
  height: 0;
  width: 0;
}

.afpv-modal__country-menu {
  background: #fff;
  border: 1px solid #cfcfcf;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
  left: 0;
  max-height: 210px;
  min-width: min(360px, calc(100vw - 42px));
  overflow-y: auto;
  position: absolute;
  top: calc(100% + 2px);
  z-index: 9;
}

.afpv-modal__country-option {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 0;
  color: #303b45;
  cursor: pointer;
  display: grid;
  font: 500 16px/1.15 inherit;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 5px 12px;
  text-align: left;
  width: 100%;
}

.afpv-modal__country-option:hover,
.afpv-modal__country-option[aria-selected="true"] {
  background: #f0f0f0;
}

.afpv-modal__country-option-flag {
  font-size: 21px;
  line-height: 1;
}

.afpv-modal__country-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.afpv-modal__country-option-code {
  color: #969696;
  font-size: 15px;
  white-space: nowrap;
}

.afpv-modal__phone input {
  background: transparent;
  border: 0;
  color: #303b45;
  font: 500 24px/1 inherit;
  min-height: 56px;
  min-width: 0;
  padding: 0;
  width: 100%;
}

.afpv-modal__phone input:focus {
  outline: none;
}

.afpv-modal__form button[type="submit"] {
  appearance: none;
  background: #7f9b35;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(127, 155, 53, 0.25);
  color: #fff;
  cursor: pointer;
  font: 800 15px/1 inherit;
  margin-top: 12px;
  min-height: 58px;
  padding: 0 24px;
  text-transform: uppercase;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  white-space: nowrap;
  width: 100%;
}

.afpv-modal__form button[type="submit"]:hover {
  background: #6f872f;
  box-shadow: 0 12px 24px rgba(127, 155, 53, 0.34);
  transform: translateY(-1px);
}

.afpv-modal__form button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.65;
}

.afpv-modal__message {
  font-size: 14px;
  min-height: 22px;
  padding-top: 10px;
}

.afpv-modal__message--success {
  color: #3d7b38;
}

.afpv-modal__message--error {
  color: #b94343;
}

.afpv-lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 24px;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 1000000;
  touch-action: pan-y;
}

.afpv-lightbox.is-open {
  opacity: 1;
}

.afpv-lightbox img {
  background: #fff;
  display: block;
  max-height: calc(100vh - 80px);
  max-width: calc(100vw - 80px);
  object-fit: contain;
  opacity: 1;
  transition: opacity 180ms ease;
}

.afpv-lightbox img.is-changing {
  opacity: 0;
}

.afpv-lightbox__close,
.afpv-lightbox__nav {
  align-items: center;
  appearance: none;
  background: rgba(255, 255, 255, 0.86);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  position: absolute;
  z-index: 2;
}

.afpv-lightbox__close {
  font-size: 32px;
  height: 44px;
  right: 22px;
  top: 22px;
  width: 44px;
}

.afpv-lightbox__nav {
  font-size: 46px;
  height: 52px;
  line-height: 0;
  padding-bottom: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
}

.afpv-lightbox__nav--prev {
  left: 22px;
}

.afpv-lightbox__nav--next {
  right: 22px;
}

.afpv-lightbox__counter {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  bottom: 20px;
  color: #333;
  font-size: 13px;
  padding: 6px 12px;
  position: absolute;
  z-index: 2;
}

@media (max-width: 900px) {
  .afpv__stage {
    padding: 0 8px;
  }

  .afpv-modal {
    align-items: stretch;
    padding: 12px;
  }

  .afpv-modal__dialog {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 24px);
  }

  .afpv-modal__gallery {
    min-height: 320px;
  }

  .afpv-modal__content {
    padding: 28px 22px 24px;
  }

}

@media (max-width: 700px) {
  .afpv__stage {
    padding-bottom: 0;
  }

  .afpv__viewport {
    min-height: 0;
  }

  .afpv__tabs {
    display: none;
  }

  .afpv__floor-select-label {
    display: block;
    margin: 0 auto 16px;
    padding: 0 10px;
  }

  .afpv__floor-select-label span {
    display: none;
  }

  .afpv-modal__details {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .afpv-modal {
    align-items: center;
    padding: 8px;
  }

  .afpv-modal__dialog {
    max-height: calc(100vh - 16px);
    width: 100%;
  }

  .afpv-modal__close {
    font-size: 30px;
    height: 46px;
    right: 10px;
    top: 10px;
    width: 46px;
  }

  .afpv-modal__gallery {
    min-height: 210px;
  }

  .afpv-modal__gallery img {
    max-height: none;
  }

  .afpv-modal__nav {
    font-size: 30px;
    height: 34px;
    padding-bottom: 4px;
    width: 34px;
  }

  .afpv-modal__nav--prev {
    left: 8px;
  }

  .afpv-modal__nav--next {
    right: 8px;
  }

  .afpv-modal__counter {
    bottom: 8px;
    font-size: 12px;
    right: 10px;
  }

  .afpv-modal__content {
    gap: 8px;
    padding: 16px 14px 14px;
  }

  .afpv-modal__head {
    gap: 8px;
  }

  .afpv-modal__head h3 {
    font-size: 27px;
  }

  .afpv-modal__head span {
    font-size: 12px;
    padding: 6px 10px;
  }

  .afpv-modal__meta {
    font-size: 15px;
    gap: 7px;
  }

  .afpv-modal__details {
    font-size: 12px;
    line-height: 1.35;
  }

  .afpv-modal__price {
    font-size: 20px;
    padding: 10px 14px;
  }

  .afpv-modal__form p {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .afpv-modal__phone,
  .afpv-modal__form button[type="submit"] {
    min-height: 46px;
  }

  .afpv-modal__phone input {
    font-size: 18px;
  }

  .afpv-modal__country-toggle {
    min-height: 46px;
  }

  .afpv-modal__country-toggle span:first-child,
  .afpv-modal__country-option-flag {
    font-size: 20px;
  }

  .afpv-modal__country-menu {
    max-height: 190px;
    min-width: min(300px, calc(100vw - 28px));
  }

  .afpv-modal__country-option {
    font-size: 14px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 38px;
    padding: 5px 10px;
  }

  .afpv-modal__form button[type="submit"] {
    font-size: 13px;
    margin-top: 8px;
  }

  .afpv-modal__message {
    min-height: 18px;
    padding-top: 6px;
  }

  .afpv-lightbox {
    padding: 12px;
  }

  .afpv-lightbox img {
    max-height: calc(100vh - 72px);
    max-width: calc(100vw - 24px);
  }

  .afpv-lightbox__close {
    height: 38px;
    right: 12px;
    top: 12px;
    width: 38px;
  }

  .afpv-lightbox__nav {
    height: 40px;
    width: 40px;
  }

  .afpv-lightbox__nav--prev {
    left: 10px;
  }

  .afpv-lightbox__nav--next {
    right: 10px;
  }
}
