/* The clipper prevents page-wide horizontal scroll */
.games-carousel-clip {
  /* Prevent horizontal scroll but allow vertical visuals like shadows */
  overflow-x: hidden;
  overflow-y: visible;
  position: relative; /* for safety if you absolutely-position arrows */
}

/* Keep Swiper’s overflow INSIDE the clipper */
.games-carousel-clip .swiper {
  overflow: visible; /* slides can peek, but are clipped by parent */
}

.swiper-wrapper {
  justify-content: flex-start;
}

/* Slides stay fluid on small screens */
.games-category .swiper .swiper-slide {
  width: clamp(160px, 33vw, 240px);
}

/* Give sports slides a bit of room for bottom shadows so they aren't clipped */
.games-category .swiper.is-sports .swiper-slide {
  padding-bottom: 14px; /* leave room for card box-shadow */
}

/* Desktop: Swiper controls width via slidesPerView */
@media (min-width: 1024px) {
  .games-category .swiper .swiper-slide {
    width: auto;
  }
}

.games-category {
  margin-top: 1.5rem;
  background-color: var(--e-global-color-secondary);
  border-radius: 8px;
  padding: 8px 30px;
}

.games-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.games-category-divider {
  border: 1px solid var(--e-global-color-6b9151f);
  width: 70%;
}

