/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Unique selling proposition SDC
*
*   TABLE OF CONTENTS
*   layout options
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   clamped
*
*   Clamps an output value between a min & max value
*   and interpolates the "preferred" value based on the
*   slope between the breakpoints at which the min/max
*   value should be used as the cut-off.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   rem
*
*   Converts a pixel value to rems.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #rem
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   rnd
*
*   Built-in Sass math:round (and ceil/floor) functions
*   result in whole numbers only.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #rnd
*  -------------------------------------------------- */
/** --------------------------------------------------
*   #clamped
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   iff
*
*   Syntactic sugar around Sass' built-in `if` function that
*   does not require you to pass a value for `$if-false`.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #iff
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   implode
*
*   Variant of PHP array implode to convert list items into a string
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #implode
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   internal media query helpers to help convert & interpret MQ's
*
*   TABLE OF CONTENTS
*   mq
*   interpret-features
*   breakpoint-lookup
*   media-concatenate
*   convert units
*
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   strip-unit
*
*   Strips the unit of input and returns just the numerical value.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #strip-unit
*  -------------------------------------------------- */
/** --------------------------------------------------
*   #mq [internal function]
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #interpret-features [internal function]
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #breakpoint-lookup
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #media-concatenate
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #convert units
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   space
*
*   Returns the min or max value for a given key on
*   the size scale. Defaults to min (mobile first).
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / FUNCTIONS
*   token
*
*   Checks the design token maps for a given entry
*   and returns the result.
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   COLOR DESIGN TOKENS
*   These should never be used directly for styling.
*   Use abstractions in /variables/colors or components instead.
*
*   TABLE OF CONTENTS
*   color tokens
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   SIZE SCALE DESIGN TOKENS
*   These represent the mobile & desktop device size scale
*   from the Figma file as a min/max value per scale entry.
*   We cannot simply override the properties at a certain
*   breakpoint as this clashes with the component (container)
*   implementation.
*   By adding these tokens, we can at least maintain the naming
*   and values from the Figma file for easier reference without
*   having to resort to manually entering unrelated spacing units
*   all throughout the project.
*
*   TABLE OF CONTENTS
*   size scale tokens
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   TYPOGRAPHY DESIGN TOKENS
*   These should never be used directly for styling.
*   Use abstractions in /variables/font-styles instead.
*
*   TABLE OF CONTENTS
*   typographic tokens
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #token
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #space
*  -------------------------------------------------- */
/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Unique selling proposition SDC
*
*   TABLE OF CONTENTS
*   layout options
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   VARIABLES
*   breakpoints
*
*   INFO
*   breakpoint configuration:
*   - $mq-breakpoints is a list of breakpoints which
*     can be entered in px (recommended), em or rem.
*     Output will always be in em units.
*     Order of the breakpoints in the list does not matter.
*   - $mq-presets is an (optional) list of frequent combos
*
*   SDC
*   Try to minimise the use of breakpoints inside SDC component
*   styles. Container Queries are preferred so the components
*   can adjust themselves without needing awareness of their context.
*   (For instance: on a page with sidebar vs full width)
*
*   TABLE OF CONTENTS
*   custom breakpoints
*   frequently used presets
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #custom breakpoints
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #frequently used presets
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Unique selling proposition SDC
*
*   TABLE OF CONTENTS
*   layout options
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   queries
*
*   INFO
*   Media query mixins to be called directly or with
*   predefined keys configured in [variables/breakpoints]
*   +
*   basic container query mixin (inline-size, width > x)
*   sharing the same breakpoints and conversion logic as our
*   media query mixin
*
*   TABLE OF CONTENTS
*   fallback defaults
*   mq
*   mqset
*   cq
*
*  -------------------------------------------------- */
/** --------------------------------------------------
*   #fallback defaults
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #mq
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #mqset
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #cq
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   create button variants
*
*   INFO
*   Mixin to generate all button variant & style combos.
*
*   TABLE OF CONTENTS
*   create-button-variants
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #create-button-variants
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   tokens to custom property
*
*   INFO
*   Mixin to include all typographic related rules
*   based on a given token. Includes fluid type scale.
*
*   TABLE OF CONTENTS
*   tokens-to-custom-property
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #tokens-to-custom-property
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Unique selling proposition SDC
*
*   TABLE OF CONTENTS
*   layout options
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   typography
*
*   INFO
*   Mixin to include all typographic related rules
*   based on a given token. Includes fluid type scale.
*
*   TABLE OF CONTENTS
*   font-styles
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*   #font
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Unique selling proposition SDC
*
*   TABLE OF CONTENTS
*   layout options
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   visually hidden
*
*   TABLE OF CONTENTS
*   visually hidden
*   visually hidden - focusable
*
*  -------------------------------------------------- */
/** --------------------------------------------------
*  #visually hidden
*  -------------------------------------------------- */
/** --------------------------------------------------
*  #visually hidden - focusable
*  -------------------------------------------------- */
.sdc--type-floorplan .inner-wrapper {
  --sdc-padding-block: 3rem;
  --sdc-subtitle-space: 0.25rem;
  --sdc-text-space: 0.375rem;
  --sdc-map-space: 2.5rem;
  --sdc-padding-block-map: 1rem;
}

