/* Videos in Community: in the feed and full screen (community-video.js) */

/* ── in the feed: the video's own shape, a soft blurred fill instead of black bars ── */
.cvv-tile { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 560px; overflow: hidden; background: #0d0b0c; cursor: pointer; display: block; }
.cvv-tile.is-tall { aspect-ratio: 4 / 5; }
.cvv-tile.is-square { aspect-ratio: 1 / 1; }
.cvv-tile-bg { position: absolute; inset: -24px; background: #0d0b0c center / cover no-repeat; filter: blur(22px) brightness(.55) saturate(1.1); transform: scale(1.05); }
.cvv-tile video { position: relative; width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important; background: transparent !important; display: block; }
.cvv-tile-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.45); border: 1.5px solid rgba(255,255,255,.75); color: #fff; padding-left: 3px; box-sizing: border-box; transition: opacity .25s ease, transform .2s ease; pointer-events: none; }
.cvv-tile:hover .cvv-tile-play { transform: scale(1.06); }
.cvv-tile.is-playing .cvv-tile-play { opacity: 0; }
.cvv-tile-time { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font: 600 .72rem/1.3 var(--font-body, Inter, sans-serif); letter-spacing: .02em; pointer-events: none; }
.cvv-tile-time:empty { display: none; }
.cvv-tile-mute { position: absolute; left: 10px; bottom: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; pointer-events: none; }
.cvv-tile:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.cpx-gal-item:has(.cvv-tile) { max-height: none; }

/* ── full screen ── */
html.cvv-open, html.cvv-open body { overflow: hidden !important; }
.cvv { position: fixed; inset: 0; z-index: 100050; background: #000; color: #fff; font-family: var(--font-body, Inter, sans-serif); -webkit-tap-highlight-color: transparent; overscroll-behavior: contain; touch-action: pan-x; }
.cvv-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.cvv-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
@media (min-width: 900px) { .cvv-video { width: auto; max-width: min(100vw, 620px); } }
.cvv-big { position: absolute; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px; box-sizing: border-box;
  background: rgba(0,0,0,.45); border: 1.5px solid rgba(255,255,255,.7); opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.cvv.is-paused .cvv-big { opacity: 1; transform: scale(1); }
.cvv-load { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; opacity: 0; animation: cvvSpin .8s linear infinite; pointer-events: none; transition: opacity .2s ease .25s; }
.cvv.is-loading:not(.is-paused) .cvv-load { opacity: 1; }
@keyframes cvvSpin { to { transform: rotate(360deg); } }

.cvv-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: max(12px, env(safe-area-inset-top)) 12px 28px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); pointer-events: none; }
.cvv-top > * { pointer-events: auto; }
.cvv-ic { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.cvv-ic:hover { background: rgba(255,255,255,.12); }
.cvv-ic:disabled { opacity: .3; cursor: default; background: transparent; }

.cvv-rail { position: absolute; right: 8px; bottom: calc(150px + env(safe-area-inset-bottom)); display: grid; gap: 18px; justify-items: center; }
.cvv-act { display: grid; justify-items: center; gap: 4px; width: 56px; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 0; font: 600 .82rem/1 var(--font-body, Inter, sans-serif); filter: drop-shadow(0 1px 4px rgba(0,0,0,.7)); }
.cvv-act svg { transition: transform .15s ease; }
.cvv-act:active svg { transform: scale(.88); }
.cvv-act span:empty { display: none; }
.cvv-like.on { color: #ff4d6a; }
.cvv-like.on span { color: #fff; }

.cvv-nav { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: none; gap: 10px; }
@media (min-width: 900px) { .cvv-nav { display: grid; } .cvv-nav .cvv-ic { background: rgba(255,255,255,.1); } .cvv-nav .cvv-ic:hover { background: rgba(255,255,255,.2); } }

.cvv-info { position: absolute; left: 0; right: 72px; bottom: calc(22px + env(safe-area-inset-bottom)); padding: 0 16px; display: grid; gap: 10px; }
.cvv::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 240px; background: linear-gradient(0deg, rgba(0,0,0,.72), transparent); pointer-events: none; z-index: 0; }
.cvv-info, .cvv-rail, .cvv-bar { z-index: 1; }
.cvv-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cvv-author { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent; color: #fff; padding: 0; cursor: pointer; font: 700 .98rem/1.2 var(--font-body, Inter, sans-serif); text-align: left; }
.cvv-author img, .cvv-author span { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; font-weight: 800; background: #222; }
.cvv-author b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cvv-follow { flex: none; height: 34px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.85); background: transparent; color: #fff; font: 700 .85rem/1 var(--font-body, Inter, sans-serif); cursor: pointer; }
.cvv-follow.on { border-color: rgba(255,255,255,.35); color: rgba(255,255,255,.8); }
.cvv-follow:disabled { opacity: .6; }
.cvv-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.cvv-text p { margin: 0; font-size: .92rem; line-height: 1.45; text-shadow: 0 1px 3px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; }
.cvv-text.open p { -webkit-line-clamp: unset; display: block; max-height: 38vh; overflow-y: auto; }
.cvv-more { flex: none; border: 0; background: transparent; color: rgba(255,255,255,.75); font: 600 .9rem/1.45 var(--font-body, Inter, sans-serif); padding: 0; cursor: pointer; }

.cvv-bar { position: absolute; left: 16px; right: 16px; bottom: calc(8px + env(safe-area-inset-bottom)); height: 14px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.cvv-bar::before { content: ''; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); }
.cvv-fill { position: relative; height: 3px; border-radius: 3px; background: #fff; width: 0; }
.cvv-bar:hover::before, .cvv-bar:hover .cvv-fill { height: 5px; }
.cvv-time { position: absolute; right: 0; bottom: 14px; font-size: .7rem; font-weight: 600; color: rgba(255,255,255,.75); opacity: 0; transition: opacity .2s ease; }
.cvv.is-paused .cvv-time, .cvv-bar:hover .cvv-time { opacity: 1; }

.cvv.slide-up .cvv-stage { animation: cvvUp .28s cubic-bezier(.2,.8,.2,1); }
.cvv.slide-down .cvv-stage { animation: cvvDown .28s cubic-bezier(.2,.8,.2,1); }
@keyframes cvvUp { from { transform: translateY(14%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes cvvDown { from { transform: translateY(-14%); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cvv-load { animation: none; } .cvv.slide-up .cvv-stage, .cvv.slide-down .cvv-stage { animation: none; } }
