/* Clip swipe feed (clip-feed.js). Full-screen vertical feed with scroll-snap; one RedGIFs player
   mounted for the active clip plus one ahead, posters for the rest. */
html.cf-on, html.cf-on body { overflow: hidden !important; overscroll-behavior: none; }
.cf { position: fixed; inset: 0; z-index: 2147483000; background: #000; color: #f5f5f7;
  font-family: var(--a-font, -apple-system, BlinkMacSystemFont, 'Inter', sans-serif); -webkit-tap-highlight-color: transparent; }
.cf[hidden] { display: none !important; }
.cf-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory;
  overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cf-scroll::-webkit-scrollbar { display: none; }
.cf-slide { position: relative; height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.cf-media { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: calc(100vh * 9 / 16); max-width: calc(100dvh * 9 / 16); background: #000; }
@media (max-width: 767.98px) { .cf-media { max-width: none; } }
.cf-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cf-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .25s ease; }
.cf-media iframe.is-ready { opacity: 1; }
.cf-media .cf-info { z-index: 2; }

/* overlay: title, author, tags (left, above the player's own bottom bar; clear of its right-side buttons) */
.cf-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 76px calc(98px + env(safe-area-inset-bottom)) 16px;
  pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,0) 0, rgba(0,0,0,0) 90px, rgba(0,0,0,.42) 150px, rgba(0,0,0,0) 100%); }
.cf-info > * { pointer-events: auto; }
.cf-title { margin: 0 0 6px; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-author { display: inline-flex; align-items: center; gap: 5px; color: #f5f5f7; font-size: 14px; font-weight: 600;
  text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); margin-bottom: 8px; }
.cf-author:hover { color: #fff; text-decoration: underline; }
.cf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #f5f5f7;
  background: rgba(60,60,67,.55); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); text-decoration: none; }
.cf-tag:hover { color: #fff; background: rgba(90,90,96,.65); }

/* glass buttons */
.cf-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; border: 0;
  color: #f5f5f7; background: rgba(30,30,32,.55); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 6px rgba(0,0,0,.25); cursor: pointer; padding: 0; }
.cf-btn:active { transform: scale(.94); }
.cf-btn.done { color: #30d158; }
.cf-top { position: absolute; z-index: 3; top: calc(10px + env(safe-area-inset-top)); right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.cf-top > * { pointer-events: auto; }
.cf-side { position: absolute; z-index: 3; right: 12px; top: 46%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
.cf-nav { display: none; position: absolute; z-index: 3; right: 24px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 12px; }
@media (min-width: 768px) and (hover: hover) {
  .cf-nav { display: flex; }
  .cf-side { right: calc(50% - min(50vw, 50dvh * 9 / 16) - 60px); }
  .cf-top { right: 24px; }
}
.cf-hint { position: absolute; z-index: 4; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: rgba(30,30,32,.72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  transition: opacity .4s ease; pointer-events: none; }
.cf-hint.out { opacity: 0; }
.cf-hint svg { animation: cf-bob 1.2s ease-in-out infinite; }
@keyframes cf-bob { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cf-hint svg { animation: none; } .cf-media iframe { transition: none; } }

/* "Watch as feed" on the clip page */
.layout-v2 .v-acts .cf-open { background: var(--a-label, #f5f5f7); color: #000; }
