/* Video modal — Jira-style overlay popup */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.video-modal__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  max-height: calc(100vh - var(--space-2xl));
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal__content {
  width: 100%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--space-2xl));
  animation: videoModalSlideIn 0.25s ease;
}

@keyframes videoModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.video-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--color-border);
}

.video-modal__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-heading);
  font-family: var(--font-sans);
}

.video-modal__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.video-modal__close:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}

.video-modal__body {
  flex: 1;
  min-height: 0;
  padding: 0;
}

.video-modal__video {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 120px);
  display: block;
  background: #000;
}

@media (max-width: 768px) {
  .video-modal {
    padding: var(--space-md);
  }

  .video-modal__header {
    padding: var(--space-sm) var(--space-md);
  }

  .video-modal__title {
    font-size: var(--text-sm);
  }
}
