/*
 * Homepage "meet our creators" category rail.
 *
 * Fed by GET /api/v1/public/homepage-creator-showcase — one creator, one
 * video, one category. Platform-side contract:
 * docs/flows/homepage-creator-showcase-by-category-2026-08-31.md
 *
 * Poster-first by design. The hero above already autoplays video; a second
 * autoplaying block below it is a bandwidth tax on the mobile visitors who are
 * most of this page. Cards load one poster image and no video bytes until the
 * visitor hovers or taps.
 */

.pcow-showcase-section {
  padding: 72px 20px;
}

.pcow-showcase-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.pcow-showcase-head {
  text-align: center;
  margin-bottom: 28px;
}

.pcow-showcase-intro {
  max-width: 620px;
  margin: 10px auto 0;
  color: #5b5b6b;
  font-size: 16px;
  line-height: 1.6;
}

/* Tabs. Horizontally scrollable rather than wrapped: a wrapped strip reflows
   the rail below it every time a category is added, and on a phone the second
   row reads as a separate control. */
.pcow-showcase-tabs {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px;
  margin-bottom: 24px;
}

.pcow-showcase-tabs::-webkit-scrollbar {
  display: none;
}

@media (min-width: 900px) {
  .pcow-showcase-tabs {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.pcow-showcase-tab {
  flex: 0 0 auto;
  border: 1px solid #e6e4ef;
  background: #fff;
  color: #4a4a5a;
  border-radius: 999px;
  /* 44px min target — this is the primary control of the section on touch. */
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

.pcow-showcase-tab:hover {
  border-color: #cfc7ea;
  color: #2d2d3a;
}

.pcow-showcase-tab[aria-selected='true'] {
  background: #1b1b23;
  border-color: #1b1b23;
  color: #fff;
}

.pcow-showcase-tab:focus-visible {
  outline: 2px solid #7c1fd6;
  outline-offset: 2px;
}

/* Rail. A scroll-snapping row on phones, a grid once there is room — the same
   cards either way, so nothing has to be authored twice. */
.pcow-showcase-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 62vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.pcow-showcase-rail::-webkit-scrollbar {
  display: none;
}

.pcow-showcase-rail[hidden] {
  display: none;
}

@media (min-width: 700px) {
  .pcow-showcase-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    grid-auto-columns: auto;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 20px;
  }
}

.pcow-showcase-card {
  position: relative;
  scroll-snap-align: start;
  border: 0;
  padding: 0;
  background: #efedf6;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 100%;
  /* Vertical video — the aspect every creator clip on this platform is shot in. */
  aspect-ratio: 9 / 16;
  text-align: start;
}

.pcow-showcase-card:focus-visible {
  outline: 2px solid #7c1fd6;
  outline-offset: 3px;
}

.pcow-showcase-media,
.pcow-showcase-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pcow-showcase-media {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pcow-showcase-card.is-playing .pcow-showcase-media {
  opacity: 1;
}

/* Scrim so white text stays legible over an arbitrary first frame. */
.pcow-showcase-meta {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(12, 12, 18, 0.86), rgba(12, 12, 18, 0));
  color: #fff;
  pointer-events: none;
}

.pcow-showcase-handle {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcow-showcase-city {
  font-size: 12px;
  opacity: 0.82;
  margin-top: 2px;
}

.pcow-showcase-tag {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #2d2d3a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.pcow-showcase-play {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* RTL: the play button is centred, so the -50% X shift has to flip with dir. */
[dir='rtl'] .pcow-showcase-play {
  transform: translate(50%, -50%);
}

.pcow-showcase-card.is-playing .pcow-showcase-play {
  opacity: 0;
}

.pcow-showcase-play svg {
  width: 18px;
  height: 18px;
  fill: #1b1b23;
}

@media (prefers-reduced-motion: reduce) {
  .pcow-showcase-media,
  .pcow-showcase-play,
  .pcow-showcase-tab {
    transition: none;
  }
}
