/* ====================================
   STAQ — CINEMATIC VIDEO MODAL v1
   Isolated styles
   ==================================== */

.staq-video-modal {
  position: fixed;
  inset: 0;

  width: min(1100px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100dvh - 40px);

  margin: auto;
  padding: 0;

  border: 0;
  border-radius: 14px;

  overflow: visible;

  background: transparent;
  color: #ffffff;
}

.staq-video-modal::backdrop {
  background: rgba(7, 7, 15, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Modal animation */

.staq-video-modal[open] {
  animation: staqVideoEnter 0.25s ease-out;
}

@keyframes staqVideoEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Player container */

.staq-video-shell {
  position: relative;
  width: 100%;
}

.staq-video-player {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;
  border-radius: 14px;

  background: #000;

  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.staq-video-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Floating close button */

.staq-video-close {
  position: absolute;
  z-index: 5;

  top: -54px;
  right: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.staq-video-close svg {
  width: 20px;
  height: 20px;
}

.staq-video-close:hover {
  background: #fc2e86;
  transform: rotate(90deg);
}

.staq-video-close:focus-visible {
  outline: 3px solid #8687fd;
  outline-offset: 3px;
}

/* Make native fullscreen video fill screen */

.staq-video-player video:fullscreen {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

/* Tablet */

@media (max-width: 900px) {
  .staq-video-modal {
    width: calc(100vw - 40px);
  }

  .staq-video-close {
    top: -50px;
  }
}

/* Mobile */

@media (max-width: 600px) {
  .staq-video-modal {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 80px);
  }

  .staq-video-player {
    border-radius: 10px;
  }

  .staq-video-close {
    top: -48px;
    width: 36px;
    height: 36px;
  }

  .staq-video-close svg {
    width: 18px;
    height: 18px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .staq-video-modal[open] {
    animation: none;
  }

  .staq-video-close {
    transition: none;
  }
}
