/* StreamNest — Tactile Console applied to the kid feed (queue) and
 * the theater (player) views. Same chunky 3px-bezel + 6px-bottom
 * press-down language as the landing page, recoloured to sunburst and
 * pink for kid-action surfaces. No drop-shadows, no rounded-pill
 * everything; reads as a tactile remote the kid is operating.
 */

.v2-shell.view-kid { max-width: 1080px; }

/* ── Top header (kid greet + daily meter + log-out) ──────────────── */
.feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 2px 18px;
}
.feed-greet { flex: 1; min-width: 0; }
.feed-hi {
  font-family: 'Paytone One', 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}
.feed-hi strong { color: var(--pink); }

/* Daily time meter — chunky bezel track, sunburst fill, three states. */
.feed-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.meter-track {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 260px;
  height: 18px;
  background: var(--surface);
  border: var(--bezel) solid var(--ink);
  border-bottom-width: 5px;
  border-radius: var(--r-pill);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  background: var(--sunburst);
  border-radius: var(--r-pill);
  transition: width 320ms cubic-bezier(.4, 0, .2, 1);
}
.meter-fill--warn { background: var(--pink); }
.meter-fill--max  { background: var(--danger); }
.meter-text {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.meter-text small {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.8125rem;
  margin-left: 2px;
}

.feed-out { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.feed-out-btn {
  background: var(--surface);
  color: var(--ink-soft);
  border: var(--bezel) solid var(--silver);
  border-bottom-width: 5px;
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: transform 80ms ease, border-bottom-width 80ms ease,
              background 120ms, border-color 120ms, color 120ms;
  -webkit-tap-highlight-color: transparent;
}
.feed-out-btn:hover {
  background: var(--silver-soft);
  color: var(--ink);
  border-color: var(--ink);
}
.feed-out-btn:active {
  transform: translateY(2px);
  border-bottom-width: 3px;
}

/* ── Eyebrow line under the header ───────────────────────────────── */
.feed-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin: 0 0 14px 2px;
}

/* ── Feed grid + cards ───────────────────────────────────────────── */
.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 540px) { .feed-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }
@media (min-width: 880px) { .feed-grid { grid-template-columns: 1fr 1fr 1fr; gap: 18px; } }

.feed-card-wrap { margin: 0; padding: 0; }
.feed-card { margin: 0; padding: 0; }

.feed-card-btn {
  display: block;
  width: 100%;
  padding: 0;
  background: var(--surface);
  border: var(--bezel) solid var(--ink);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-card);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 100ms ease,
              border-bottom-width 100ms ease,
              border-color 120ms;
}
.feed-card-btn:hover { border-color: var(--pink); }
.feed-card-btn:active {
  transform: translateY(3px);
  border-bottom-width: var(--bezel);
}
.feed-card-btn:focus-visible {
  outline: 3px solid var(--sunburst);
  outline-offset: 3px;
}

/* Thumbnail — sunburst gradient bg, no more teal-pale */
.feed-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--sunburst) 0%, var(--pink) 100%);
  overflow: hidden;
}
.feed-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feed-thumb.thumb-fail img { display: none; }
.feed-thumb.thumb-fail::after {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Paytone One', sans-serif;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
}

/* Sunburst play badge — chunky bezel circle, kid-action colour. */
.feed-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 58px;
  height: 58px;
  border: var(--bezel) solid var(--ink);
  border-bottom-width: 5px;
  border-radius: 50%;
  background: var(--sunburst);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease,
              background 140ms ease,
              border-bottom-width 100ms ease;
}
.feed-play-tri {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent var(--ink);
  margin-left: 4px;
  transition: border-color 140ms ease;
}
.feed-card-btn:hover .feed-play {
  transform: scale(1.08);
  background: var(--pink);
}
.feed-card-btn:hover .feed-play-tri {
  border-color: transparent transparent transparent var(--shell);
}
.feed-card-btn:active .feed-play {
  transform: translateY(2px) scale(1.04);
  border-bottom-width: 3px;
}

/* Card info — title + channel */
.feed-info { padding: 14px 18px 4px; }
.feed-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.feed-chan {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Like / favorite — chunky bezel pills (pink for liked, sunburst for fav) */
.feed-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px 14px;
  margin-top: -4px;
  background: transparent;
}
.feed-card-actions .feed-like-btn,
.feed-card-actions .feed-fav-btn { flex: 0 0 auto; }

.feed-like-btn,
.feed-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 2px solid var(--silver);
  border-bottom-width: 4px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 80ms ease,
              border-color 120ms,
              color 120ms,
              background 120ms,
              border-bottom-width 80ms ease;
}
.feed-like-btn:hover {
  background: var(--sunburst);
  border-color: var(--ink);
  color: var(--ink);
}
.feed-fav-btn:hover {
  background: var(--sunburst);
  border-color: var(--ink);
  color: var(--ink);
}
.feed-like-btn:active,
.feed-fav-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.feed-like-btn.feed-like-on {
  background: var(--pink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 800;
}
.feed-fav-btn.feed-fav-on {
  background: var(--sunburst);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 800;
}
/* Visual feedback while the like/fav fetch is in flight. The button is
   already disabled by JS, this just dims it so the kid sees the tap
   registered. */
.feed-like-btn.feed-like-pending,
.feed-fav-btn.feed-like-pending,
.feed-like-btn:disabled,
.feed-fav-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}
.feed-like-count,
.feed-fav-count { font-variant-numeric: tabular-nums; }