@media (max-width: 1024px) {
  .games-category-divider {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .games-category-divider {
    border: 0;
    width: 0;
  }
}

.games-category-title {
  font-family: var(--e-global-typography-text-font-family) !important;
  font-size: var(--e-global-typography-text-font-size) !important;
  font-weight: var(--e-global-typography-text-font-weight) !important;
  margin: 0;
  padding: 1rem 0rem;
  color: var(--e-global-color-6b9151f);
  /* text-decoration-line: underline;
  text-decoration-color: var(--e-global-color-accent);
  text-decoration-style: solid;
  text-decoration-thickness: 5px; */
}

.games-category-nav {
  display: flex;
  gap: 16px;
}

.games-category-nav .swiper-button-prev,
.games-category-nav .swiper-button-next {
  margin-top: 0 !important;
  z-index: 99;
  position: static;
  background: none;
}

.games-carousel-nav .swiper-button-prev::after,
.games-category-nav .swiper-button-prev::after {
  z-index: 99;
  font-family: "Font Awesome 6 Free";
  content: "\f104";
}

.games-carousel-nav .swiper-button-next::after,
.games-category-nav .swiper-button-next::after {
  z-index: 99;
  font-family: "Font Awesome 6 Free";
  content: "\f105";
}

.games-category-nav .swiper-button-prev::after,
.games-category-nav .swiper-button-next::after {
  background-color: var(--e-global-color-secondary);
  padding: 5px 10px;
  line-height: 1.15;
  font-size: 16px;
  font-weight: 900;
  border: 1px solid var(--e-global-color-text);
  color: var(--e-global-color-text);
  border-radius: 6px;
  transition: 0.2s;
}

.games-category-nav .swiper-button-prev:where(:hover, :focus-visible)::after,
.games-category-nav .swiper-button-next:where(:hover, :focus-visible)::after {
  border: 1px solid var(--e-global-color-6b9151f);
  color: var(--e-global-color-6b9151f);
  /* background-color: var(--e-global-color-e465ca5); */
}

/* .game-card--games .swiper-game-name,
.game-card--promotions .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  line-height: 4;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 195px;
  text-overflow: ellipsis;
  color: var(--e-global-color-text);
} */

.game-card--sports .swiper-game-name {
  font-family: var(--e-global-typography-text-font-family) !important;
  background-color: var(--e-global-color-primary);
  border: solid 1px var(--e-global-color-e465ca5);
  color: var(--e-global-color-text);
  /* border-radius: 0px 0px 16px 16px; */
  padding-block: 10px;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  max-width: 220px;
  clip-path: polygon(0 0, 100% 0, 100% 65%, 92% 100%, 8% 100%, 0 65%);
  /* text-decoration-line: underline;
  text-decoration-color: var(--e-global-color-b964cec);
  text-decoration-thickness: 4px; */
}

.game-card-inner {
  z-index: 8;
}

.game-card--games .game-card-inner {
  max-width: 195px;
  max-height: 265px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 3px solid #597b9d; /* dark dirty navy */
  box-shadow: 0 2px 0 0 #157ad8, 0 4px 0 0 #043675, 0 6px 0 0 #49adff,
    0 8px 0 0 #043675, 0 10px 0 0 #7ee8f4;
}

/* Defaults for bottom rings (can be overridden per-card) */
.game-card--games {
  --gc-ring-w: 4px; /* thickness of each ring */
  --gc-bottom-rings-height: 22px; /* visible height of bottom band */
}

/* Removed decorative gradient border for games */

/* Removed decorative triple border for games */

.game-card--sports {
  width: 100%;
  max-width: 220px;
}

.game-card--sports .game-card-inner {
  max-width: 220px;
  max-height: 360px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  /* clip-path: polygon(10% 0, 90% 0, 100% 8%, 100% 100%, 0 100%, 0 8%); */
  border: 3px solid #597b9d; /* dark dirty navy */
  box-shadow: 0 2px 0 0 #157ad8, 0 4px 0 0 #043675, 0 6px 0 0 #49adff,
    0 8px 0 0 #043675, 0 10px 0 0 #7ee8f4;
}

/* Removed decorative borders for sports */

.game-card--promotions .game-card-inner {
  max-width: 545px;
  max-height: 370px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 3px solid #597b9d; /* dark dirty navy */
  box-shadow: 0 2px 0 0 #157ad8, 0 4px 0 0 #043675, 0 6px 0 0 #49adff,
    0 8px 0 0 #043675, 0 10px 0 0 #7ee8f4;
}

.game-card {
  display: block;
  cursor: pointer;
}

.game-card.is-disabled {
  cursor: not-allowed;
}

.game-card--games {
  width: 100%;
  max-width: 195px;
}

.game-card--promotions {
  width: 100%;
  max-width: 545px;
}

.game-card-inner img {
  width: 100%;
  display: block;
  transition: 0.2s;
  z-index: 5;
}

.game-card--games .game-card-inner:where(:hover, :focus-visible) img,
.game-card--games
  .game-card-inner.is-disabled:where(:hover, :focus-visible)
  img {
  opacity: 0.2;
}


.game-card--promotions:where(:hover, :focus-visible) .game-card-inner img,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  img {
  opacity: 0.2;
}

.game-card--promotions:where(:hover, :focus-visible) .game-card-inner .ribbon,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  .ribbon {
  opacity: 0.2;
}
.game-card--promotions:where(:hover, :focus-visible) .promotion-description,
.game-card--promotions.is-disabled:where(:hover, :focus-visible)
  .promotion-description {
  opacity: 0.2;
}


@keyframes promotions-bg-pulse {
  0%,
  100% {
    background-size: 545px 370px;
  }
  50% {
    background-size: 605px 430px;
  }
}

.game-card--sports:where(:hover, :focus-visible) .game-card-inner img,
.game-card--sports.is-disabled:where(:hover, :focus-visible)
  .game-card-inner
  img {
  transition: 0.5s;
  transform: scale(1.2);
}

/* .game-card--sports:where(:hover, :focus-visible) .swiper-game-name,
.game-card--sports.is-disabled:where(:hover, :focus-visible) .swiper-game-name {
  text-decoration-color: var(--e-global-color-accent);
} */

.promotion-description {
  font-family: var(--e-global-typography-text-font-family) !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 23%;
  background: #1a1a1ad1;
  z-index: 6;
  padding: 5px 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--e-global-color-e465ca5);
  border-top: 1px solid var(--e-global-color-text);
}

