/* Popular and Upcoming demo slots on the homepage (-52). Markup:
   templates/_home_picks.html.

   Two panels under Latest Slots, dressed like it (latest-slots.css): the same
   surface, border, card and heading, as wide as it from 1024px and with the
   same full-width step on a phone.

   Popular is one large card beside eight tiles; below 1024px the large card
   lays its picture beside its words, and on a phone the tiles slide sideways so
   the section stays short. Upcoming is six tiles a row on a laptop or wider and
   a sideways rail below that. Only `transform` moves, and a visitor who asks
   for less motion gets none. */

.pk-section-52 {
  --pk-accent-a-52: #a948f8;
  --pk-accent-b-52: #22e2b6;
  --pk-hover-52: #1abc9c;
  --pk-card-52: linear-gradient(180deg, #1f1c26 0%, #18161d 100%);
  --pk-line-52: rgba(255, 255, 255, 0.075);
  --pk-line-strong-52: rgba(255, 255, 255, 0.12);
  --pk-ink-52: #f5f3ff;
  --pk-muted-52: #a3a1ae;
  --pk-gradient-52: linear-gradient(90deg, var(--pk-accent-a-52), var(--pk-accent-b-52));
  --pk-ease-52: cubic-bezier(0.22, 1, 0.36, 1);
  --pk-gap-52: clamp(0.625rem, 0.45rem + 0.45vw, 1rem);
  --pk-radius-52: 0.875rem;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  /* The page column is a grid: without this the sideways rail widens it. */
  min-width: 0;
  max-width: 72rem;
  margin: 0.875rem auto 0;
  padding: clamp(0.875rem, 0.5rem + 1.1vw, 1.75rem);
  background:
    radial-gradient(110% 55% at 0% 0%, rgba(169, 72, 248, 0.1), transparent 60%),
    radial-gradient(80% 45% at 100% 100%, rgba(34, 226, 182, 0.06), transparent 60%),
    linear-gradient(180deg, #17151b 0%, #121016 100%);
  border: 1px solid #242129;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: 'Roboto', sans-serif;
}

.pk-section-52 *,
.pk-section-52 *::before,
.pk-section-52 *::after {
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .pk-section-52 {
    --pk-width-52: min(calc(100vw - 3rem), 84rem);
    width: var(--pk-width-52);
    max-width: none;
    margin-inline: calc((100% - var(--pk-width-52)) / 2);
  }
}

/* ---- Heading ----------------------------------------------------------- */

.pk-head-52 {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(0.875rem, 0.7rem + 0.5vw, 1.25rem);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--pk-line-52);
}

.pk-head-52::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 4.5rem;
  height: 3px;
  border-radius: 3px;
  background: var(--pk-gradient-52);
}

.pk-heading-52 {
  min-width: 0;
}

.pk-title-52 {
  margin: 0;
  font-size: clamp(0.9375rem, 0.85rem + 0.25vw, 1.125rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.pk-lead-52 {
  margin: 0.3125rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--pk-muted-52);
}

a.pk-card-52:focus-visible {
  outline: 2px solid var(--pk-accent-b-52);
  outline-offset: 2px;
}

.pk-arrow-52 {
  display: inline-block;
  transition: transform 0.25s var(--pk-ease-52);
}

[dir="rtl"] .pk-arrow-52 {
  transform: scaleX(-1);
}

/* ---- Layout ------------------------------------------------------------ */

.pk-popular-52 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--pk-gap-52);
}

.pk-tiles-52,
.pk-rail-52 {
  display: grid;
  gap: var(--pk-gap-52);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* app/rtl.py pads every list on a right-to-left page; these are layouts. */
[dir="rtl"] .pk-tiles-52,
[dir="rtl"] .pk-rail-52 {
  padding-right: 0;
}

.pk-tiles-52 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pk-item-52 {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  /* Sized so the large card comes out as tall as the two rows beside it. */
  .pk-popular-52 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .pk-rail-52 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* A sideways rail: Upcoming below 1024px, Popular's tiles on a phone. */
@media (max-width: 1023.98px) {
  .pk-rail-52 {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-block-end: 0.125rem;
  }

  .pk-rail-52::-webkit-scrollbar {
    display: none;
  }

  .pk-rail-52 > .pk-item-52 {
    flex: 0 0 clamp(9.5rem, 26vw, 12rem);
    scroll-snap-align: start;
  }

  /* Two lines for a name beside the score, rather than "Chronos - S…". */
  .pk-rail-52 .pk-line-52 {
    align-items: flex-start;
  }

  .pk-rail-52 .pk-name-52 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
  }
}

@media (max-width: 639.98px) {
  .pk-section-52 {
    width: calc(100vw - 2rem);
    max-width: none;
    margin-inline: calc(50% - 50vw + 1rem);
    border-radius: 1rem;
  }

  .pk-tiles-52 {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding-block-end: 0.125rem;
  }

  .pk-tiles-52::-webkit-scrollbar {
    display: none;
  }

  .pk-tiles-52 > .pk-item-52 {
    flex: 0 0 clamp(8.75rem, 37vw, 11rem);
    scroll-snap-align: start;
  }

  /* Two lines for a name beside the score, rather than two "Sweet Bon…". */
  .pk-tiles-52 .pk-line-52 {
    align-items: flex-start;
  }

  .pk-tiles-52 .pk-name-52 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    white-space: normal;
  }

  .pk-tiles-52 .pk-name-52,
  .pk-rail-52 .pk-name-52 {
    font-size: 0.875rem;
  }

  /* The same on the New Slots tiles. */
  .latest-tile-head-88 {
    align-items: flex-start;
  }

  .latest-tile-head-88 .latest-name-88 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 0.875rem;
    white-space: normal;
  }
}

