/* Mobile floating-video surface: user-positioned and user-resizable after playback. */

.s5-floating-drag,
.s5-floating-resize {
  display: none;
}

@media (max-width: 760px) {
  .is-following.s5-floating-custom {
    right: auto !important;
    bottom: auto !important;
    max-width: calc(100vw - 20px) !important;
    min-width: 176px;
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 18px 56px rgba(0,0,0,.4) !important;
    will-change: left, top, width;
  }

  .is-following.s5-floating-custom .s5-floating-drag,
  .is-following.s5-floating-custom .s5-floating-resize {
    position: absolute;
    z-index: 120;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 999px;
    background: rgba(4,7,11,.78);
    backdrop-filter: blur(12px);
    color: #fff;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .is-following.s5-floating-custom .s5-floating-drag {
    top: 8px;
    left: 8px;
    font-size: 18px;
  }

  .is-following.s5-floating-custom .s5-floating-resize {
    right: 7px;
    bottom: 48px;
    cursor: ew-resize;
    font-size: 17px;
  }

  .is-following.s5-floating-custom .s5-floating-drag:active {
    cursor: grabbing;
  }

  .is-following.s5-floating-custom .s5-floating-drag:hover,
  .is-following.s5-floating-custom .s5-floating-resize:hover,
  .is-following.s5-floating-custom .s5-floating-drag:focus-visible,
  .is-following.s5-floating-custom .s5-floating-resize:focus-visible {
    border-color: rgba(255,255,255,.82);
    background: rgba(4,7,11,.96);
    outline: 2px solid rgba(255,255,255,.9);
    outline-offset: 2px;
  }

  .is-following.s5-floating-custom video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-following.s5-floating-custom {
    transition: none !important;
  }
}