@container floorplan (width > 48em) {
  .sdc--type-floorplan .inner-wrapper {
    --sdc-padding-block: 5rem;
    --sdc-subtitle-space: 1rem;
    --sdc-text-space: 1.5rem;
    --sdc-map-space: 3.5rem;
    --sdc-padding-block-map: 3rem;
  }
}
/** --------------------------------------------------
*   #layout options
*   -------------------------------------------------- */
.sdc--type-floorplan {
  position: relative;
  z-index: 120;
  grid-template-rows: auto auto;
}
.sdc--type-floorplan .sdc-inner--floorplan {
  grid-row: 1 !important;
}
.sdc--type-floorplan .map__container {
  grid-row: 2;
}
.sdc--type-floorplan .floorplan-cq {
  container: floorplan/inline-size;
}

.sdc-inner--floorplan .inner-wrapper {
  padding-block-start: var(--sdc-padding-block);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.sdc-inner--floorplan .inner-wrapper .content {
  grid-column: 1/span 12;
}
.sdc-inner--floorplan .inner-wrapper:has(.sdc-inner--action-bar:empty) .sdc--type-action-bar {
  display: none;
}

.sdc--type-floorplan .map {
  position: relative;
  display: grid;
  grid-template-columns: subgrid;
}
.sdc--type-floorplan .map__markers {
  position: relative;
  grid-row: 1/3;
  pointer-events: none;
  grid-column: 1/-1;
}
.sdc--type-floorplan .map__markers > .map__item {
  pointer-events: auto;
}
.sdc--type-floorplan .map__markers > .map__item .map__popup {
  opacity: 1;
}
.sdc--type-floorplan .map__container {
  width: 100%;
  position: relative;
  overflow: hidden;
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: subgrid;
}
.sdc--type-floorplan .map__container .map__image-container {
  grid-column: 1/-1;
}
.sdc--type-floorplan .map__container .map__image-container .map__image-wrapper {
  overflow: visible !important;
}
.sdc--type-floorplan .map__container .map__zoom {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1;
  display: flex;
  flex-flow: row-reverse nowrap;
  gap: 1rem;
  /* Init all the conversion and processing of input and config values */
  /* Use the media query strings from map above to output the CSS rules */
}
@media all and (min-width: 48em) {
  .sdc--type-floorplan .map__container .map__zoom {
    top: 3rem;
    right: 3rem;
  }
}
.sdc--type-floorplan .map__container .map__zoom .map__zoomin,
.sdc--type-floorplan .map__container .map__zoom .map__zoomout {
  cursor: pointer;
}
.sdc--type-floorplan .map__container .map__zoom .map__zoomin > *,
.sdc--type-floorplan .map__container .map__zoom .map__zoomout > * {
  pointer-events: none;
}
.sdc--type-floorplan .map__container .map__image {
  width: auto;
  height: auto;
  max-height: auto;
  min-width: 100%;
  position: relative;
}
.sdc--type-floorplan .map__container .map__image > img {
  width: 100%;
}
.sdc--type-floorplan .map__container .map__item {
  width: 3rem;
  height: 3rem;
  margin-inline-start: -1.5rem;
  margin-block-start: -3rem;
  position: absolute;
  pointer-events: none;
  background-image: url("../../img/theme/floorplan-marker.svg");
  background-color: transparent;
  background-position: left top;
  background-repeat: no-repeat;
}
.sdc--type-floorplan .map__container .popup--visible {
  z-index: 100;
}
.sdc--type-floorplan .map__container .popup--visible .map__popup {
  display: block;
}
.sdc--type-floorplan .map__container .leaflet-marker-pane img {
  width: 3rem !important;
  height: 3rem !important;
  margin-inline-start: -1.5rem !important;
  margin-block-start: -3rem !important;
}
.sdc--type-floorplan .map__container__map,
.sdc--type-floorplan .map__container__map .placeholder {
  width: 100%;
  overflow: hidden;
}
.sdc--type-floorplan .map__container__map .placeholder {
  margin-block-start: 40px;
}
@container locations (width > 48em) {
  .sdc--type-floorplan .map__container__map .placeholder {
    margin-block-start: 0;
  }
}
.sdc--type-floorplan .map__item {
  width: 3rem;
  height: 3rem;
  margin-inline-start: -1.5rem;
  margin-block-start: -3rem;
  background-color: transparent;
  background-position: left top;
  position: absolute;
}
.sdc--type-floorplan .map__popup {
  width: 18.75rem;
  max-width: 18.75rem;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: none;
}
.sdc--type-floorplan .popup--visible {
  z-index: 100;
}
.sdc--type-floorplan .popup--visible .map__popup {
  display: block;
}

.map__popup--close {
  --size: 1.5rem;
  width: var(--size);
  height: var(--size);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  cursor: pointer;
}
.map__popup--close::before {
  content: "";
  width: var(--size);
  height: var(--size);
  display: block;
  background-color: white;
  mask-image: url("../../../img/icons/close.svg");
  mask-repeat: no-repeat;
  mask-position: center center;
  mask-size: var(--size) var(--size);
}

.sdc-floorplan__title {
  font-size: clamp(1.125rem, 2.5cqi + 0.38rem, 2.25rem);
}

.popup__overlay {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, 0.3);
}
.show--popup .popup__overlay {
  display: block;
  overflow: hidden;
}