/* ── Player (theater) ───────────────────────────────────────────── */
.v2-shell.view-player {
  max-width: 1320px;
  background: var(--ink);
  color: #fff;
}
.v2-shell.view-player .v2-bar { padding-top: 18px; padding-bottom: 14px; }
.v2-shell.view-player .v2-foot {
  color: rgba(255, 255, 255, 0.6);
  padding-top: 8px;
  padding-bottom: 24px;
}
/* On the dark theater surface, the navy footer-banner card would
   disappear into the bg; lift it with a brand-cyan hairline border. */
.v2-shell.view-player .v2-foot-banner-link {
  background: #15192E;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.30),
              0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.v2-shell.view-player .v2-foot-banner-link:hover {
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.50),
              0 10px 24px -8px rgba(0, 0, 0, 0.7);
}

.player {
  margin: 0 calc(-1 * 18px);
}
/* Chunky bezel frame around the iframe — sunburst border so the frame
   stays visible on the dark theater surface. */
.player-frame {
  position: relative;
  background: #000;
  aspect-ratio: 16/9;
  border: var(--bezel) solid var(--sunburst);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-card);
  overflow: hidden;
}
.player-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-meta { padding: 24px 4px 8px; }
.player-eyebrow {
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--sunburst);
  margin: 0 0 6px;
  font-weight: 800;
}
.player-title {
  font-family: 'Paytone One', 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: #fff;
  line-height: 1.2;
}
.player-chan {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  font-weight: 500;
}
.player-chan-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--sunburst);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

/* Player actions — chunky bezel: back (sunburst) + done (ghost) */
.player-actions {
  display: flex;
  gap: 12px;
  padding: 20px 4px 36px;
}
.player-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 2;
  background: var(--sunburst);
  color: var(--ink);
  border: var(--bezel) solid var(--ink);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-btn);
  padding: 14px 22px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9375rem;
  min-height: 54px;
  transition: transform 80ms ease,
              border-bottom-width 100ms ease,
              background 120ms,
              color 120ms;
  -webkit-tap-highlight-color: transparent;
}
.player-back:hover { background: var(--pink); color: #fff; }
.player-back:active {
  transform: translateY(3px);
  border-bottom-width: var(--bezel);
}
.player-back-arrow { font-size: 1.15rem; line-height: 1; }
/* Done-watching button — ghost on dark theater, but with Tactile bezel. */
.player-done {
  flex: 1;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: var(--bezel) solid rgba(255, 255, 255, 0.4);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-btn);
  padding: 14px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  min-height: 54px;
  cursor: pointer;
  transition: transform 80ms ease,
              border-bottom-width 100ms ease,
              background 120ms,
              border-color 120ms;
  -webkit-tap-highlight-color: transparent;
}
.player-done:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.65);
}
.player-done:active {
  transform: translateY(3px);
  border-bottom-width: var(--bezel);
}

@media (max-width: 480px) {
  .player-actions { flex-direction: column; }
  .player-title { font-size: 1.3rem; }
}

/* ── Engagement row + curated comment on the play page ──────────── */
.player-engage {
  display: flex;
  gap: 10px;
  padding: 18px 0 0;
}
.player-engage .feed-like-btn,
.player-engage .feed-fav-btn {
  /* Same chunky bezel as on the queue cards */
}

/* Curated comment — chunky bezel card with sunburst icon medallion. */
.curated-comment {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: var(--bezel) solid var(--ink);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-card);
  padding: 16px 18px;
  margin: 0 0 14px;
}
.curated-comment-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: var(--sunburst);
  border: var(--bezel) solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 1px;
}
.curated-comment-body { flex: 1; min-width: 0; }
.curated-comment-by {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 4px;
}
.curated-comment-body p {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
  margin: 0;
}

/* ── Empty state — chunky bezel card with sunburst icon medallion ─ */
.feed-empty {
  text-align: center;
  padding: 48px 28px 44px;
  background: var(--surface);
  border: var(--bezel) solid var(--ink);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-card);
  margin-top: 8px;
}
.feed-empty-icon {
  width: 64px;
  height: 64px;
  background: var(--sunburst);
  border: var(--bezel) solid var(--ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  margin-bottom: 16px;
}
.feed-empty h2 {
  font-family: 'Paytone One', 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.feed-empty p {
  font-family: 'Outfit', sans-serif;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  margin: 0 auto 18px;
  max-width: 340px;
}
.feed-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  border: var(--bezel) solid var(--ink);
  border-bottom-width: var(--bezel-press);
  border-radius: var(--r-btn);
  padding: 12px 22px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9375rem;
  min-height: 50px;
  transition: transform 80ms ease,
              border-bottom-width 100ms ease,
              filter 120ms;
}
.feed-cta:hover { filter: brightness(1.05); }
.feed-cta:active {
  transform: translateY(3px);
  border-bottom-width: var(--bezel);
}

/* ── Counter chips under cards ──────────────────────────────────── */
.feed-likes {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}
.feed-thumbsup { color: var(--pink); }
.feed-fav      { color: var(--sunburst-dk); }

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .feed-card-btn,
  .feed-card-btn:active,
  .feed-play,
  .feed-like-btn,
  .feed-fav-btn,
  .feed-out-btn,
  .player-back,
  .player-done,
  .feed-cta {
    transition: none;
    transform: none;
  }
  .meter-fill { transition: none; }
}
