/** --------------------------------------------------
*
*   COMPONENTS / CONTENT BLOCKS
*   Media with Text SDC
*
*   TABLE OF CONTENTS
*   component properties
*   component spacing
*   layout 1/2 media size
*   layout 1/3 media size
*   layout 2/3 media size
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   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
*   Media with Text SDC
*
*   TABLE OF CONTENTS
*   component properties
*   component spacing
*   layout 1/2 media size
*   layout 1/3 media size
*   layout 2/3 media size
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   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
*   Media with Text SDC
*
*   TABLE OF CONTENTS
*   component properties
*   component spacing
*   layout 1/2 media size
*   layout 1/3 media size
*   layout 2/3 media size
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   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
*   Media with Text SDC
*
*   TABLE OF CONTENTS
*   component properties
*   component spacing
*   layout 1/2 media size
*   layout 1/3 media size
*   layout 2/3 media size
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   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
*   Media with Text SDC
*
*   TABLE OF CONTENTS
*   component properties
*   component spacing
*   layout 1/2 media size
*   layout 1/3 media size
*   layout 2/3 media size
*
*   -------------------------------------------------- */
/** --------------------------------------------------
*
*   BASE / UTILS
*   visually hidden
*
*   TABLE OF CONTENTS
*   visually hidden
*   visually hidden - focusable
*
*  -------------------------------------------------- */
/** --------------------------------------------------
*  #visually hidden
*  -------------------------------------------------- */
/** --------------------------------------------------
*  #visually hidden - focusable
*  -------------------------------------------------- */
/** --------------------------------------------------
*   #component properties
*   -------------------------------------------------- */
.sdc--type-media-with-text .sdc-inner-container {
  --sdc-padding-block: var(xxx-large);
  --sdc-padding-block: 1.25rem;
  --sdc-subtitle-space: 0.5rem;
  --sdc-text-space: 0.75rem;
  --sdc-actions-space: 1.25rem;
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text .sdc-inner-container {
    --sdc-padding-block: var(--component-section-padding-topbot-max);
    --sdc-subtitle-space: 1rem;
    --sdc-text-space: 1.5rem;
    --sdc-actions-space: 2.5rem;
  }
}

/** --------------------------------------------------
*   #component spacing
*   -------------------------------------------------- */
.media-with-text-cq {
  container: media-with-text/inline-size;
}
.media-with-text-cq .sdc-inner-container {
  padding-block: var(--sdc-padding-block);
}

