/* rb-2040-reels.css — 2040 Reels viewer re-skin (W16/W17), RINGBD theme.
   D-08 port (2026-11-25, stream B): byte-identical rules to staging sunshine's
   rb-2040-reels.css — header only changed. Pure re-skin on stock selectors
   (.wo_reels_cont, .shorts_events, .reels-author-action-overlay); it sets no
   video geometry, so it cannot fight the G-06 9:16 stage. (§8 styles the
   composer Reels entry button, which exists on ringbd too.)
   Staging only. Style only — no behaviour, endpoint, or logic change.
   Tokens: verbatim from W26 (~/workspace/logs/ringbd-2040/w26-design-tokens.md),
   reconciled with rebuild FINAL §1. All hex/rgba literals live in :root only;
   component rules use var(--rb-*) — no hex outside the token block.
   GEOMETRY LOCK: the verified eye-badge lift lives in rb-glass-player.css
   (.wo_reels_cont .video-text-overlay { bottom: 70px } @ max-width 480px,
   0px overlap, computed bottom 70px @390px). This file NEVER sets bottom,
   top, left, right, width, or height on .video-text-overlay or the glass bar.
   LOAD ORDER: coordinator adds the <link> in container.phtml AFTER the
   rb-glass-player.css line (:196) so these rules win on equal specificity.
   Reels purple (--rb-reels-*) is SCOPED to Reels surfaces only, never global. */

/* ---- 2040 tokens (W26 verbatim; glass fills match the live rb-glass bar) ---- */
:root {
  --rb-brand-50: #E6F7EE;
  --rb-brand-500: #00A651;
  --rb-brand-600: #008A44;
  --rb-brand-700: #006A4E;
  --rb-reels-400: #A78BFA;
  --rb-reels-500: #8B5CF6;
  --rb-reels-600: #7C3AED;
  --rb-reels-700: #C026D3;
  --rb-flag-red-500: #F42A41;
  --rb-flag-red-600: #D21F33;
  --rb-surface: #FFFFFF;
  --rb-background: #F0F2F5;
  --rb-surface-2: #E4E6EB;
  --rb-border: #E0E3E7;
  --rb-ink-900: #111827;
  --rb-ink-700: #374151;
  --rb-ink-500: #6B7280;
  --rb-info: #1570EF;
  --rb-glass-reels-chip: rgba(15, 23, 42, 0.62);
  --rb-glass-reels-chip-hover: rgba(0, 106, 78, 0.82);
  --rb-glass-reels-border: rgba(255, 255, 255, 0.22);
  --rb-glass-reels-border-strong: rgba(255, 255, 255, 0.35);
  --rb-glass-reels-text: #F8FAFC;
  --rb-glass-reels-count: #E2E8F0;
  --rb-shadow-text: rgba(0, 0, 0, 0.55);
  --rb-shadow-text-strong: rgba(0, 0, 0, 0.6);
  --rb-reels-500-10: rgba(139, 92, 246, 0.10);
  --rb-elev-glass-1: 0 2px 12px rgba(0, 0, 0, 0.10), 0 0 1px rgba(0, 0, 0, 0.06);
  --rb-elev-4: 0 8px 24px rgba(0, 0, 0, 0.16);
  --rb-motion-fast: 150ms;
  --rb-motion-base: 250ms;
  --rb-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --rb-radius-md: 12px;
  --rb-radius-lg: 16px;
  --rb-radius-full: 999px;
}

/* ---- 1. Viewer rail: .video-text-overlay (players/video.phtml) ----
   Geometry untouched: no bottom/position/size set here. Rail is a
   bottom-anchored flex column (rb-glass-player.css); this styles the
   chips inside it only. 24px glyph, 56px targets (W26 §2.2). */
