/*
    INFO:
    When creating a floor plan, classes are added to <body>:
    body.floorplanPage - for the floorplan page
    body.floorplanOverlay - for pages where floorplan is used as an overlay (displayed when clicking on the button)

    When the overlay opens, classe are added to <body>:
    body.floorplanOverlay.floorplanOverlayOpen

 */
body {
}

body .rightSide {
  height: 100vh;
  padding: 0 !important;
}

.floorplanContainer {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100vh;
  flex-direction: row;
  color: var(--floorplan-text);
  overflow: hidden;
  transition: all 1s ease-in-out;
  transform: translateY(-100%);
  background: transparent;
  z-index: 1000;
  visibility: hidden;
}

body[data-page-url*="floorplan"] .floorplanContainer {
  height: calc(100vh - var(--headerHeight) - var(--footerHeight));
}

/* body.floorplanOverlay .floorplanContainer {
  transition: all 1s ease !important;
  transform: translateY(-100%) !important;
  visibility: hidden !important;
} */

/* body.floorplanOverlay.floorplanOverlayOpen .floorplanContainer {
  transition: all 1s ease !important;
  transform: translateY(0%) !important;
} */

.floorplanContainer::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: blur(10px);
  z-index: 0;
}

.floorplanContainer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  background-color: var(--floorplan-bg);
  z-index: 1;
}

body.floorplanOverlay .floorplanContainer::after {
  background-color: var(--floorplan-overlay-bg);
  backdrop-filter: var(--floorplan-overlay-backdrop-filter);
}

.floorplanContainer > * {
  position: relative;
  z-index: 2;
}

.floorplanContainer[data-loading] > div {
  opacity: 0.5 !important;
  pointer-events: none !important;
}

.floorplanBackToAllUnits {
  position: relative;
  margin-right: auto;
  margin-left: calc(var(--fpLegendWidth) + 50px);
}

body.floorplanOverlay .floorplanBackToAllUnits {
  position: absolute;
  top: 10px;
  z-index: 3;
}

.fpDownloadButton {
  padding: max(1rem, 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floorplanBackToAllUnits i {
  font-size: 1rem;
  margin-right: 0.3rem;
  vertical-align: middle;
  color: lightgray !important;
}

/* Units */
.unitsControl,
.unitsContainer {
  position: relative;
  top: 0;
  height: 100%;
}

.unitsControl {
  width: auto;
  left: 0;
  display: flex;
  overflow-y: auto;
  background-image: radial-gradient(
    ellipse at right,
    #ffffff10 0%,
    transparent 50%
  );
  margin-left: 40px;
}
body.floorplanOverlay .unitsControl {
  margin-left: 0;
}

.unitsControl > div {
  position: relative;
}

.unitsContainer {
  width: var(--fpUnitsWidth);
  right: 0;
  overflow: hidden;
  opacity: 0;
  background: white;
}

.unitsContainer .floorSwitcher {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  transition: opacity 0.2s ease;
  max-width: calc(100% - 48px);
}

body.floorplanOverlay .unitsContainer .floorSwitcher {
  bottom: 10px;
}

body.floorplanUnitView .unitsContainer .floorSwitcher {
  opacity: 0;
  pointer-events: none;
}

/* Floor Switcher */
.floorSwitcherWrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  background-color: var(--fp-floorswitcher-bg);
  border-radius: var(--container-border-radius);
}

.floorSwitcherLabel {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: max(0.85rem, 12px);
  font-family: var(--font-base);
  font-weight: var(--font-base-weight);
  color: var(--fp-floorswither-label-text);
  opacity: 1;
  font-weight: 700;
  padding-left: 0.5em;
}

.floorSwitcherBtn {
  display: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  box-shadow: var(--fpButtonOutline);
  transition: var(--fpButtonHoverTransition);
  background-color: var(--fp-floorswitcher-arrow-bg);
}

.floorSwitcherWrap.hasOverflow .floorSwitcherBtn {
  display: block;
}

.floorSwitcherBtn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.floorSwitcherBtn:before {
  content: "";
  background-color: var(--fp-floorswitcher-arrow-text);
  -webkit-mask-image: var(--fpNextButtonIcon);
  mask-image: var(--fpNextButtonIcon);
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 9px;
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  -webkit-mask-size: 9px;
  mask-size: 9px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.floorSwitcherBtn[data-scroll-direction="prev"]:before {
  -webkit-mask-image: var(--fpPrevButtonIcon);
  mask-image: var(--fpPrevButtonIcon);
  background-image: none;
}

body.hasHover .floorSwitcherBtn:not(.disabled):hover {
  background: var(--fp-floorswitcher-arrow-hover-bg);
  box-shadow: var(--fpButtonHoverOutline);
}
body.hasHover .floorSwitcherBtn:not(.disabled):hover::before {
  background: var(--fp-floorswitcher-arrow-hover-text);
}

.floorSwitcherViewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.floorSwitcherViewport::-webkit-scrollbar {
  display: none;
}

.floorSwitcherWrap.isDragging .floorSwitcherViewport {
  cursor: grabbing;
}

.floorSwitcherTrack {
  display: flex;
  gap: 4px;
  padding: 4px;
  width: max-content;
}

.floorSwitcherItem {
  flex-shrink: 0;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  padding: 0.6em 0.8em;
  line-height: 1;
  border-radius: 999px;
  font-size: max(0.85rem, 12px);
  font-family: var(--font-base);
  font-weight: var(--font-base-weight);
  color: var(--fp-floorswitcher-item-text);
  opacity: 0.8;
  background: var(--fp-floorswitcher-item-bg);
  transition: var(--fpButtonHoverTransition);
}

body.hasHover .floorSwitcherItem:hover {
  opacity: 1;
  color: var(--fp-floorswitcher-item-hover-text);
  background: var(--fp-floorswitcher-item-hover-bg);
  box-shadow: var(--fp-floorswitcher-item-hover-shadow);
}

.floorSwitcherItem.active {
  opacity: 1;
  background: var(--fp-floorswitcher-item-active-bg);
  box-shadow: var(--fp-floorswitcher-item-active-shadow);
  color: var(--fp-floorswitcher-item-active-text);
  cursor: default;
}

.unitsContainer > svg {
  width: 100%;
  height: 100%;
  padding: 6.5rem 3rem 5rem 3rem;
  padding: 0;
  mask-image:
    linear-gradient(
      to bottom,
      transparent 0%,
      black 80px,
      black calc(100% - 80px),
      transparent 100%
    ),
    linear-gradient(
      to right,
      #00000010 0%,
      black 10%,
      black calc(100% - 10%),
      transparent 100%
    );
  mask-composite: intersect;
}

.unitsContainer #units > * {
  transition: fill-opacity 0.2s ease;
  fill-opacity: 0.5;
  cursor: pointer;
  fill: #333;
}

.unitsContainer svg.floorSvg > *:not(image) {
  mix-blend-mode: screen;
}

body.hasHover .unitsContainer #units > *:hover {
  fill-opacity: 1;
}

