/* ==========================================================================
   Keep Browsing — in-room discovery rails (Stripchat-style)
   Rendered by includes/room_keep_browsing_helper.php into .sl-room-page-bottom.
   Self-contained: the homepage rail CSS is NOT loaded in the live room, so the
   horizontal-scroll layout is defined here, scoped under .sl-room-keep-browsing.
   Model cards themselves are styled by the already-loaded streamlumi-cards CSS.
   ========================================================================== */

.sl-room-keep-browsing {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 20px clamp(12px, 3vw, 28px) 28px;
  background: #080a0f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.sl-room-keep-browsing__head {
  margin: 0 0 14px;
}

.sl-room-keep-browsing__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.sl-room-keep-browsing__head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.sl-room-keep-browsing .sl-home-cam-sections {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.sl-room-keep-browsing .sl-home-cam-section-head {
  display: none;
}

.sl-room-keep-browsing .sl-home-cam-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.sl-room-keep-browsing .sl-home-cam-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sl-room-keep-browsing .sl-home-cam-row-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.sl-room-keep-browsing .sl-home-cam-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sl-room-keep-browsing .sl-home-cam-row-actions > a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.sl-room-keep-browsing .sl-home-cam-row-actions > a:hover {
  color: #ffffff;
}

.sl-room-keep-browsing .sl-home-cam-navs {
  display: flex;
  gap: 6px;
}

.sl-room-keep-browsing .sl-home-rail-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.sl-room-keep-browsing .sl-home-rail-nav:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.sl-room-keep-browsing .sl-home-rail-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

/* The horizontal scroll rail. */
.sl-room-keep-browsing .sl-home-cam-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 220px);
  grid-auto-rows: max-content;
  align-items: start;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sl-room-keep-browsing .sl-home-cam-strip::-webkit-scrollbar {
  height: 6px;
}

.sl-room-keep-browsing .sl-home-cam-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

/* The premium card renderer emits <article class="model-card sl-lumi-card ...">
   rather than .sl-home-cam-card, so size the strip's direct children generically.
   Grid tracks (grid-auto-columns) drive the width; the child just fills its cell. */
.sl-room-keep-browsing .sl-home-cam-strip > * {
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  justify-self: stretch;
  scroll-snap-align: start;
}

/* The card's own aspect-ratio governance is scoped to body.sl-streamlumi-cards-active,
   which is NOT set on the room page, so teaser <video> wrappers render at an
   arbitrary tall height and blow the rail out. Re-assert a uniform 16:9 media box
   here (scoped to this section) so every card — online teaser or offline image —
   is the same height and the rail stays compact. */
.sl-room-keep-browsing .sl-lumi-card .sl-lumi-media-frame,
.sl-room-keep-browsing .sl-lumi-card .sl-model-media-link {
  display: block !important;
  width: 100% !important;
}
.sl-room-keep-browsing .sl-lumi-card .video-wrapper,
.sl-room-keep-browsing .sl-lumi-card .video-wrapper.sl-lumi-media,
.sl-room-keep-browsing .sl-lumi-card .sl-lumi-media {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden !important;
  background: #050505;
}
.sl-room-keep-browsing .sl-lumi-card .video-wrapper > video,
.sl-room-keep-browsing .sl-lumi-card .video-wrapper > img,
.sl-room-keep-browsing .sl-lumi-card .sl-lumi-media > video,
.sl-room-keep-browsing .sl-lumi-card .sl-lumi-media > img,
.sl-room-keep-browsing .sl-lumi-card .sl-model-media-link > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Phones: keep the grid rail (tracks size the cards); show ~1.7 cards for a
   clear "swipe for more" cue. Arrows are desktop-only (touch-scroll on phones). */
@media (max-width: 860px) {
  .sl-room-keep-browsing {
    padding: 16px 12px 24px;
  }
  .sl-room-keep-browsing__head h2 {
    font-size: 18px;
  }
  .sl-room-keep-browsing .sl-home-cam-navs {
    display: none;
  }
  .sl-room-keep-browsing .sl-home-cam-strip {
    grid-auto-columns: calc((100vw - 44px) / 1.7);
    gap: 10px;
  }
}
