/* Video geometry belongs to the player, independent of the post and carousel. */
.post-video-player{--video-aspect:1.7777778;position:relative;display:flex;flex-direction:column;width:100%;min-width:0;min-height:0;max-height:var(--post-media-height,65dvh);background:#000;color:#e8eef6;overflow:visible;box-sizing:border-box}
.post-video-screen{position:relative;flex:0 1 auto;min-height:0;width:100%;aspect-ratio:var(--video-aspect);max-height:calc(var(--post-media-height,65dvh) - 40px);background:#000;overflow:hidden}
.post-video-player .post-video-screen>video{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;object-fit:contain;object-position:center;background:#000;aspect-ratio:auto;transform:none;border:0;border-radius:0}
.post-video-tools{display:flex;align-items:center;justify-content:flex-end;order:-1;flex:0 0 40px;min-height:40px;padding:0 10px;background:#11151b;box-sizing:border-box}
.post-video-expand{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 9px;border:0;border-radius:7px;background:transparent;color:#d9e4f2;font:inherit;font-size:11px;line-height:1.2;cursor:pointer;touch-action:manipulation}
.post-video-expand:hover{background:#ffffff12;color:white}.post-video-expand:focus-visible,.post-video-close:focus-visible{outline:2px solid #68baf1;outline-offset:1px}.post-video-expand .ui-icon{height:17px;width:17px;flex-shrink:0}
.post-video-error{position:absolute;inset:auto 12px 60px;padding:12px;border-radius:8px;background:#171c25ed;color:#f3bec2;text-align:center;font-size:12px;line-height:1.5;margin:0;pointer-events:none}.post-video-error[hidden]{display:none}
.swipe-gallery .media-slide>.post-video-player{align-self:stretch;justify-self:stretch}
.swipe-gallery .media-single .media-slide{height:auto;overflow:visible}
.swipe-gallery .media-swipe-rail .media-slide>.post-video-player{height:100%;max-height:none}
.swipe-gallery .media-swipe-rail .post-video-screen{flex:1 1 0;aspect-ratio:auto;max-height:none}
.swipe-gallery .media-swipe-rail{height:min(calc((100vw - 36px) / var(--media-aspect,1) + var(--media-tools-height,0px)),var(--post-media-height));max-height:none}
@supports(height:1cqw){.swipe-gallery .media-swipe-rail{height:min(calc(100cqw / var(--media-aspect,1) + var(--media-tools-height,0px)),var(--post-media-height))}}
.post-editor-stage .post-video-player{--post-media-height:55dvh}
.post-video-player:fullscreen{display:flex!important;flex-direction:column!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#000!important;overflow:hidden!important}
.post-video-player:fullscreen .post-video-screen{flex:1 1 0!important;aspect-ratio:auto!important;max-height:none!important;min-height:0!important}
.post-video-player:fullscreen .post-video-tools{padding-right:max(10px,env(safe-area-inset-right));padding-bottom:env(safe-area-inset-bottom);flex-basis:calc(40px + env(safe-area-inset-bottom))}
.post-video-player:-webkit-full-screen{display:flex!important;flex-direction:column!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:#000!important;overflow:hidden!important}
.post-video-player:-webkit-full-screen .post-video-screen{flex:1 1 0!important;aspect-ratio:auto!important;max-height:none!important;min-height:0!important}
video:fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;object-fit:contain!important;background:#000!important;transform:none!important}
video:-webkit-full-screen{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;object-fit:contain!important;background:#000!important;transform:none!important}
dialog.post-video-overlay{position:fixed;inset:0;display:none;width:100vw;height:100dvh;min-width:0;max-width:none;max-height:none;margin:0;padding:0;border:0!important;border-radius:0!important;background:#000!important;color:#e8eef6;box-shadow:none!important;overflow:hidden;box-sizing:border-box;overscroll-behavior:contain}
dialog.post-video-overlay[open]{display:flex;flex-direction:column;animation:none}
dialog.post-video-overlay::backdrop{background:#000;backdrop-filter:none}
.post-video-overlay-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:50px;padding:env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));background:#101318;box-sizing:border-box;font-size:12px;color:#b7c4d8}
.post-video-close{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:8px;background:#ffffff0a;color:#edf4fd;cursor:pointer;touch-action:manipulation}.post-video-close .ui-icon{width:21px;height:21px}
.post-video-overlay>.post-video-player{flex:1 1 0;height:0;max-height:none;min-height:0}
.post-video-overlay .post-video-screen{flex:1 1 0;aspect-ratio:auto;max-height:none;min-height:0}
.post-video-overlay .post-video-tools{padding-right:max(10px,env(safe-area-inset-right));padding-bottom:env(safe-area-inset-bottom);flex-basis:calc(40px + env(safe-area-inset-bottom))}
body:has(dialog.post-video-overlay[open]){overflow:hidden}
@media(max-width:680px){.post-video-expand{min-height:36px;font-size:12px}.creator-post-dialog .swipe-gallery{--post-media-height:58dvh}}