/* ---- Cards ------------------------------------------------------------- */

.pk-card-52 {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--pk-card-52);
  border: 1px solid var(--pk-line-52);
  border-radius: var(--pk-radius-52);
  box-shadow: 0 16px 32px -26px rgba(0, 0, 0, 0.9);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.3s var(--pk-ease-52),
    border-color 0.3s ease;
}

.pk-art-52 {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background: #0f141b;
}

.pk-img-52 {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s var(--pk-ease-52);
}

.pk-cover-52 {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: linear-gradient(135deg, #2a1545 0%, #6d2bb3 55%, #1b8f78 100%);
  text-align: center;
}

.pk-cover-text-52 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: break-word;
  font-size: 1rem;
  font-size: clamp(0.6875rem, 9cqi, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
}

/* Top right, a physical side on purpose: the artwork carries the SLOTyi mark
   in its top-left corner in every language. */
.pk-rank-52,
.pk-soon-52 {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: calc(100% - 1rem);
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  background: rgba(18, 16, 22, 0.86);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  color: #fff;
}

.pk-rank-top-52 {
  background: var(--pk-gradient-52);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.pk-soon-52 {
  color: #ffd76a;
}

.pk-soon-52 svg {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
}

.pk-soon-52.is-near-52 {
  background: var(--pk-gradient-52);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.pk-body-52 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.625rem 0.75rem 0.75rem;
}

.pk-line-52 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.pk-name-52 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--pk-ink-52);
  transition: color 0.2s ease;
}

.pk-sub-52 {
  min-width: 0;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--pk-muted-52);
}

.pk-score-52 {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin-inline-start: auto;
  gap: 0.1875rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  color: var(--pk-band-52);
}

.pk-score-52 svg {
  width: 0.6875rem;
  height: 0.6875rem;
}

.pk-sr-52 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- The score on the New Slots cards (latest-slots.css) --------------- */

/* Among the chips it sits with the others, not pushed to the far side. */
.latest-chips-88 .pk-score-52 {
  margin-inline-start: 0;
}

/* On a tile it shares the name's line, as on Popular's tiles. */
.latest-tile-head-88 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

/* ---- The large card ---------------------------------------------------- */

.pk-top-body-52 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.875rem 1rem 1rem;
}

.pk-top-name-52 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 0;
  overflow: hidden;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--pk-ink-52);
  transition: color 0.2s ease;
}

.pk-try-52 {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pk-accent-b-52);
  transition: color 0.2s ease;
}

@media (max-width: 1023.98px) {
  .pk-top-52 {
    flex-direction: row;
    align-items: stretch;
  }

  .pk-top-52 .pk-art-52 {
    flex: 0 0 38%;
    width: 38%;
  }

  .pk-top-body-52 {
    justify-content: center;
  }
}

@media (max-width: 479.98px) {
  .pk-top-52 .pk-art-52 {
    flex-basis: 44%;
    width: 44%;
  }

  .pk-top-body-52 {
    padding: 0.625rem 0.75rem;
  }

  /* A picture this small keeps room for the SLOTyi mark. */
  .pk-rank-top-52 {
    display: none;
  }
}

/* ---- Hover ------------------------------------------------------------- */

@media (hover: hover) {
  a.pk-card-52:hover {
    transform: translateY(-3px);
    border-color: var(--pk-line-strong-52);
  }

  a.pk-card-52:hover .pk-img-52 {
    transform: scale(1.05);
  }

  a.pk-card-52:hover .pk-name-52,
  a.pk-card-52:hover .pk-top-name-52 {
    color: var(--pk-hover-52);
  }

  a.pk-top-52:hover .pk-try-52 {
    color: var(--pk-accent-a-52);
  }

  a.pk-top-52:hover .pk-arrow-52 {
    transform: translateX(3px);
  }

  [dir="rtl"] a.pk-top-52:hover .pk-arrow-52 {
    transform: scaleX(-1) translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-card-52,
  .pk-img-52,
  .pk-arrow-52 {
    transition: none;
  }

  a.pk-card-52:hover,
  a.pk-card-52:hover .pk-img-52 {
    transform: none;
  }
}
