/* ==========================================================================
   info_media – image frame of an image slot of the public pages (T275/T278):
   rounded frame (radius 40) with a fixed aspect ratio, the image covers it
   (object-fit, centred crop), glass overlay capsule, a stack of pictures that
   change (T343/T519: the hero of the product page), the large view (T335) and
   "Sich umsehen" (T335). data-slot names the slot that the platform
   administration replaces (config/info.images.php). T519: pills, shade and the
   cross-fade of the former tabs "Viele Perspektiven" are gone. T520: the stack is
   a carousel – swipe / drag (info_media_stack_swipe, _dragging, _settling) and
   the dots with the fill of the current picture (info_media_dots, moved here
   from info_product).
   ========================================================================== */
.info_media { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius-xl); overflow: hidden; background: var(--q-highlight-4); box-shadow: var(--shadow-card); }
.info_media_5x4 { aspect-ratio: 5 / 4; }
.info_media_16x10 { aspect-ratio: 16 / 10; }
.info_media_16x11 { aspect-ratio: 16 / 11; } /* T519: the promises of the product page */
.info_media_21x9 { aspect-ratio: 21 / 9; min-height: 280px; }
.info_media_4x5 { aspect-ratio: 4 / 5; max-height: 640px; }
.info_media_4x3 { aspect-ratio: 4 / 3; }
.info_media_on_dark { background: rgba(255, 255, 255, .08); box-shadow: none; }
.info_media_image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* glass capsule with symbol and text (e.g. "Ziehen, wischen oder Gerät bewegen …") */
.info_media_overlay { position: absolute; left: 18px; bottom: 18px; right: 18px; width: fit-content; max-width: calc(100% - 36px); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px 8px 8px; border-radius: var(--radius-xl); background: rgba(255, 255, 255, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; }
.info_media_overlay_icon { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--q-highlight-2); color: var(--q-white); display: flex; align-items: center; justify-content: center; }
.info_media_overlay_icon .info_page_icon { width: 16px; height: 16px; -webkit-mask-size: 16px; mask-size: 16px; }
.info_media_overlay_text { font-size: var(--fs-13); font-weight: var(--w-bold); color: var(--q-highlight-2); }

/* T343: info_media_stack – several pictures on top of each other, the current one fades in (T519: the hero of the
   product page with its dots) */
.info_media_stack .info_media_image { opacity: 0; transition: opacity 900ms var(--ease-std); }
.info_media_stack .info_media_image_current { opacity: 1; }
/* T520: swipe with a finger / drag with the mouse – the page still scrolls up and down (pan-y); while dragging the
   pictures follow the pointer (transform from info.js), afterwards they glide to their place */
