/* Discover: shelves that scroll sideways, "See all" pages, and the full-screen video feed.
   Colours come from the tokens in styles.css (with the light values as a fallback), so a dark theme
   that redefines the tokens carries over. Logical properties keep Arabic (right-to-left) right. */

/* ---------- shelves ---------- */
.dc-main { gap: 22px; }
.dc-shelf { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dc-shelf .ux-sec-head h2 { min-width: 0; }
.dc-row {
  display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
  margin-inline: -16px; padding: 2px 16px 8px; scrollbar-width: none;
}
.dc-row::-webkit-scrollbar { display: none; }
.dc-item { flex: none; scroll-snap-align: start; min-width: 0; display: flex; }
.dc-item > * { flex: 1; min-width: 0; }

.dc .ux-join, .dc .ux-person, .dc .club-card, .dc .ux-space, .dc .person-row { background: var(--card, #FFFFFF); border-color: var(--line, #ECE6DF); color: var(--ink, #221D19); }
.dc .disc-topics .topic-chip:not(.on) { background: var(--card, #FFFFFF); color: var(--ink, #221D19); border-color: var(--line-2, #E0D8CF); }
.dc .disc-topics .topic-chip.on { background: var(--ink, #221D19); color: var(--bg, #FFFFFF); }

.dc-lesson { width: 264px; }
.dc-lesson .ux-join { height: 100%; }
.dc-person { width: 148px; }
.dc-club { width: 300px; }
.dc-club .club-card { height: 100%; margin: 0; }

/* Spaces near you: picture on top, name, area, stars */
.dc-space { width: 224px; }
.dc-space > a {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: var(--card, #FFFFFF); color: var(--ink, #221D19); border: 1px solid var(--line, #ECE6DF); border-radius: 18px;
}
.dc-space-img { height: 116px; background: var(--ok-soft, #E8F5EF) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ok-ink, #11684F); }
.dc-space-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dc-space-body strong { font-size: 15.5px; }
.dc-meta { font-size: 13px; color: var(--muted, #6E655D); }
.dc-space-foot { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.dc-stars { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: var(--warn-ink, #744F00); flex: none; }
.dc-stars .i { fill: currentColor; }
.dc-count { font-weight: 500; color: var(--muted, #6E655D); }
.dc-new { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft, #E8F5EF); color: var(--ok-ink, #11684F); flex: none; }
.dc-deal { font-size: 12.5px; font-weight: 700; color: var(--ok-ink, #11684F); min-width: 0; }

/* Videos: tall 9:16 tiles (the .vt tile from styles.css), plus a "Share yours" tile at the end */
.dc-vt { width: 124px; }
.dc-vt .vt-link { width: 100%; }
.dc-vt-add {
  aspect-ratio: 9 / 16; border-radius: 10px; border: 1.5px dashed var(--line-2, #E0D8CF); color: var(--muted, #6E655D);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  font-size: 13px; font-weight: 700; text-align: center; padding: 8px;
}

/* the end of the page */
.dc-end { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 16px 4px; color: var(--ink, #221D19); }
.dc-end-line { width: 44px; height: 4px; border-radius: 4px; background: var(--line-2, #E0D8CF); margin-bottom: 8px; }

/* See all */
.dc-see-head { display: flex; align-items: center; gap: 8px; }
.dc-see-head .icon-btn { background: var(--card, #FFFFFF); color: var(--ink, #221D19); }
.dc-see-head h1 { min-width: 0; }

@media (min-width: 560px) {
  .dc-vt { width: 140px; }
}
@media (min-width: 900px) {
  .dk-page .dc-row { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; scrollbar-width: thin; }
  .dk-page .dc-row::-webkit-scrollbar { display: block; height: 6px; }
  .dk-page .dc-lesson { width: 300px; }
  .dk-page .dc-vt { width: 158px; }
  .dk-page .dc-space { width: 260px; }
  .dk-page .dc-person { width: 160px; }
  .dk-page .dc-club { width: 340px; }
  .dk-page .dc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ---------- the full-screen video feed (/videos/feed) ---------- */
.fd-screen { position: fixed; inset: 0; z-index: 40; background: #000000; color: #FFFFFF; }
.fd-scroll {
  height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.fd-scroll::-webkit-scrollbar { display: none; }
.fd-slide, .fd-end {
  position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  width: 100%; max-width: calc(100dvh * 9 / 16); margin-inline: auto; overflow: hidden; background: #0B0908;
}
.fd-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fd-video, .fd-img, .fd-poster { width: 100%; height: 100%; object-fit: contain; display: block; }
.fd-embed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.fd-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.fd-embed:not(.tall) iframe { height: 56.25vw; max-height: 100%; }
.fd-poster { position: absolute; inset: 0; }
.fd-fallback { position: relative; color: rgba(255, 255, 255, 0.6); }
.fd-tap { position: absolute; inset: 0; background: transparent; border: 0; padding: 0; cursor: pointer; z-index: 1; }
.fd-paused { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; z-index: 2; color: rgba(255, 255, 255, 0.85); }
.fd-slide.is-paused .fd-paused { display: flex; }
.fd-sound, .fd-open {
  position: absolute; z-index: 3; border: 0; border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: 14px;
  background: rgba(0, 0, 0, 0.6); color: #FFFFFF; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
}
.fd-sound { top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 12px; }
.fd-open { bottom: 45%; inset-inline-start: 50%; transform: translateX(-50%); }
[dir="rtl"] .fd-open { transform: translateX(50%); }

.fd-info {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; gap: 8px;
  padding: 64px 16px calc(20px + env(safe-area-inset-bottom)); padding-inline-end: 72px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}
.fd-info a, .fd-info button { pointer-events: auto; }
.fd-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fd-author { display: flex; align-items: center; gap: 8px; color: #FFFFFF; text-decoration: none; min-width: 0; }
.fd-author:hover { color: #FFFFFF; }
.fd-who .qf-btn { height: 34px; padding: 0 12px; border-radius: 10px; flex: none; }
.fd-who .qf-btn.btn-secondary { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; border-color: transparent; }
.fd-title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.fd-cap { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.88); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fd-chip {
  align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); color: #FFFFFF; text-decoration: none;
  font-size: 13.5px; font-weight: 700; backdrop-filter: blur(6px);
}
.fd-chip:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.26); }
.fd-chip-when { font-weight: 500; opacity: 0.85; white-space: nowrap; flex: none; }
.fd-side {
  position: absolute; z-index: 3; inset-inline-end: 10px; bottom: calc(120px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 2px; color: #FFFFFF; text-decoration: none; font-size: 12.5px; font-weight: 700;
  width: 48px; padding: 8px 0; border-radius: 16px; background: rgba(0, 0, 0, 0.35);
}
.fd-side:hover { color: #FFFFFF; }
.fd-back {
  position: fixed; z-index: 41; top: calc(12px + env(safe-area-inset-top)); inset-inline-start: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.5); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.fd-end { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.fd-end-link { color: rgba(255, 255, 255, 0.85); font-weight: 700; }
@media (min-width: 900px) {
  .fd-back { top: 20px; inset-inline-start: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-scroll { scroll-behavior: auto; }
}
