/* ================= Popup Slideshow ================= */
.rvl-popup-root {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.rvl-popup-root[hidden] { display: none !important; }
.rvl-popup-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}
.rvl-popup-dialog {
  position: relative; z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 720px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: rvlPopIn .22s ease;
}
@keyframes rvlPopIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.rvl-popup-top {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.rvl-popup-top strong {
  font-family: Outfit, 'Noto Sans Thai', sans-serif;
  font-size: .95rem;
}
.rvl-popup-close {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  width: 36px; height: 36px; border-radius: 999px; cursor: pointer; font-size: 1.1rem;
  display: grid; place-items: center;
}
.rvl-popup-close:hover { border-color: var(--red-soft); color: var(--red-soft); }
.rvl-popup-stage {
  position: relative; background: #0a0c10;
  aspect-ratio: 16 / 9; max-height: 62vh;
}
.rvl-popup-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.rvl-popup-slide.is-active { opacity: 1; pointer-events: auto; }
.rvl-popup-slide img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  background: #0a0c10;
}
.rvl-popup-slide a { display:block; width:100%; height:100%; }
.rvl-popup-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 1.2rem; z-index: 2;
}
.rvl-popup-nav:hover { background: rgba(225,29,72,.85); border-color: transparent; }
.rvl-popup-prev { left: 10px; }
.rvl-popup-next { right: 10px; }
.rvl-popup-dots {
  display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap;
  padding: .75rem 1rem .35rem;
}
.rvl-popup-dot {
  width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0;
  background: var(--line); cursor: pointer;
}
.rvl-popup-dot.is-active { background: var(--red-soft); width: 22px; }
.rvl-popup-caption {
  text-align: center; color: var(--muted); font-size: .88rem;
  padding: 0 1rem .9rem; min-height: 1.2em;
}
.rvl-popup-foot {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .65rem 1rem .85rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted);
}
.rvl-popup-foot button {
  border: 0; background: transparent; color: var(--red-soft); font-weight: 700;
  cursor: pointer; font-family: inherit; font-size: .85rem;
}
@media (max-width: 640px) {
  .rvl-popup-dialog { max-height: 92vh; border-radius: 14px; }
  .rvl-popup-stage { max-height: 52vh; }
  .rvl-popup-nav { width: 36px; height: 36px; }
}
