/* Keep video pixels and captions intact; controls have their own touch area. */
.flow-video { object-fit: contain; }
.video-player { width: 100%; min-width: 0; background: #0b0b0d; color: #fff; }
.video-picture { position: relative; display: grid; place-items: center; overflow: hidden; }
.drop-media-gallery .drop-media-item .video-player video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(640px, 64svh);
  min-height: 120px;
  aspect-ratio: var(--video-ratio, 4 / 3);
  object-fit: contain;
  background: #0b0b0d;
}
.drop-media-gallery .drop-media-item:has(> .video-player) { max-height: none; }
.video-controls { display: flex; align-items: center; gap: 2px; padding: 2px 4px; min-height: 48px; }
.video-player .video-control {
  display: grid; place-items: center; flex: 0 0 44px;
  width: 44px; height: 44px; min-height: 44px; padding: 10px;
  border: 0; border-radius: 8px; background: transparent; color: #fff;
  cursor: pointer; touch-action: manipulation;
}
.video-player .video-control:hover { background: #ffffff1a; }
.video-control svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.video-player .video-control[hidden] { display: none; }
.video-player .video-seek {
  width: 100%; min-width: 32px; height: 44px; padding: 0; margin: 0 4px;
  border: 0; box-shadow: none; background: transparent; accent-color: #fff; cursor: pointer;
}
.video-time { flex: 0 0 auto; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; color: #b2b2ba; }
.video-toggle { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #fff; touch-action: manipulation; cursor: pointer; }
.video-state { display: none; border-radius: 50%; padding: 18px; min-width: 60px; background: rgba(11, 11, 13, 0.74); text-align: center; font-size: 21px; line-height: 1; }
.is-paused .video-state, .is-buffering .video-state, .has-error .video-state { display: block; }
.is-buffering .video-state, .has-error .video-state { font-size: 13px; border-radius: 18px; }
.video-message { position: absolute; bottom: 12px; left: 12px; right: 12px; padding: 8px; border-radius: 6px; background: rgba(11, 11, 13, 0.91); text-align: center; font-size: 12px; pointer-events: none; }
.video-message:empty { display: none; }
.video-player button:focus-visible, .video-player input:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.video-player:fullscreen { display: flex; flex-direction: column; justify-content: center; height: 100%; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.video-player:fullscreen .video-picture { flex: 1; min-height: 0; }
.drop-media-gallery .drop-media-item .video-player:fullscreen video { max-height: calc(100dvh - 52px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); height: 100%; }
@media (max-width: 360px) { .video-time { display: none; } }