.slide-play-btn {
  font-family: var(--e-global-typography-text-font-family) !important;
  font-weight: var(--e-global-typography-text-font-weight) !important;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: 0.2s;
  padding: 0 !important;
  width: 65px;
  height: 65px;
  min-height: 0;
  background-color: #ffd535 !important; /* yellow */
  border: 2px solid #597b9d !important; /* circle border */
  box-sizing: border-box; /* keep overall size 65px incl. border */
  color: transparent !important; /* hide text */
  border-radius: 50% !important; /* circular */
  border: 3px solid #35daff;
  font-size: 0 !important; /* ensure text doesn't overlap */
  text-indent: -9999px; /* visually hide any text */
  white-space: nowrap;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  /* will-change: transform, opacity; */
  position: absolute; /* ensure pseudo is positioned relative to button */
}

/* Disable own hover effects: keep appearance unchanged */
.slide-play-btn:where(:hover, :focus-visible) {
  background-color: #ffd535 !important;
  border: 2px solid #597b9d !important; /* keep same border on hover */
  color: transparent !important;
}

.game-card-inner:where(:hover, :focus-visible) .slide-play-btn,
.game-card-inner.is-disabled:where(:hover, :focus-visible) .slide-play-btn {
  opacity: 1;
}

/* Also switch to icon when card is hovered (not just the button) */
.game-card-inner:where(:hover, :focus-visible) .slide-play-btn,
.game-card-inner.is-disabled:where(:hover, :focus-visible) .slide-play-btn {
  color: transparent !important; /* hide text color */
  font-size: 0 !important; /* collapse text so it won't overlap */
  text-indent: -9999px; /* visually move any text off-canvas */
  white-space: nowrap; /* keep it on one line when indented */
  overflow: hidden; /* and ensure no overflow shows */
}
.game-card-inner:where(:hover, :focus-visible) .slide-play-btn::after,
.game-card-inner.is-disabled:where(:hover, :focus-visible)
  .slide-play-btn::after {
  /* Font-free play icon */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; /* proportional to 65px circle */
  height: 36px; /* proportional to 65px circle */
  background: #c2231a; /* play icon color */
  /* right-pointing triangle */
  clip-path: polygon(12% 20%, 12% 80%, 82% 50%);
  margin-left: 1.8px; /* optical centering for this size */
  /* Slight smoothing of corners */
  filter: blur(0.5px);
  will-change: filter;
}

@keyframes slide-btn-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.game-card--sports .ribbon,
.game-card--games .ribbon {
  display: none;
}

