/*
 * MissionOS Videos — component styles.
 * Only loaded on the "Videos" page template (see missionos_enqueue_video_assets()
 * in functions.php), same pattern as css/mobile-manual.css.
 */

/* ─── Filter chips ─── */
.filter-btn.is-active {
  background-image: linear-gradient(135deg, #fd5902 0%, #ff8a3d 100%);
  color: #fff;
  border-color: transparent;
}
.dark .filter-btn.is-active {
  background-image:  linear-gradient(135deg, #fd5902 0%, #ff8a3d 100%);
}

/* Sidebar "Filter by product" list — vertical, full-width rows (used on
   the Videos page's Glossary-style sticky aside instead of the old
   horizontal pill row). Kept as a distinct modifier so the original
   pill styling above stays available if it's ever needed elsewhere. */
.filter-btn--block {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.dark .filter-btn--block { color: #cbd5e1; }
.filter-btn--block:hover { background: #f1f5f9; color: #0b1124; }
.dark .filter-btn--block:hover { background: #283548; color: #f1f5f9; }
.filter-btn--block .filter-btn__dot { font-size: 10px; color: #cbd5e1; flex-shrink: 0; }
.dark .filter-btn--block .filter-btn__dot { color: #475569; }
.filter-btn--block.is-active {
  background: rgba(253, 89, 2, 0.08);
  color: #fd5902;
  background-image: none;
}
.dark .filter-btn--block.is-active { background: rgba(255, 138, 61, 0.12); color: #ff8a3d; }
.filter-btn--block.is-active .filter-btn__dot { color: inherit; }

/* Sidebar dropdown modifier — stretches the trigger to the full column
   width and right-aligns the chevron, instead of the compact
   content-sized trigger used in a horizontal toolbar. */
.dropdown--block .dropdown__trigger { width: 100%; justify-content: space-between; }
.dropdown--block .dropdown__menu { left: 0; right: 0; width: 100%; min-width: 0; }

/* ─── Video cards ─── */
.video-grid { padding-top: 4px; }
.video-card-wrap { position: relative; transition: transform 0.2s ease; }

.video-card {
  position: relative;
  display: block;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  transform-origin: center;
}
.dark .video-card { background: #1e293b; border-color: #334155; }
.video-card:focus-visible { outline: 2px solid #fd5902; outline-offset: 2px; }
.dark .video-card:focus-visible { outline-color: #818cf8; }

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.video-thumb__icon { font-size: 44px; opacity: 0.35; color: #fff; pointer-events: none; }
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(11, 17, 36, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
}
.video-play__circle {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0b1124;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: scale(0.8);
  transition: transform 0.25s ease;
}

.video-basic { padding: 14px 16px 16px; }
.video-basic__title {
  font-family: var(--missionos-font-family, Inter, sans-serif);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-basic__meta { font-size: 13px; color: #94a3b8; }

/* ─── Progress bar on thumbnail ─── */
.video-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}
.video-progress__fill {
  height: 100%;
  background: #fd5902;
  border-radius: 0 2px 2px 0;
  transition: width 0.3s ease;
  width: 0%;
}
.dark .video-progress__fill { background: #818cf8; }

/* ─── Netflix-style hover panel ─── */
.video-hover-panel {
  position: absolute;
  left: 0; right: 0; top: 0;
  z-index: 30;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.94) translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.22s;
  pointer-events: none;
}
.dark .video-hover-panel { background: #1e293b; border-color: #334155; }

.video-card-wrap:hover .video-hover-panel,
.video-card-wrap:focus-within .video-hover-panel {
  opacity: 1;
  visibility: visible;
  transform: scale(1.06) translateY(-6px);
  pointer-events: auto;
}
.video-card-wrap:hover .video-play,
.video-card-wrap:focus-within .video-play { opacity: 1; }
.video-card-wrap:hover .video-play__circle,
.video-card-wrap:focus-within .video-play__circle { transform: scale(1); }

.video-hover-panel__desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dark .video-hover-panel__desc { color: #94a3b8; }
.video-hover-panel__actions { display: flex; align-items: center; gap: 8px; }
.video-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.dark .video-tag { background: #283548; color: #cbd5e1; }

/* ─── "Watched" badge ─── */
.badge-watched {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.9);
  color: #fff;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.3px;
}
.badge-watched i { margin-right: 4px; font-size: 9px; }

/* ─── "Interactive" badge (Arcade embeds) — top-left, mirrors
   .badge-watched's top-right placement so the two never collide ─── */
.badge-interactive {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.3px;
}
.badge-interactive i { margin-right: 4px; font-size: 9px; }

/* ─── View toggle ─── */
.view-toggle-btn.is-active { background: #ffffff; color: #fd5902; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.dark .view-toggle-btn.is-active { background: #1e293b; color: #818cf8; }

/* Custom dropdown (.dropdown, .dropdown__trigger, .dropdown__menu, ...)
   now lives in the theme's global style.css — it's shared with the
   Mobile Manual reader's Product switcher, not just this page. */

/* ─── List view ─── */
.video-grid.is-list-view { display: flex; flex-direction: column; gap: 16px; }
.video-grid.is-list-view .video-card-wrap { width: 100%; }
.video-grid.is-list-view .video-card { display: flex; flex-direction: row; align-items: stretch; border-radius: 12px; }
.video-grid.is-list-view .video-thumb { aspect-ratio: 16/9; min-width: 200px; max-width: 280px; flex-shrink: 0; border-radius: 12px 0 0 12px; }
.video-grid.is-list-view .video-basic { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; }
.video-grid.is-list-view .video-hover-panel { display: none; }
@media (max-width: 640px) {
  .video-grid.is-list-view .video-card { flex-direction: column; }
  .video-grid.is-list-view .video-thumb { max-width: 100%; border-radius: 12px 12px 0 0; }
}

/* ─── Hide hover panel on mobile ─── */
@media (max-width: 640px) {
  .video-hover-panel { display: none; }
  .video-card-wrap:hover .video-card,
  .video-card-wrap:focus-within .video-card { transform: none; }
  .video-grid.is-list-view .video-basic__title { font-size: 13px; }
}

/* ─── Utility ─── */
.dh-videos-item--hidden { display: none !important; }

/* ─── Play modal (YouTube embed) ─── */
.video-play-modal .modal-container { max-width: 900px; }
.video-play-modal__frame-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.video-play-modal__frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
