@property --cezar-carousel-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.cezar-module-carousel {
  --cezar-carousel-width: 800px;
  --cezar-carousel-ratio: 2.95 / 1;
  --cezar-carousel-fade: 1500ms;
  --cezar-carousel-frame-duration: 12s;
  --cezar-carousel-toolbar-height: 52px;
  --cezar-carousel-accent: #ce202f;
  width: min(var(--cezar-carousel-width), 100%);
  margin: 0 auto;
  padding: 16px 0;
  color: #102a42;
}

.cezar-module-carousel--download {
  --cezar-carousel-toolbar-height: 0px;
  width: 100%;
  padding: 32px 0 8px;
  border-top: 1px solid #c7d5df;
  background: #edf3f6;
}

.cezar-module-carousel--news {
  --cezar-carousel-width: 680px;
  --cezar-carousel-fade: 1800ms;
  --cezar-carousel-frame-duration: 15s;
  --cezar-carousel-toolbar-height: 0px;
  padding: 0;
}

.cezar-module-carousel.is-loading {
  visibility: hidden;
}

.cezar-module-carousel-inner {
  width: min(var(--cezar-carousel-width), calc(100% - 48px));
  margin: 0 auto;
}

.cezar-module-carousel-stage {
  position: relative;
  display: grid;
  box-sizing: border-box;
  aspect-ratio: var(--cezar-carousel-ratio);
  border: 1px solid rgb(82 117 141 / 55%);
  border-radius: 4px;
  background: #e9f3ff;
  box-shadow: 0 10px 24px rgb(7 25 46 / 6%), 0 2px 6px rgb(7 25 46 / 3%);
}

.cezar-module-carousel-slide {
  grid-area: 1 / 1;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--cezar-carousel-fade) cubic-bezier(.4, 0, .2, 1),
    visibility 0s var(--cezar-carousel-fade);
}

.cezar-module-carousel-slide[hidden] {
  display: none;
}

.cezar-module-carousel-slide.is-current {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.cezar-module-carousel-image,
.cezar-module-carousel-image img {
  display: block;
  width: 100%;
  height: 100%;
}

.cezar-module-carousel-image img {
  max-width: 100%;
  aspect-ratio: var(--cezar-carousel-ratio);
  object-fit: contain;
}

.cezar-module-carousel-image img[src*="module-banner-eshop-"] {
  object-fit: fill;
}

.cezar-module-carousel-caption,
.cezar-module-carousel-actions,
.cezar-module-carousel-tabs[hidden] {
  display: none;
}

.cezar-module-carousel-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: var(--cezar-carousel-toolbar-height);
  margin-top: 0;
}

.cezar-module-carousel-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin-inline-start: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #91aabc #dce6ee;
}

.cezar-module-carousel-tabs > button {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-height: 42px;
  padding: 6px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #061426;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.52;
  text-align: start;
  white-space: nowrap;
  cursor: pointer;
  /* Keep the entrance fade, without moving labels inside the scrollbar. */
  translate: none !important;
}

@layer cezar-button-geometry {
  /* Keep the shared button padding from widening the label gaps. */
  #cezar-module-carousel .cezar-module-carousel-tabs > button {
    padding-inline: 0 !important;
  }
}

.cezar-module-carousel-tabs > button[aria-pressed="true"] {
  color: #a81724;
  font-weight: 650;
}

.cezar-module-carousel-tabs > button:hover {
  color: #a81724;
}

.cezar-module-carousel-tabs > button[aria-pressed="true"]::after {
  position: absolute;
  inset-inline: 0;
  bottom: 7px;
  height: 2px;
  background: var(--cezar-carousel-accent);
  content: "";
  pointer-events: none;
}

.cezar-module-carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cezar-module-carousel-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 15px;
}

.cezar-module-carousel-fallback a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@keyframes cezar-module-carousel-frame {
  to { --cezar-carousel-angle: 360deg; }
}

@supports (mask-composite: exclude) {
  .motion-ready .cezar-module-carousel-stage::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: conic-gradient(from var(--cezar-carousel-angle, 0deg),
      transparent 0deg 292deg, rgb(102 219 238 / 12%) 312deg,
      rgb(102 219 238 / 78%) 330deg, rgb(255 255 255 / 95%) 343deg,
      rgb(206 32 47 / 72%) 355deg, transparent 360deg);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    filter: brightness(.9) drop-shadow(0 0 2px rgb(102 219 238 / 18%));
    opacity: .35;
    animation: cezar-module-carousel-frame var(--cezar-carousel-frame-duration) linear infinite;
    content: "";
    pointer-events: none;
  }
}

.motion-paused .cezar-module-carousel-stage::after {
  animation-play-state: paused;
}

.motion-paused .cezar-module-carousel-slide {
  transition-duration: .01ms;
}

@media (max-width: 640px) {
  .cezar-module-carousel {
    padding-top: 14px;
  }

  .cezar-module-carousel--download {
    padding-top: 32px;
  }

  .cezar-module-carousel--news {
    padding-top: 0;
  }

  .cezar-module-carousel-inner {
    width: calc(100% - 32px);
  }

  .cezar-module-carousel-toolbar {
    display: none;
  }
}
