/* UI6 application/gallery carousels. Homepage hero is owned separately. */
#morgen-v6-root .mg6-app-gallery[data-mg6-app-gallery] {
  --mg6-gallery-carousel-gap: clamp(18px, 2vw, 28px);
  --mg6-app-gallery-ratio: 25 / 16;
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  overflow: visible;
  isolation: isolate;
}

#morgen-v6-root .mg6-app-gallery--full-bleed {
  margin-inline: 0;
  padding-block: 14px 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: clip;
  overflow-y: visible;
}

#morgen-v6-root .mg6-app-gallery > .splide__track,
#morgen-v6-root .mg6-app-gallery__track {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--mg6-radius-feature, 14px);
}

#morgen-v6-root .mg6-app-gallery .splide__list {
  display: flex;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

#morgen-v6-root .mg6-app-gallery__slide,
#morgen-v6-root .mg6-app-gallery .splide__slide {
  position: relative;
  display: flex;
  min-width: 0;
  height: auto;
  padding: 0;
  list-style: none;
  opacity: 1;
  transform: none;
  backface-visibility: hidden;
}

#morgen-v6-root .mg6-app-gallery__media {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  aspect-ratio: var(--mg6-app-gallery-ratio);
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--mg6-radius-media, 8px);
  background: var(--mg6-surface-warm);
  box-shadow: none;
  transform: none;
}

#morgen-v6-root .mg6-app-gallery__img,
#morgen-v6-root .mg6-app-gallery__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.001);
  transition: transform 420ms var(--mg6-ease), opacity 220ms var(--mg6-ease);
}

@media (hover: hover) and (pointer: fine) {
  #morgen-v6-root .mg6-app-gallery__media:hover img,
  #morgen-v6-root .mg6-app-gallery__media:focus-visible img {
    transform: scale(1.018);
  }
}

#morgen-v6-root .mg6-app-gallery__caption {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  width: max-content;
  max-width: calc(100% - 32px);
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(var(--mg6-on-dark-rgb), .18);
  border-radius: var(--mg6-radius-pill);
  background: rgba(var(--mg6-dark-rgb), .62);
  color: var(--mg6-on-dark);
  font-size: 12px;
  font-weight: 650;
}

#morgen-v6-root .mg6-app-gallery__index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--mg6-on-dark-rgb), .16);
  font-variant-numeric: tabular-nums;
}

#morgen-v6-root .mg6-app-gallery .splide__arrow {
  position: absolute;
  z-index: 7;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(var(--mg6-on-dark-rgb), .42);
  border-radius: var(--mg6-radius-control, 8px);
  background: rgba(var(--mg6-ink-rgb), .38);
  color: var(--mg6-on-dark);
  cursor: pointer;
  line-height: 0;
  transform: translateY(-50%);
  transition: background var(--mg6-duration-fast) var(--mg6-ease), border-color var(--mg6-duration-fast) var(--mg6-ease), opacity var(--mg6-duration-fast) var(--mg6-ease);
}

#morgen-v6-root .mg6-app-gallery .splide__arrow--prev { left: 14px; }
#morgen-v6-root .mg6-app-gallery .splide__arrow--next { right: 14px; }

#morgen-v6-root .mg6-app-gallery .splide__arrow > .mg6-control-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

#morgen-v6-root .mg6-app-gallery .splide__arrow > .mg6-control-icon > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#morgen-v6-root .mg6-app-gallery .splide__arrow:focus-visible {
  outline: 2px solid var(--mg6-focus-ring, var(--mg6-amber, #2e7aa3));
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  #morgen-v6-root .mg6-app-gallery .splide__arrow:hover {
    border-color: rgba(var(--mg6-on-dark-rgb), .72);
    background: rgba(var(--mg6-ink-rgb), .72);
  }
}

#morgen-v6-root .mg6-app-gallery:not(.is-initialized) .splide__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(88%, 430px);
  gap: var(--mg6-gallery-carousel-gap);
  padding-inline: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

#morgen-v6-root .mg6-app-gallery:not(.is-initialized) .splide__slide {
  scroll-snap-align: start;
}

#morgen-v6-root .mg6-app-gallery[data-morgen-carousel-state="waiting"] .splide__slide:not(:first-child),
#morgen-v6-root .mg6-app-gallery[data-morgen-carousel-state="static"] .splide__slide:not(:first-child),
#morgen-v6-root .mg6-app-gallery[data-morgen-carousel-state="error"] .splide__slide:not(:first-child) {
  visibility: hidden;
}

@media (max-width: 720px) {
  #morgen-v6-root .mg6-app-gallery { --mg6-app-gallery-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  #morgen-v6-root .mg6-app-gallery * {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  #morgen-v6-root .mg6-app-gallery .splide__arrow {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}