.info_media_stack_swipe { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.info_media_stack_swipe .info_media_image { -webkit-user-drag: none; }
@media (hover: hover) and (pointer: fine) { .info_media_stack_swipe { cursor: grab; } }
.info_media_stack_dragging { cursor: grabbing; }
.info_media_stack_dragging .info_media_image { transition: none; }
.info_media_stack_settling .info_media_image { transition: transform 300ms var(--ease-std); }

/* T519/T520: glass capsule with the name of the current picture and one dot per picture – the current one long and
   navy; while the carousel plays it fills over the interval (--info-media-interval from data-interval) and the end of
   the fill brings the next picture (animationend in info.js). The fill is a whole rounded bar that slides in from the
   left (translateX), starting as a round dot of the height – the track clips it, so both ends stay round all the time
   (scaleX squeezed the round end flat) */
.info_media_dots { position: absolute; left: 18px; bottom: 18px; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 16px; border-radius: var(--radius-xl); background: rgba(255, 255, 255, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: auto; }
/* T528: a carousel of one slot – dots without a name */
.info_media_dots_bare { padding-left: 8px; }
.info_media_dots_label[hidden] { display: none; } /* T530: a picture without a caption */
.info_media_dots_label { min-width: 96px; font-size: var(--fs-13); font-weight: var(--w-bold); color: var(--q-highlight-2); }
.info_media_dot { width: 32px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: var(--radius-pill); background: transparent; cursor: pointer; }
.info_media_dot:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.info_media_dot_mark { position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: var(--radius-pill); background: rgba(16, 49, 78, .35); transition: width var(--dur-base) ease, background var(--dur-base) ease; }
.info_media_dot[aria-pressed="true"] .info_media_dot_mark { width: 26px; background: var(--q-highlight-2); }
.info_media_stack_playing .info_media_dot[aria-pressed="true"] .info_media_dot_mark { background: rgba(16, 49, 78, .25); }
.info_media_stack_playing .info_media_dot[aria-pressed="true"] .info_media_dot_mark::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 26px; border-radius: inherit; background: var(--q-highlight-2); transform: translateX(-18px);
  animation: info_media_dot_fill var(--info-media-interval, 6s) linear forwards;
}
.info_media_stack_paused .info_media_dot_mark::after { animation-play-state: paused; }
/* T522: fixed pixels (the long dot is 26 px, the dot 8 px) – WebKit resolves a percentage of an animated transform only once
   at the start, while the dot is still growing from 8 to 26 px, so the bar looked full from the second picture on */
@keyframes info_media_dot_fill { from { transform: translateX(-18px); } to { transform: translateX(0); } }

/* T335: large view – the interactive layer over the picture (component image_zoom opens), magnifier top right */
.info_media_zoom { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 0; border: none; border-radius: inherit; background: none; cursor: zoom-in; }
.info_media_zoom:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--q-highlight-3); }
.info_media_zoom_icon {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: scale(.9); transition: opacity var(--dur-base) ease, transform var(--dur-base) ease;
}
.info_media_zoom_icon::before { content: ""; position: absolute; inset: 12px; background: var(--q-highlight-2); -webkit-mask: url("../../assets/icons/expand_dark.svg") center / contain no-repeat; mask: url("../../assets/icons/expand_dark.svg") center / contain no-repeat; }
.info_media_zoom:hover .info_media_zoom_icon, .info_media_zoom:focus-visible .info_media_zoom_icon { opacity: 1; transform: none; }
@media (hover: none) { .info_media_zoom_icon { opacity: 1; transform: none; } } /* touch: always visible */
/* T528: in a carousel only the magnifier is the button (top right) – swipe, drag and dots stay free; always visible */
.info_media_zoom_corner { inset: 14px 14px auto auto; width: 40px; height: 40px; border-radius: 50%; }
.info_media_zoom_corner .info_media_zoom_icon { top: 0; right: 0; opacity: 1; transform: none; }
.info_media_zoom_corner:focus-visible { box-shadow: var(--shadow-focus); }

/* T335: "Sich umsehen" (data-look) – drag / swipe, keys, motion. T408: every gesture inside the frame belongs to the view –
   looking up or down never scrolls the page (touch-action none, no scroll chaining; wheel and keys handled in info.js) */
