/* Probador Virtual de Anteojos — MIT */

/* ===== Layout base ===== */
.pva-wrap {
  max-width: 960px;
  margin: 30px auto;
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .06);
}

.pva-title {
  font-size: 28px;
  margin: 0 0 12px;
  color: #111;
}

/* ===== Instrucciones ===== */
.pva-instrucciones {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.pva-note {
  margin: 8px 0 0;
  color: #334155;
}

/* ===== Toolbar (botones/selects) ===== */
.pva-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.pva-btn {
  appearance: none;
  border: 1px solid #0ea5e9;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease;
}

.pva-btn:hover { background: #e0f2fe; }

.pva-primary { background: #0ea5e9; color: #fff; border-color: #0284c7; }
.pva-primary:hover { background: #0284c7; }

.pva-selects {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pva-selects label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pva-selects select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

/* ===== Escenario principal ===== */
.pva-stage { display: block; }

/* ===== Video y overlay (con gestos) ===== */
.pva-video-box {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  min-height: 320px;
  touch-action: none; /* necesario para drag/pinch/zoom */
}

/* Asegura orden de capas: video debajo, marco encima */
#pva-video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

#pva-frame-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  max-width: none;
  pointer-events: none;
  user-select: none;
  z-index: 2;              /* marco siempre encima */
  opacity: 1;              /* visibilidad explícita */
}

/* Por si alguna regla global del tema oculta imágenes */
.pva-video-box img#pva-frame-overlay {
  display: block !important;
  visibility: visible !important;
}

/* ===== Utilidades ===== */
.pva-hidden { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .pva-wrap { margin: 16px auto; padding: 12px; }
  .pva-selects { flex-wrap: wrap; }
}