/* Units */

/* Legend */
.unitsControl .legend {
  width: var(--fpLegendWidth);
  height: calc(100% - var(--footerHeight) - var(--headerHeight));
  top: var(--headerHeight);
  padding: 0 0.2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
body.floorplanOverlay .unitsControl .legend {
  height: 100%;
  top: 0;
}

.unitsControl .legend > * {
  position: relative;
}

.unitsControl .legend .disclaimer {
  font-size: 0.8em;
  opacity: 0.7;
  user-select: none;
  transition: opacity 0.2s;
  padding: 0 1rem 0;
  color: rgba(255, 255, 255, 0.3);
  margin: auto 0 0 0;
}
body.floorplanOverlay .unitsControl .legend .disclaimer {
  margin-bottom: 1rem;
}
.unitsControl .legend .disclaimer:hover {
  opacity: 1;
}

/* Specs */
.unitsControl .legend .spec {
  flex-wrap: wrap;
  display: flex;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 1s ease;
}

.unitsControl .legend .spec.active {
  height: auto;
  opacity: 1;
}

.unitsControl .legend .spec .statusValue {
  width: auto !important;
  padding: 0;
  border-radius: 1rem;
  margin-left: auto;
  font-family: var(--font-base);
  font-weight: var(--font-accent-weight) !important;
  font-size: max(0.9rem, 12px) !important;
  padding: 0.2em 1em;
  text-shadow: 0 0 5px rgba(0, 0, 0, 1);
  white-space: nowrap;
}

.unitsControl .legend .spec > div {
  padding: 0.75rem;
  position: relative;
  width: 100%;
  border-bottom: solid 1px var(--floorplan-values-border);
  display: flex;
  color: var(--floorplan-text);
  opacity: 0.8;
  transition: background-color 0.2s ease;
  font-family: var(--font-base);
  font-weight: var(--font-base-weight);
  border-radius: var(--container-border-radius);
}

.unitsControl .legend .spec > div:first-child {
  font-family: var(--font-accent);
  border-bottom: 1px solid #8873612e;
}

body.hasHover .unitsControl .legend .spec > div:hover {
  user-select: none;
  transition: background-color 0s;
  background-color: var(--floorplan-values-hover-bg) !important;
}

.unitsControl .legend .spec > div > div {
  width: 50%;
  position: relative;
}

.unitsControl .legend .spec > div > div:nth-child(2n + 0) {
  text-align: right;
  font-size: max(0.8rem, 12px);
  color: var(--floorplan-values);
  font-weight: var(--font-accent-weight);
}

.unitsControl .legend .spec > div > div:nth-child(2n + 1) {
  font-weight: 400;
  white-space: nowrap;
  font-size: max(0.8rem, 12px);
}

/* Specs */

/* Switcher */
.switcher {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  align-items: center;
  margin-bottom: max(2rem, 20px);
  margin-top: max(1rem, 16px);
}

.switcher .switcherNumber {
  font-size: max(1.75rem, 20px);
  padding: 0.5em 0;
  color: var(--floorplan-text);
  font-weight: var(--font-accent-weight);
  font-family: var(--font-accent);
  min-width: 86px;
  width: fit-content;
  text-align: center;
}

.switcherButton {
  width: 4rem;
  height: 2rem;
  border-radius: 4px;
  transition: var(--fpButtonHoverTransition);
  cursor: pointer;
  box-shadow: var(--fpButtonOutline);
  position: relative;
  background-color: var(--fpButtonBackground);
}

.switcherButton.disabled {
  pointer-events: none;
  opacity: 0.5;
}

.switcherButton:before {
  content: "";
  background-color: var(--fpButtonText);
  -webkit-mask-image: var(--fpNextButtonIcon);
  mask-image: var(--fpNextButtonIcon);
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  display: block;
  width: 100%;
  height: 100%;
  width: 1em;
  height: 1em;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.switcherButton:nth-child(1):before {
  -webkit-mask-image: var(--fpPrevButtonIcon);
  mask-image: var(--fpPrevButtonIcon);
  background-image: none;
}

body.hasHover .switcherButton:hover {
  background: var(--fpButtonHoverBackground);
  box-shadow: var(--fpButtonHoverOutline);
}
body.hasHover .switcherButton:hover::before {
  background-color: var(--fpButtonHoverText);
}

.filterItem i,
.filterItem[data-filter="all"] i {
  box-shadow: 0 0 0 2px var(--status-all);
}

/* Filters */
.filters {
  display: flex;
  flex-direction: column;
  gap: max(1.2rem, 14px);
  margin-top: 1.25rem;
}

.filterContainer {
  display: flex;
  justify-content: start;
  padding: 1rem 0.5rem;
  font-family: var(--font-base);
  font-size: max(1rem, 16px);
  flex-direction: column;
  align-items: center;
}

.filterTitle {
  font-size: max(1rem, 16px);
  font-weight: var(--font-accent-weight);
  font-family: var(--font-accent);
}

.filterContainer .filterItem {
  color: var(--floorplan-text);
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
  text-align: left;
  font-size: max(0.9rem, 14px);
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
}

.filterContainer .filterItem i {
  display: inline-block;
  width: max(0.9rem, 14px);
  height: max(0.9rem, 14px);
  border-radius: 50%;
  margin-right: max(0.5rem, 8px);
  vertical-align: middle;
}
.filterItem.active i,
.filterItem.active[data-filter="all"] i {
  background-color: var(--status-all);
}

body.hasHover .filterContainer .filterItem:hover,
.filterContainer .filterItem.active {
  color: var(--floorplan-text-active);
}

/* Pinch to zoom */
.panoStartAnimation-pinch {
  position: absolute;
  z-index: 100;
  display: block;
  left: calc(50% - 150px);
  width: 300px;
  height: 300px;
  top: calc(50% - 150px);
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  font-weight: 500;
  transform-origin: bottom;
  pointer-events: none !important;
  opacity: 0;
  transform: scale(0) translateY(100%);
  transform: scale(0.9) translateY(0);
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: radial-gradient(#00000080 10%, transparent 50%);
}

.panoStartAnimation-pinch > img {
  width: 60px;
  display: block;
  margin: 0 auto 0.5rem auto;
}

/* visible state */
.hintAnimationStart {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
}

/* UI Change with Overlay open-close */
body.floorplanOverlay header,
body.floorplanOverlay footer {
  transition: all 0.3s ease;
}
body.floorplanOverlay.floorplanOverlayOpen header,
body.floorplanOverlay.floorplanOverlayOpen footer {
  opacity: 0;
  transform: translateY(-100%);
}
body.floorplanOverlay.floorplanOverlayOpen footer {
  transform: translateY(100%);
}
body .floorViewCloseButton {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  z-index: 21;
}
.unitsControl .legend > .buttonSecondary,
.unitsControl .legend > .buttonPrimary {
  margin: 0 auto;
}
