/* Player controls for feed + shared videos. JS: public/js/video-controls.js */
.svc-host { position: relative; }
.svc { position: absolute; inset: 0; z-index: 4; pointer-events: none; font-family: system-ui, -apple-system, sans-serif; }
.svc-tap { position: absolute; inset: 0; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.svc-mid, .svc-bar { opacity: 0; transition: opacity .2s ease; }
.svc-host.svc-show .svc-mid, .svc-host.svc-show .svc-bar, .svc-host.svc-paused .svc-mid, .svc-host.svc-paused .svc-bar { opacity: 1; }
.svc-host.svc-show .svc-mid *, .svc-host.svc-show .svc-bar *, .svc-host.svc-paused .svc-mid *, .svc-host.svc-paused .svc-bar * { pointer-events: auto; }
/* soft shade so white controls read on bright videos */
.svc-host.svc-show .svc-tap, .svc-host.svc-paused .svc-tap { background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.55)); }

.svc-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(18px, 8vw, 46px); }
.svc-mid button { pointer-events: none; display: grid; place-items: center; border: 0; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.svc-play { width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.55); }
.svc-play svg { width: 34px; height: 34px; fill: #fff; }
.svc-skip { width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.4); font-size: 22px; line-height: 1; position: relative; }
.svc-skip small { position: absolute; font-size: 9px; font-weight: 700; top: 50%; left: 50%; transform: translate(-50%, -38%); }

.svc-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; color: #fff; }
.svc-time { font: 600 12px/1 system-ui, sans-serif; min-width: 34px; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; pointer-events: none; }
.svc-track { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.svc-track::before, .svc-track i, .svc-track b { position: absolute; top: 50%; transform: translateY(-50%); }
.svc-track::before { content: ''; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.svc-buf { left: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); width: 0; }
.svc-fill { left: 0; height: 4px; border-radius: 2px; background: #ef4444; width: 0; }
.svc-knob { width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.25); left: 0; }
.svc-host.svc-dragging .svc-track::before, .svc-host.svc-dragging .svc-fill, .svc-host.svc-dragging .svc-buf { height: 6px; }
.svc-host.svc-dragging .svc-knob { width: 20px; height: 20px; margin-left: -10px; }
.svc-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 15px; line-height: 32px; display: grid; place-items: center; cursor: pointer; flex: 0 0 32px; }
.svc-btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; }

.svc-resume { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(15,23,42,.85); color: #fff; font: 600 12.5px/1.2 system-ui, sans-serif; white-space: nowrap; pointer-events: auto; z-index: 2; }
.svc-resume[hidden] { display: none; }
.svc-resume button { border: 0; border-radius: 999px; padding: 6px 10px; background: #fff; color: #0f172a; font-weight: 700; font-size: 12px; cursor: pointer; }

/* The feed's own little sound button would sit under our bar — the bar has its own. */
.svc-host > .ig2-mute { display: none !important; }
/* Shared-video page stage */
.sv-share-stage { position: relative; width: 100%; background: #000; overflow: hidden; }
.sv-share-stage video { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Fullscreen: whole screen, controls on top */
.svc-host:fullscreen, .svc-host:-webkit-full-screen { width: 100vw !important; height: 100vh !important; max-height: none !important; aspect-ratio: auto !important; background: #000 !important; }
.svc-host:fullscreen video, .svc-host:-webkit-full-screen video { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important; }
@media (max-width: 420px) { .svc-time { font-size: 11px; min-width: 30px; } .svc-btn { width: 28px; height: 28px; flex-basis: 28px; } .svc-play { width: 56px; height: 56px; } }

/* Post owner tools: Replace video (post-manage.js) + paused posts in My Library */
.sv-replace-video{display:grid;gap:6px;padding:10px 12px;border:1.5px dashed #c7d2fe;border-radius:12px;background:#eef2ff;margin:0 0 10px}
.sv-replace-video strong{font-size:14px;color:#312e81}
.sv-replace-pick{display:grid;gap:4px;font-weight:600;font-size:13px}
.sv-replace-video progress{width:100%;height:6px;accent-color:#4f46e5}
.sv-replace-note{font-size:12px;color:#475569;line-height:1.4}
.sv-replace-note.is-busy{color:#b45309;font-weight:600}
.sv-replace-note.is-error{color:#dc2626;font-weight:600}
.lib-tile.is-paused .lib-thumb{opacity:.55}
.lib-tile.is-paused .lib-badge{background:#64748b;color:#fff}
.lib-resume{margin:0}
.lib-resume button{width:100%;min-height:36px;border:0;border-radius:10px;background:#16a34a;color:#fff;font-weight:700;cursor:pointer}
/* My Library tile owner tools */
.lib-actions{display:flex;gap:6px;align-items:center}
.lib-actions form{margin:0}
.lib-act{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#0f172a;font:600 12.5px/1 system-ui,sans-serif;text-decoration:none;cursor:pointer}
.lib-act:hover{border-color:#2563eb;color:#2563eb}
.lib-act.is-go{background:#16a34a;border-color:#16a34a;color:#fff}
.lib-act.is-danger{color:#dc2626;border-color:#fecaca}