.sdc--type-media-with-text .text-content {
  max-width: var(--text-width);
}
.sdc--type-media-with-text .text-content > .title {
  font-size: clamp(1.75rem, 1.667vw + 1.25rem, 2.5rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.2;
}
.sdc--type-media-with-text .text-content > .subtitle {
  font-size: clamp(1rem, 0.278vw + 0.92rem, 1.125rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}
.sdc--type-media-with-text .text-content > .subtitle:is(* + *) {
  margin-top: var(--sdc-subtitle-space);
}
.sdc--type-media-with-text .text-content > .text {
  font-size: clamp(0.875rem, 0.278vw + 0.79rem, 1rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}
.sdc--type-media-with-text .text-content > .text:is(* + *) {
  margin-top: var(--sdc-text-space);
}
.sdc--type-media-with-text .text-content > .sdc--type-action-bar:is(* + *) {
  margin-top: var(--sdc-actions-space);
}

/** --------------------------------------------------
*   #layout 1/2 media size
*   -------------------------------------------------- */
.sdc--type-media-with-text {
  --radius: var(--radius-image);
}
.sdc--type-media-with-text .media-content {
  width: 100%;
  height: max-content !important;
}
.sdc--type-media-with-text .media-content picture img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.sdc--type-media-with-text .media-content .field--name-field-media-oembed-video {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  position: relative;
}
.sdc--type-media-with-text .media-content .field--name-field-media-oembed-video iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.sdc--type-media-with-text .media-content .field--name-field-media-video-file {
  width: 100%;
  position: relative;
}
.sdc--type-media-with-text .media-content .field--name-field-media-video-file video {
  max-width: 100%;
  height: auto;
}
.sdc--type-media-with-text .media-content .field--name-field-media-video-file button {
  width: 4rem;
  aspect-ratio: 1/1;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  border: 0;
  outline: 0.125rem solid var(--color-fills-brand-accent2-base);
  outline-offset: 0.25rem;
  background-color: rgba(255, 255, 255, 0.8);
  background-size: 1.375rem;
}
.sdc--type-media-with-text .media-content .field--name-field-media-video-file button:hover, .sdc--type-media-with-text .media-content .field--name-field-media-video-file button:focus-visible {
  opacity: 1;
  outline-offset: 0;
}
.sdc--type-media-with-text .media-content .field--name-field-media-video-file:hover button {
  opacity: 1;
}
.sdc--type-media-with-text:has(.sdc-inner--action-bar:empty) .sdc--type-action-bar {
  display: none;
}
.sdc--type-media-with-text.media-text--left.media-text--media-1-2 .sdc-inner-container {
  --sdc-col-gap: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--left.media-text--media-1-2 .sdc-inner-container {
    --sdc-col-gap: 3.5rem;
    grid-template-columns: 1fr 1fr;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-1-2 .sdc-inner-container .media-content {
    order: 9;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-1-2 .sdc-inner-container .text-content {
    align-self: center;
  }
}
.sdc--type-media-with-text.media-text--right.media-text--media-1-2 .sdc-inner-container, .sdc--type-media-with-text.default .sdc-inner-container {
  --sdc-col-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--right.media-text--media-1-2 .sdc-inner-container, .sdc--type-media-with-text.default .sdc-inner-container {
    --sdc-col-gap: var(--gutter);
    grid-template-columns: 1fr 1fr;
  }
  .sdc--type-media-with-text.media-text--right.media-text--media-1-2 .sdc-inner-container .text-content, .sdc--type-media-with-text.default .sdc-inner-container .text-content {
    padding-inline-start: 2.5rem;
    align-self: center;
  }
}

/** --------------------------------------------------
*   #layout 1/3 media size
*   -------------------------------------------------- */
.sdc--type-media-with-text.media-text--left.media-text--media-1-3 .sdc-inner-container {
  --sdc-col-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--left.media-text--media-1-3 .sdc-inner-container {
    --sdc-col-gap: var(--gutter);
    grid-template-columns: 2fr 1fr;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-1-3 .sdc-inner-container .media-content {
    order: 9;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-1-3 .sdc-inner-container .text-content {
    padding-inline-end: 2.5rem;
    align-self: center;
  }
}
.sdc--type-media-with-text.media-text--right.media-text--media-1-3 .sdc-inner-container {
  --sdc-col-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--right.media-text--media-1-3 .sdc-inner-container {
    --sdc-col-gap: var(--gutter);
    grid-template-columns: 1fr 2fr;
  }
  .sdc--type-media-with-text.media-text--right.media-text--media-1-3 .sdc-inner-container .text-content {
    padding-inline-start: 2.5rem;
    align-self: center;
  }
}

/** --------------------------------------------------
*   #layout 2/3 media size
*   -------------------------------------------------- */
.sdc--type-media-with-text.media-text--left.media-text--media-2-3 .sdc-inner-container {
  --sdc-col-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--left.media-text--media-2-3 .sdc-inner-container {
    --sdc-col-gap: var(--gutter);
    grid-template-columns: 1fr 2fr;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-2-3 .sdc-inner-container .media-content {
    order: 9;
  }
  .sdc--type-media-with-text.media-text--left.media-text--media-2-3 .sdc-inner-container .text-content {
    padding-inline-end: 2.5rem;
    align-self: center;
  }
}
.sdc--type-media-with-text.media-text--right.media-text--media-2-3 .sdc-inner-container {
  --sdc-col-gap: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sdc-col-gap);
}
@container media-with-text (width > 48em) {
  .sdc--type-media-with-text.media-text--right.media-text--media-2-3 .sdc-inner-container {
    --sdc-col-gap: var(--gutter);
    grid-template-columns: 2fr 1fr;
  }
  .sdc--type-media-with-text.media-text--right.media-text--media-2-3 .sdc-inner-container .text-content {
    padding-inline-start: 2.5rem;
    align-self: center;
  }
}