.info_media_look { touch-action: none; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; cursor: grab; }
.info_media_look:focus-visible { outline: none; box-shadow: var(--shadow-card), 0 0 0 3px var(--q-highlight-3); }
.info_media_look_dragging { cursor: grabbing; }
.info_media_look_image { inset: auto; left: 0; top: 0; max-width: none; object-fit: fill; will-change: transform; -webkit-user-drag: none; pointer-events: none; }
.info_media_look_sphere .immersive_viewer_canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.info_media_look .info_media_overlay { z-index: 1; }
.info_media_look_control {
  pointer-events: auto; border: none; border-radius: var(--radius-pill); padding: 7px 14px; cursor: pointer; font: inherit; font-size: var(--fs-12); font-weight: var(--w-bold);
  background: rgba(255, 255, 255, .75); color: var(--q-highlight-2); transition: background var(--dur-base) ease, color var(--dur-base) ease;
}
.info_media_look_control[aria-pressed="true"] { background: var(--q-highlight-2); color: var(--q-white); }
.info_media_look_control:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* T357: the hint on one line – the symbol shows the controls as a card above it */
.info_media_look_overlay { flex-wrap: nowrap; }
.info_media_look_overlay .info_media_overlay_text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info_media_look_overlay .info_media_look_control { flex: none; white-space: nowrap; }
.info_media_look_toggle { position: relative; pointer-events: auto; border: none; padding: 0; cursor: pointer; transition: background var(--dur-base) ease, box-shadow var(--dur-base) ease; }
.info_media_look_toggle::after { content: "?"; position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; background: var(--q-white); color: var(--q-highlight-2); font: inherit; font-size: 10px; font-weight: var(--w-bold); line-height: 15px; text-align: center; }
.info_media_look_toggle[aria-expanded="true"]::after { content: "×"; font-size: 12px; }
.info_media_look_toggle:hover { background: var(--q-highlight-3); }
.info_media_look_toggle:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.info_media_look_help {
  position: absolute; left: 0; bottom: calc(100% + 8px); width: max-content; max-width: min(320px, calc(100vw - 72px)); pointer-events: auto; cursor: auto;
  padding: 12px 16px 14px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--q-highlight-2); box-shadow: var(--shadow-card); animation: info_media_look_help_in var(--dur-base) ease;
}
.info_media_look_help[hidden] { display: none; }
.info_media_look_help_title { margin: 0 0 6px; font-size: var(--fs-13); font-weight: var(--w-bold); }
.info_media_look_help_items { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: var(--fs-13); }
.info_media_look_help_item { display: contents; }
.info_media_look_help_key { font-weight: var(--w-bold); white-space: nowrap; }
.info_media_look_help_text { white-space: nowrap; }
@keyframes info_media_look_help_in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 719px) {
  .info_media { border-radius: 28px; }
  .info_media_dots { left: 12px; bottom: 12px; padding-left: 12px; }
  .info_media_dots_label { min-width: 0; }
  /* T357: a slimmer capsule on the phone */
  .info_media_look_overlay { left: 12px; bottom: 12px; max-width: calc(100% - 24px); gap: 6px; padding: 5px 5px 5px 5px; }
  .info_media_look_overlay .info_media_overlay_text { font-size: var(--fs-12); }
  .info_media_look_overlay .info_media_overlay_icon { width: 30px; height: 30px; }
  .info_media_look_overlay .info_media_look_control { padding: 6px 10px; font-size: var(--fs-12); }
  .info_media_look_overlay .info_media_overlay_text:last-child { padding-right: 8px; }
}
/* T645: picture format of a slot (Plattform › Infoseiten) ------------------------------------------------------------
   contain – the frame keeps the ratio of the slot, every picture shows whole and centred on the light ground of the frame
   natural – the frame takes the format of the picture: one picture – the frame hugs it (at most --info-media-natural-max
             high, centred in its column; a small picture keeps its own size); several – all pictures in one grid cell,
             the frame is as high as the tallest at the width of the place, every picture whole and centred – changing
             pictures never moves the page. The img carries width/height (the server), so the space is known before load. */
.info_media_fit_contain .info_media_image { object-fit: contain; }
.info_product_scenario_media.info_media_fit_contain { background: var(--q-highlight-4); }
.info_media.info_media_fit_natural { --info-media-natural-max: 640px; aspect-ratio: auto; }
.info_media_fit_natural:not(.info_media_stack) { width: fit-content; max-width: 100%; margin-inline: auto; }
.info_media_fit_natural .info_media_image {
  position: relative; inset: auto; display: block; width: auto; max-width: 100%; height: auto;
  max-height: var(--info-media-natural-max); object-fit: contain;
}
.info_media_fit_natural.info_media_stack { display: grid; }
.info_media_fit_natural.info_media_stack .info_media_image { grid-area: 1 / 1; width: 100%; align-self: center; }
@media (max-width: 719px) { .info_media.info_media_fit_natural { --info-media-natural-max: 520px; } }

/* T646: adaptive carousel – the frame takes the format of the current picture and glides into the next one.
   Without JavaScript the current picture lies in the flow and sizes the frame (the others above it); with info.js
   (info_media_fit_adaptive_sized) the frame gets an explicit width and height and every picture fills it. */
.info_media.info_media_fit_adaptive {
  --info-media-natural-max: 640px; aspect-ratio: auto; width: fit-content; max-width: 100%; margin-inline: auto;
  transition: width 560ms var(--ease-std), height 560ms var(--ease-std);
}
.info_media_fit_adaptive .info_media_image { object-fit: contain; }
.info_media_fit_adaptive:not(.info_media_fit_adaptive_sized) .info_media_image_current {
  position: relative; inset: auto; display: block; width: auto; max-width: 100%; height: auto; max-height: var(--info-media-natural-max);
}
@media (prefers-reduced-motion: reduce) { .info_media.info_media_fit_adaptive { transition: none; } }
@media (max-width: 719px) { .info_media.info_media_fit_adaptive { --info-media-natural-max: 520px; } } /* after the rule above – it sets 640 px */

@media (prefers-reduced-motion: reduce) {
  .info_media_stack .info_media_image, .info_media_stack_settling .info_media_image { transition: none; }
  .info_media_dot_mark { transition: none; }
  .info_media_zoom_icon { transition: none; }
  .info_media_look_help { animation: none; }
}