.ribbon {
  --f: 0.5em; /* control the folded part */
  position: absolute;
  top: 0;
  left: 0;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  line-height: 1.8;
  padding-inline: 1lh;
  padding-bottom: var(--f);
  border-image: conic-gradient(#0008 0 0) 51% / var(--f);
  clip-path: polygon(
    100% calc(100% - var(--f)),
    100% 100%,
    calc(100% - var(--f)) calc(100% - var(--f)),
    var(--f) calc(100% - var(--f)),
    0 100%,
    0 calc(100% - var(--f)),
    999px calc(100% - var(--f) - 999px),
    calc(100% - 999px) calc(100% - var(--f) - 999px)
  );
  transform: translate(calc((cos(45deg) - 1) * 100%), -100%) rotate(-45deg);
  transform-origin: 100% 100%;
  background-color: red;
  z-index: 1;
}

/* Animation for fade in up effect */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 80px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in-up {
  animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.fade-in-up-init {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .fade-in-up-init {
    opacity: 1;
    transform: none;
  }
}

/* ===== Reset: remove all decorative borders on cards ===== */
/* Games */
.game-card--games .game-card-inner::before,
.game-card--games .game-card-inner::after,
.game-card--games .game-card-inner:where(:hover, :focus-visible)::before,
.game-card--games .game-card-inner:where(:hover, :focus-visible)::after {
  content: none !important;
  box-shadow: none !important;
  background: none !important;
  padding: 0 !important;
  -webkit-mask: none !important;
  mask: none !important;
  clip-path: none !important;
  opacity: 0 !important;
}

/* Sports */
.game-card--sports .game-card-inner::before,
.game-card--sports .game-card-inner::after,
.game-card--sports .game-card-inner:where(:hover, :focus-visible)::after {
  content: none !important;
  box-shadow: none !important;
  background: none !important;
  padding: 0 !important;
  -webkit-mask: none !important;
  mask: none !important;
  opacity: 0 !important;
}

/* Promotions */
.game-card--promotions .game-card-inner::before,
.game-card--promotions .game-card-inner::after,
.game-card--promotions .game-card-inner:where(:hover, :focus-visible)::after {
  content: none !important;
  box-shadow: none !important;
  background: none !important;
  padding: 0 !important;
  -webkit-mask: none !important;
  mask: none !important;
  opacity: 0 !important;
}

/* Overlay badge ABOVE the entire sports card */
.game-card--sports {
  position: relative;
}

/* Sports: top badge spanning full card width (on the card itself, not inner) */
.game-card--sports::before {
  content: "" !important;
  position: absolute;
  top: -2px;
  left: 0;
  right: 0; /* full width */
  transform: none;
  width: 103%;
  aspect-ratio: 16 / 3; /* adjust as needed */
  /* fill container without side gaps */
  background: var(--games-sports-badge-image, none)
    no-repeat center / 100% 100% !important;
  z-index: 2000; /* above all card elements */
  pointer-events: none;
  opacity: 1 !important;
}

/* Sports: bottom banner image with name inside */
.game-card--sports::after {
  content: "";
  position: absolute;
  border-radius: 0 0 12px 12px;
  left: 3px; /* avoid overlapping border/shadow */
  right: 3px; /* avoid overlapping border/shadow */
  bottom: 3px; /* keep bottom border visible */
  width: auto; /* width derives from left/right */
  height: 70px; /* tune as needed */
  background: var(--games-sports-banner-image, none)
    no-repeat center / 100% 100% !important;
  z-index: 2000; /* above image and button */
  pointer-events: none;
}

/* Place the sports name centered on the bottom banner */
.game-card--sports .swiper-game-name {
  position: absolute;
  left: 50%;
  bottom: 30px; /* vertically center within the banner */
  transform: translateX(-50%);
  margin: 0;
  padding: 0 12px;
  width: auto;
  max-width: calc(100% - 24px);
  background: transparent !important;
  border: 0 !important;
  clip-path: none !important;
  color: var(--e-global-color-primary) !important;
  text-align: center;
  font-weight: 800;
  z-index: 2100; /* above the banner graphic */
  pointer-events: none; /* keep whole card clickable */
}

/* Sports: optional top badge image (overrides reset above) */

/* ===================== */
/* Responsive adjustments */
/* ===================== */
/*
  Keep all existing colors and visuals.
  Only adjust sizing and responsive behavior for promotions carousel/cards
  and hide arrows on tablet/mobile.
*/

/* Tablet/desktop: allow promo slides to size to their content */
@media (min-width: 765px) {
  .games-category .swiper.is-promotions .swiper-slide {
    width: auto;
  }
  /* Let the wrapper shrink to content width on larger screens */
  .game-card--promotions {
    width: auto;
    max-width: none;
  }
  /* 15% smaller than 545px on tablet/desktop to allow peeking */
  .game-card--promotions .game-card-inner {
    width: 463.25px;
  }
}

/* Mobile: make each promotions slide full-width and image auto-height */
@media (max-width: 764.98px) {
  .games-category .swiper.is-promotions .swiper-slide {
    width: 100% !important;
  }
  .game-card--promotions {
    width: 100%;
    max-width: 100%;
  }
  .game-card--promotions .game-card-inner {
    max-width: 100%;
    width: 100%;
    height: auto;
  }
}

/* Large screens: keep a comfortable minimum width for promo cards */
@media (min-width: 1024px) {
  .game-card--promotions .game-card-inner {
    min-width: 320px;
  }
}

/* Maintain promotions aspect ratio and image fit */
.game-card--promotions .game-card-inner {
  aspect-ratio: 545 / 370;
  height: auto; /* let aspect-ratio determine height from width */
}
.game-card--promotions .game-card-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hide next/prev arrows on tablet and below */
@media (max-width: 1024px) {
  .games-category-nav {
    display: none !important;
  }
}
