/* Vidlify player, shared by the watch page and the embed.
   The same bar as the player on the landing page: play, time, a thin amber track, the mark. */

.vp { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; color: #ededed; font: 400 14px/20px "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; user-select: none; -webkit-tap-highlight-color: transparent; }
.vp video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vp.is-idle { cursor: none; }
.vp-i { flex: none; display: block; }
.vp :focus { outline: none; }
.vp :focus-visible { outline: 2px solid #f2a93b; outline-offset: 2px; }

/* Bar */
.vp-chrome { transition: opacity 240ms cubic-bezier(.22, 1, .36, 1), transform 240ms cubic-bezier(.22, 1, .36, 1); }
.vp.is-idle .vp-chrome { opacity: 0; pointer-events: none; }
.vp.is-idle .vp-bar { transform: translateY(8px); }
.vp.is-fresh .vp-bar { opacity: 0; pointer-events: none; }
.vp.is-fresh:hover .vp-bar, .vp.is-fresh:focus-within .vp-bar { opacity: 1; pointer-events: auto; }

.vp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 40px 12px 8px; background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .32) 56%, transparent); }
.vp-btn { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #ededed; cursor: pointer; transition: background-color 150ms cubic-bezier(.22, 1, .36, 1), color 150ms cubic-bezier(.22, 1, .36, 1); }
.vp-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.vp-btn:active .vp-i { transform: scale(.9); }
.vp-btn .vp-i { transition: transform 150ms cubic-bezier(.22, 1, .36, 1); }
.vp-btn[hidden] { display: none; }

.vp-time { flex: none; padding: 0 8px 0 4px; color: #d2d2d6; font: 12px/1 "VidlifyMono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Track: 3px like on the landing page, 5px under the pointer */
.vp-track { position: relative; flex: 1; min-width: 48px; height: 24px; margin: 0 8px; cursor: pointer; touch-action: none; }
.vp-rail { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; transition: height 150ms cubic-bezier(.22, 1, .36, 1), margin-top 150ms cubic-bezier(.22, 1, .36, 1); }
.vp-buf, .vp-played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.vp-buf { background: rgba(255, 255, 255, .28); }
.vp-played { background: #f2a93b; }
.vp-thumb { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #f2a93b; box-shadow: 0 0 0 3px rgba(0, 0, 0, .24); transform: scale(0); transition: transform 150ms cubic-bezier(.22, 1, .36, 1); }
.vp-tip { position: absolute; bottom: 24px; left: 0; padding: 2px 6px; border-radius: 6px; background: rgba(20, 20, 21, .92); color: #ededed; font: 12px/16px "VidlifyMono", ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none; transition: opacity 150ms cubic-bezier(.22, 1, .36, 1), transform 150ms cubic-bezier(.22, 1, .36, 1); }
.vp-track:hover .vp-rail, .vp-track.is-drag .vp-rail, .vp-track:focus-visible .vp-rail { height: 5px; margin-top: -2.5px; }
.vp-track:hover .vp-thumb, .vp-track.is-drag .vp-thumb, .vp-track:focus-visible .vp-thumb { transform: scale(1); }
.vp-track:hover .vp-tip, .vp-track.is-drag .vp-tip { opacity: 1; transform: translateX(-50%); }
.vp-track:focus-visible { outline-offset: 4px; border-radius: 4px; }

/* Volume opens to the side on hover */
.vp-vol { display: flex; align-items: center; flex: none; }
.vp-volume { position: relative; width: 0; height: 24px; margin: 0; overflow: hidden; cursor: pointer; touch-action: none; transition: width 200ms cubic-bezier(.22, 1, .36, 1), margin 200ms cubic-bezier(.22, 1, .36, 1); }
.vp-vol:hover .vp-volume, .vp-vol:focus-within .vp-volume, .vp-volume.is-drag { width: 64px; margin: 0 8px 0 4px; overflow: visible; }
.vp-vrail { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.vp-vfill { position: absolute; left: 0; top: 0; bottom: 0; background: #ededed; }
.vp-vthumb { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #ededed; }

/* Brand: the same mark as in the header */
.vp-brand { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 8px; margin-left: 4px; border-radius: 8px; color: #d2d2d6; font-size: 12px; font-weight: 500; text-decoration: none; transition: background-color 150ms cubic-bezier(.22, 1, .36, 1), color 150ms cubic-bezier(.22, 1, .36, 1); }
a.vp-brand:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.vp-mark { position: relative; display: block; flex: none; width: 14px; height: 14px; border-radius: 4px; background: #f2a93b; }
.vp-mark::after { content: ""; position: absolute; left: 5px; top: 4px; border-left: 5px solid #1c1405; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }

/* Settings */
.vp-menu-wrap { position: relative; flex: none; }
.vp-set .vp-i { transition: transform 300ms cubic-bezier(.22, 1, .36, 1); }
.vp.is-menu .vp-set .vp-i { transform: rotate(60deg); }
.vp-menu { position: absolute; right: -40px; bottom: 44px; z-index: 5; min-width: 208px; max-height: calc(var(--vp-h, 400px) - 72px); overflow-y: auto; padding: 4px; border: 1px solid rgba(237, 237, 237, .1); border-radius: 12px; background: rgba(20, 20, 21, .94); animation: vp-pop 180ms cubic-bezier(.22, 1, .36, 1) both; transform-origin: 80% 100%; }
.vp-menu[hidden] { display: none; }
@keyframes vp-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.vp-mi { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px 0 12px; border: 0; border-radius: 8px; background: transparent; color: #ededed; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.vp-mi:hover, .vp-mi:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.vp-mi > .vp-i:first-child { margin-left: -4px; color: #a1a1a6; }
.vp-mi-l { flex: 1; }
.vp-mi-v { color: #a1a1a6; font: 12px/1 "VidlifyMono", ui-monospace, monospace; }
.vp-mi .vp-i:last-child:not(:first-child) { color: #85858b; }
.vp-mi-c { display: grid; place-items: center; width: 16px; height: 16px; color: #f2a93b; }
.vp-mi-head { color: #a1a1a6; margin-bottom: 4px; border-bottom: 1px solid rgba(237, 237, 237, .08); border-radius: 8px 8px 0 0; }

/* Big play before the first frame: the logo mark, made large */
.vp-big { position: absolute; left: 50%; top: 50%; z-index: 2; display: none; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0; border: 0; border-radius: 18px; background: #f2a93b; color: #1c1405; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .32); transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background-color 150ms cubic-bezier(.22, 1, .36, 1); }
.vp.is-fresh .vp-big { display: grid; place-items: center; animation: vp-in 400ms cubic-bezier(.22, 1, .36, 1) both; }
.vp-big:hover { transform: scale(1.05); background: #f5b752; }
.vp-big:active { transform: scale(.96); }
.vp-big .vp-i { fill: currentColor; margin-left: 4px; }
@keyframes vp-in { from { opacity: 0; transform: scale(.9); } }

/* Short answer in the middle when you click or press space */
.vp-flash { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0, 0, 0, .56); color: #fff; opacity: 0; pointer-events: none; }
.vp-flash.go { animation: vp-flash 480ms cubic-bezier(.22, 1, .36, 1) both; }
.vp-flash .vp-i { fill: currentColor; }
@keyframes vp-flash { 0% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.25); } }

/* Buffering */
.vp-spinner { position: absolute; left: 50%; top: 50%; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 2px solid rgba(255, 255, 255, .16); border-top-color: #f2a93b; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity 200ms cubic-bezier(.22, 1, .36, 1) 200ms; animation: vp-spin .9s linear infinite; }
.vp.is-waiting .vp-spinner { opacity: 1; }
@keyframes vp-spin { to { transform: rotate(360deg); } }

.vp-error { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; gap: 4px; padding: 24px; background: #141415; text-align: center; }
.vp-error[hidden] { display: none; }
.vp-error p { margin: 0; color: #a1a1a6; font-size: 13px; }
.vp-error p:first-child { color: #ededed; font-size: 14px; font-weight: 500; }
.vp.is-error .vp-bar, .vp.is-error .vp-big { display: none; }

/* Full screen */
.vp:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.vp:-webkit-full-screen { width: 100%; height: 100%; }
.vp.is-fs .vp-bar { padding: 64px 24px 16px; }

/* Small embeds */
.vp.is-narrow .vp-bar { padding: 32px 8px 4px; gap: 0; }
.vp.is-narrow .vp-brand-name { display: none; }
.vp.is-narrow .vp-brand { padding: 0 11px; }
.vp.is-narrow .vp-volume { display: none; }
.vp.is-narrow .vp-track { margin: 0 4px; }
.vp.is-tiny .vp-time { display: none; }
@media (hover: none) {
  .vp-volume { display: none; }
  .vp-thumb { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .vp *, .vp *::before, .vp *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .vp-spinner { animation: vp-spin 1.6s linear infinite !important; }
}
