/* =============================================
   Video Modal — YouTube/Vimeo 인라인 재생
   /learn + dashboard featured에서 공유
   ============================================= */

.video-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  opacity: 0;
  transition: opacity .2s ease;
}
.video-modal-backdrop.is-open {
  display: flex;
  opacity: 1;
}

.video-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1080px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  transform: translateY(8px) scale(.98);
  transition: transform .22s ease;
}
.video-modal-backdrop.is-open .video-modal-dialog {
  transform: translateY(0) scale(1);
}

.video-modal-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-modal-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-modal-close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background .15s;
}
.video-modal-close:hover {
  background: rgba(255, 255, 255, .25);
}

.video-modal-title {
  padding: .85rem 1rem;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .04);
  border-top: 1px solid rgba(255, 255, 255, .08);
  margin: 0;
}

@media (max-width: 640px) {
  .video-modal-backdrop { padding: 1rem .5rem; }
  .video-modal-close { top: -36px; }
}

/* 카드 클릭 영역 — anchor → button 교체 시 시각 유지.
   배경/테두리는 wrapper 클래스(.learn-card/.featured-video-card)가 책임지고,
   여기서는 button user-agent의 layout 영향만 무력화 (text-align/font/color 상속 등).
   ⚠️ main.css의 generic `button:hover { background:#0056b3 }` 룰이 있어
   wrapper 클래스의 :hover에 background:#fff를 명시해야 호버 시 파랑이 새지 않음. */
.video-card-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: inherit;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.video-card-trigger:focus-visible {
  outline: 2px solid #09090b;
  outline-offset: 2px;
}