.wo_reels_cont .video-text-overlay .shorts_events > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.wo_reels_cont .video-text-overlay .shorts_events > div > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 56px;
  min-height: 56px;
  cursor: pointer;
}
/* Glass chip behind every rail glyph (avatar excepted — see below). */
.wo_reels_cont .video-text-overlay .shorts_events > div > div > svg {
  box-sizing: content-box;
  width: 24px;
  height: 24px;
  padding: 12px;
  border-radius: 50%;
  background: var(--rb-glass-reels-chip);
  border: 1px solid var(--rb-glass-reels-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  color: var(--rb-glass-reels-text);
  box-shadow: var(--rb-elev-glass-1);
  transition: background var(--rb-motion-fast) var(--rb-ease-out),
    transform var(--rb-motion-fast) var(--rb-ease-out);
}
.wo_reels_cont .video-text-overlay .shorts_events > div > div:hover > svg,
.wo_reels_cont .video-text-overlay .shorts_events > div > div:focus-visible > svg {
  background: var(--rb-glass-reels-chip-hover);
  transform: scale(1.06);
}
.wo_reels_cont .video-text-overlay .shorts_events > div > div:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
  border-radius: var(--rb-radius-md);
}
/* Counts under each rail glyph: white 11px bold, tabular figures. */
.wo_reels_cont .video-text-overlay .shorts_events p {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--rb-glass-reels-count);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 6px var(--rb-shadow-text);
}
/* Liked state: solid brand fill on the chip, never colour-only (weight + fill). */
.wo_reels_cont .video-text-overlay .reels_like_btn.active-like > svg {
  background: linear-gradient(180deg, var(--rb-brand-500), var(--rb-brand-600));
  border-color: transparent;
}
/* Eye-badge (views): same chip language; the count is real data, styled only. */
.wo_reels_cont .video-text-overlay .shorts_events [id^="video-views-count-"] {
  color: var(--rb-glass-reels-count);
}
/* Author avatar in the rail: 40px round, 2px white ring (W26 §1.10). */
.wo_reels_cont .video-text-overlay .shorts_events .user-avatar {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--rb-glass-reels-text);
  box-shadow: var(--rb-elev-glass-1);
}
.wo_reels_cont .video-text-overlay .shorts_events .user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- 2. Add Friend (follow) button — reels/list.phtml overlay ----
   Position untouched (inline top:12px right:76px). Brand-gradient pill. */
.reels-author-action-overlay button,
.reels-author-action-overlay .btn {
  background: linear-gradient(180deg, var(--rb-brand-500), var(--rb-brand-600));
  color: var(--rb-surface);
  border: 1px solid var(--rb-glass-reels-border-strong);
  border-radius: var(--rb-radius-full);
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 36px;
  padding: 8px 16px;
  box-shadow: var(--rb-elev-glass-1);
  transition: background var(--rb-motion-fast) var(--rb-ease-out),
    transform var(--rb-motion-fast) var(--rb-ease-out);
}
.reels-author-action-overlay button:hover,
.reels-author-action-overlay .btn:hover {
  background: linear-gradient(180deg, var(--rb-brand-600), var(--rb-brand-700));
  transform: scale(1.03);
}
.reels-author-action-overlay button:focus-visible,
.reels-author-action-overlay .btn:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
}

/* ---- 3. Prev / next changers — reels/list.phtml ----
   Glass circles; position/geometry untouched. 48px hit area. */
.wo_reels_cont .changer {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rb-glass-reels-chip);
  border: 1px solid var(--rb-glass-reels-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--rb-elev-glass-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--rb-motion-fast) var(--rb-ease-out),
    transform var(--rb-motion-fast) var(--rb-ease-out);
}
.wo_reels_cont .changer:hover,
.wo_reels_cont .changer:focus-visible {
  background: var(--rb-glass-reels-chip-hover);
  transform: scale(1.06);
}
.wo_reels_cont .changer:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
}
.wo_reels_cont .changer svg {
  color: var(--rb-glass-reels-text);
}

/* ---- 4. Delete (own reel) — reels/list.phtml ----
   Glass chip; red only on hover/press (red rule: once per screen). */
