/* Oley 2.3.1 — Admin Stories: round rail on the Reels header + full-screen viewer (stickers, link buttons, emoji reactions). */

/* ---------- rail on top of Reels ---------- */
.rl-stories { position: absolute; z-index: 6; top: 56px; left: 0; right: 0; padding: 2px 0 8px; pointer-events: none; }
.rs-rail { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 12px; pointer-events: auto; width: max-content; max-width: 100%; }
.rs-rail::-webkit-scrollbar { display: none; }
.rs { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: #fff; cursor: pointer; }
.rs-ring { position: relative; width: 58px; height: 58px; border-radius: 50%; padding: 2.5px; background: conic-gradient(from 210deg, #2678FF, #9B5CFF, #FF4D8D, #FFB648, #2678FF); transition: transform .15s; }
.rs:active .rs-ring { transform: scale(.93); }
.rs.seen .rs-ring { background: rgba(255,255,255,.35); }
.rs-in { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #111; border: 2.5px solid #080808; }
.rs-in img, .rs-in video { width: 100%; height: 100%; object-fit: cover; }
.rs-in .ico { width: 22px; height: 22px; }
.rs-play { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; font-style: normal; background: #2678FF; border: 2px solid #080808; color: #fff; }
.rs-name { font-size: 11px; font-weight: 600; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
@media (min-width: 1024px) {
  .rl-stories { top: 70px; left: 50%; right: auto; transform: translateX(-50%); width: min(calc(100% - 140px), calc((100dvh - 40px) * 9 / 16)); }
  .rs-rail { margin: 0 auto; }
}
.cs.seen .cs-ring { background: rgba(255,255,255,.3); }

/* ---------- viewer ---------- */
.csv2 .csv-frame { container-type: inline-size; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.csv2 .csv-stack { z-index: 1; display: grid; place-items: center; background: #000; }
.csv2 .csv-v { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.csv2 img.csv-v { object-fit: contain; background: #000; }
.csv-err { position: absolute; inset: auto 0 45%; text-align: center; color: #fff; opacity: .8; font-weight: 600; }
.csv-stk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.csv-emo { position: absolute; line-height: 1; white-space: nowrap; filter: drop-shadow(0 3px 8px rgba(0,0,0,.35)); animation: csvPop .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes csvPop { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }

.csv-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 26px; background: linear-gradient(rgba(0,0,0,.55), transparent); transition: opacity .2s; }
.csv2 .csv-bars { position: static; display: flex; gap: 4px; }
.csv-head { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: #fff; }
.csv-head b { display: block; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csv-head small { display: block; font-size: 12px; opacity: .75; }
.csv-head .grow { min-width: 0; flex: 1; }
.csv-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; background: linear-gradient(135deg, #2678FF, #9B5CFF); border: 2px solid rgba(255,255,255,.8); }
.csv-ib { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; border: 0; font-size: 16px; cursor: pointer; }
.csv-ib .ico { width: 20px; height: 20px; }
.csv2 .csv-x, .csv2 .csv-snd, .csv2 .csv-nav { display: none; }
.csv-pause { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; pointer-events: none; }
.csv2.held .csv-top, .csv2.held .csv-foot { opacity: 0; }

.csv2 .csv-foot { z-index: 5; gap: 10px; padding: 70px 12px calc(14px + var(--safe-b, 0px)); background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,.35) 60%, transparent); transition: opacity .2s; }
.csv-cap { margin: 0; color: #fff; font-size: 15px; line-height: 1.4; font-weight: 500; text-shadow: 0 1px 6px rgba(0,0,0,.6); white-space: pre-line; max-height: 7.2em; overflow: auto; }
.csv2 .csv-film { padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; text-decoration: none; }
.csv2 .csv-film img { width: 36px; height: 50px; }
.csv2 .csv-film b { font-size: 18px; }
.csv2 .csv-film small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #cfe0ff; }
.csv2 .csv-film small .ico { width: 13px; height: 13px; }
.csv-go { font-size: 26px; opacity: .8; }

.csv-btns { display: grid; gap: 8px; }
.csv-btns.n2 { grid-template-columns: 1fr 1fr; }
.csv-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 14px; border-radius: 14px; font-weight: 800; font-size: 15px; text-decoration: none; text-align: center; transition: transform .12s, filter .12s; }
.csv-btn:active { transform: scale(.97); }
.csv-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csv-btn .ic { font-size: 18px; }
.csv-btn .ext { opacity: .7; font-size: 13px; }
.csv-btn.st-primary { background: linear-gradient(115deg, #2678FF, #9B5CFF); color: #fff; box-shadow: 0 10px 28px -10px rgba(38,120,255,.9); }
.csv-btn.st-light { background: #fff; color: #0b0b0f; }
.csv-btn.st-dark { background: #111; color: #fff; border: 1px solid rgba(255,255,255,.18); }
.csv-btn.st-glass { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); }

.csv-react { display: flex; justify-content: space-between; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(0,0,0,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12); }
.csv-r { flex: 1; min-width: 0; height: 42px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: #fff; cursor: pointer; transition: transform .15s, background .15s; }
.csv-r span { font-size: 24px; line-height: 1; }
.csv-r small { font-size: 11px; font-weight: 700; opacity: .85; }
.csv-r:active { transform: scale(1.25); }
.csv-r.on { background: rgba(255,255,255,.2); }
.csv-r.on span { animation: csvPop .35s cubic-bezier(.2,1.6,.4,1); }

.csv-fly { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.csv-fly span { position: absolute; line-height: 1; animation: csvFly 1.5s ease-out forwards; }
@keyframes csvFly { 0% { opacity: 0; transform: translate(-50%, 0) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -30px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260px) scale(.9) rotate(18deg); } }
