/* ============================================================ */
/* MODAL                                                         */
/* ============================================================ */

.ra-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ra-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.ra-modal__content {
  position: relative;
  width: min(90vw, 960px);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ra-modal.is-open .ra-modal__content {
  transform: scale(1);
}

.ra-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 1.25rem;
  transition: background 0.2s;
  z-index: 10;
}

.ra-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ra-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.ra-modal__player {
  width: 100%;
  height: 100%;
}

.ra-modal__player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 480px) {
  .ra-modal__content {
    width: 100vw;
    border-radius: 0;
  }

  .ra-modal__close {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ra-modal,
  .ra-modal__content {
    transition: none;
  }
}