.wo_reels_cont .btn-delete-reel {
  background: var(--rb-glass-reels-chip);
  border: 1px solid var(--rb-glass-reels-border);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-radius: 50%;
  color: var(--rb-glass-reels-text);
  box-shadow: var(--rb-elev-glass-1);
  transition: background var(--rb-motion-fast) var(--rb-ease-out);
}
.wo_reels_cont .btn-delete-reel:hover,
.wo_reels_cont .btn-delete-reel:focus-visible {
  background: var(--rb-flag-red-500);
  border-color: transparent;
}
.wo_reels_cont .btn-delete-reel:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
}

/* ---- 5. Reel title overlay — players/video.phtml ----
   Font/colour/shadow only; position untouched. */
.wo_reels_cont .video-post-text-overlay p {
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rb-glass-reels-text);
  text-shadow: 0 1px 8px var(--rb-shadow-text-strong);
}

/* ---- 6. Comment panel (lightbox right) — reels/list.phtml ----
   Solid surface (glass is for chrome over media, never body text — W26 §1.8). */
.reels-section .user-name {
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rb-ink-900);
}
.reels-section .comment-inner-header .time,
.reels-section .ajax-time {
  color: var(--rb-ink-500);
  font-size: 13px;
}
.reels-section .comment-textarea:focus {
  border: 2px solid var(--rb-brand-500);
  box-shadow: 0 0 0 4px var(--rb-brand-50);
  outline: none;
}
.reels-section .view-more-wrapper span {
  color: var(--rb-brand-700);
  font-weight: 700;
}
.reels-section .lightbox-no-comments h5 {
  color: var(--rb-ink-700);
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-weight: 700;
}

/* ---- 7. Delete modal — reels/content.phtml ----
   Solid surface per FINAL (glass sheet HELD, W26 conflict C4). Radius 16px. */
#delete-reel-modal .modal-content {
  background: var(--rb-surface);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-lg);
  box-shadow: var(--rb-elev-4);
}
#delete-reel-modal .modal-title {
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rb-ink-900);
}
#delete-reel-modal .modal-body p {
  color: var(--rb-ink-700);
  font-size: 15px;
  line-height: 1.5;
}
#delete-reel-modal .btn-mat {
  background: var(--rb-flag-red-500);
  color: var(--rb-surface);
  border-radius: var(--rb-radius-md);
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  transition: background var(--rb-motion-fast) var(--rb-ease-out);
}
#delete-reel-modal .btn-mat:hover {
  background: var(--rb-flag-red-600);
}
#delete-reel-modal .btn-mat:focus-visible,
#delete-reel-modal .close:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
}
#delete-reel-modal .close {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- 8. Studio entry (composer, W35's publisher-box.phtml — hook only, no edit) ----
   The Reels create entry button; Reels purple SCOPED here only. The upload /
   editor / publish chrome lives in the composer file (W35) and is NOT
   re-skinned by this file — flagged as remaining for W35/W17 follow-up. */
.rb-action-reels {
  border-radius: var(--rb-radius-md);
  transition: background var(--rb-motion-fast) var(--rb-ease-out);
}
.rb-action-reels:hover,
.rb-action-reels:focus-visible {
  background: var(--rb-reels-500-10);
}
.rb-action-reels:focus-visible {
  outline: 2px solid var(--rb-info);
  outline-offset: 2px;
}
.rb-action-reels span {
  font-family: "Baloo Da 2", system-ui, sans-serif;
  font-weight: 700;
  color: var(--rb-ink-700);
}

/* ---- 9. Reduced motion (first-class, W26 §1.11) ---- */
@media (prefers-reduced-motion: reduce) {
  .wo_reels_cont .video-text-overlay .shorts_events > div > div > svg,
  .wo_reels_cont .changer,
  .reels-author-action-overlay button,
  .reels-author-action-overlay .btn,
  .wo_reels_cont .btn-delete-reel,
  #delete-reel-modal .btn-mat,
  .rb-action-reels {
    transition: none;
  }
  .wo_reels_cont .video-text-overlay .shorts_events > div > div:hover > svg,
  .wo_reels_cont .changer:hover {
    transform: none;
  }
}
