/* ================================================================
   VIDEO GUIDE — video-guide.css
   File CSS BARU untuk fitur "Panduan Video" (Produk / Top Up / Garansi).
   Tidak mengubah aturan CSS yang sudah ada di produk.css, topup.css,
   maupun laporgaransi.css — hanya menambahkan class baru, memakai
   variabel warna yang sama (alias dari dashboard.css) dengan fallback.
   ================================================================ */

/* Kunci scroll body saat modal video terbuka */
html.vg-lock-scroll,
html.vg-lock-scroll body {
  overflow: hidden !important;
}

/* ── BAR / TOMBOL PANDUAN DI HALAMAN ────────────────────────────── */
.vguide-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px;
  padding: 12px 14px;
  background: var(--bg3, #F7F9FC);
  border: 1px solid var(--border, #DFE7EF);
  border-radius: var(--r, 14px);
}

.vguide-bar-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm, 10px);
  background: rgba(40, 87, 122, 0.12);
  color: var(--purple, #163B5C);
}
.vguide-bar-icon svg { width: 18px; height: 18px; display: block; }

.vguide-bar-text { flex: 1; min-width: 0; }
.vguide-bar-title {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text, #F5F8FC);
}
.vguide-bar-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text3, #6E88AA);
  margin-top: 2px;
}

.vguide-bar-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--purple, #163B5C);
  color: #fff;
  border: none;
  border-radius: var(--r-xs, 8px);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--t, 0.2s ease);
}
.vguide-bar-btn:hover { background: var(--purple-dark, #102A43); }
.vguide-bar-btn:active { transform: scale(0.97); }
.vguide-bar-btn svg { width: 13px; height: 13px; display: block; }

@media (max-width: 360px) {
  .vguide-bar-sub { display: none; }
}

/* ── MODAL OVERLAY (di atas halaman, tidak menutup/redirect) ────── */
.vg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(16, 42, 67, 0);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, background 0.2s ease, visibility 0s linear 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.vg-overlay.vg-open {
  opacity: 1;
  visibility: visible;
  background: rgba(16, 42, 67, 0.55);
  transition: opacity 0.2s ease, background 0.2s ease, visibility 0s linear 0s;
}

.vg-modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg3, #F7F9FC);
  border: 1px solid var(--border, #DFE7EF);
  border-radius: var(--r, 14px);
  box-shadow: 0 20px 50px rgba(16,42,67,0.08);
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.vg-overlay.vg-open .vg-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.vg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px 18px;
  border-bottom: 1px solid var(--border, #DFE7EF);
}
.vg-modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text, #F5F8FC);
  margin: 0;
}
.vg-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: var(--bg4, #EAF2F8);
  color: var(--text2, #A3B8D2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.vg-close:hover, .vg-close:focus-visible {
  background: var(--border, #DFE7EF);
  color: var(--text, #F5F8FC);
}
.vg-close svg { width: 15px; height: 15px; display: block; }

.vg-body { padding: 14px; }

.vg-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-sm, 10px);
  overflow: hidden;
}
.vg-video-wrap iframe,
.vg-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.vg-empty-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 16px;
  text-align: center;
  color: var(--text3, #6E88AA);
}
.vg-empty-msg svg { width: 30px; height: 30px; }
.vg-empty-msg p { font-size: 0.82rem; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .vg-overlay, .vg-modal { transition: none !important; }
}
