/* El atributo hidden debe ganarle a los display de abajo */
.vt-modal [hidden] { display: none !important; }

/* ── Botón en la página de producto ── */
.vtryon-open {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s;
}
.vtryon-open:hover { opacity: .85; }

/* ── Overlay ── */
.vt-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 9, 11, .55);
  backdrop-filter: blur(3px);
}
.vt-overlay.is-open { display: flex; animation: vt-fade .2s ease; }
.vt-lock { overflow: hidden; }
@keyframes vt-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Modal 2 columnas ── */
.vt-modal {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 980px;
  height: min(88vh, 620px);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
  font-family: inherit;
  color: #18181b;
  animation: vt-pop .22s ease;
}
@keyframes vt-pop { from { transform: translateY(12px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }

.vt-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #52525b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.vt-close:hover { color: #111; }

/* Columna izquierda: imagen */
.vt-left {
  position: relative;
  flex: 0 0 46%;
  background: #f4f4f5;
  overflow: hidden;
}
/* !important para ganarle a los temas que fuerzan `img { height:auto }` y descolocan la foto */
.vt-left-img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

.vt-scan-line {
  display: none;
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffffff, #a5f3fc, transparent);
  box-shadow: 0 0 20px 5px rgba(255, 255, 255, .5);
  animation: vt-scanline 2.1s cubic-bezier(.4, 0, .6, 1) infinite;
}
.vt-modal.is-processing .vt-scan-line { display: block; }
.vt-modal.is-processing .vt-left::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(255,255,255,.06) 24px 25px);
  pointer-events: none;
}
@keyframes vt-scanline {
  0% { top: 3%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 97%; opacity: 0; }
}

/* Columna derecha: contenido */
.vt-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 48px 44px 28px;
  overflow-y: auto;
}
.vt-brand {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #a1a1aa;
  font-weight: 500;
}
.vt-steps { flex: 1; }

.vt-title {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  color: #18181b;
}
.vt-sub {
  margin: 0 0 30px;
  font-size: 15px;
  line-height: 1.6;
  color: #71717a;
  max-width: 42ch;
}

/* Tips */
.vt-tips { display: flex; gap: 40px; margin-bottom: 34px; flex-wrap: wrap; }
.vt-tip { display: flex; flex-direction: column; gap: 10px; }
.vt-tip-ico { width: 24px; height: 24px; color: #18181b; }
.vt-tip-ico svg { width: 100%; height: 100%; }
.vt-tip-txt { display: flex; flex-direction: column; font-size: 14px; color: #71717a; line-height: 1.5; }
.vt-tip-txt b { color: #18181b; font-weight: 600; }

/* CTA negro */
.vt-cta {
  display: block;
  width: 100%;
  padding: 17px;
  border: 0;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s;
}
.vt-cta:hover { opacity: .85; }

.vt-privacy { margin: 16px 0 0; text-align: center; font-size: 12px; color: #a1a1aa; }

/* Procesando */
.vt-status { margin: 0 0 14px; font-size: 15px; color: #3f3f46; }
.vt-progress { height: 6px; border-radius: 999px; background: #f1f1f2; overflow: hidden; }
.vt-progress-bar { height: 100%; width: 4%; border-radius: 999px; background: #111; transition: width .3s ease; }
.vt-eta { margin: 12px 0 0; font-size: 13px; color: #a1a1aa; }

/* Resultado */
.vt-actions { display: flex; flex-direction: column; gap: 12px; }
.vt-retry {
  width: 100%;
  padding: 14px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #fff;
  color: #3f3f46;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.vt-retry:hover { background: #fafafa; }

.vt-error {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
}

/* Powered by */
.vt-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #f4f4f5;
  font-size: 11px;
  letter-spacing: .5px;
  color: #a1a1aa;
}
.vt-powered-img { height: 16px !important; width: auto !important; max-width: none !important; opacity: .8; }

/* ── Chip flotante (generación minimizada) ── */
.vt-chip {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999998;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .5);
  transition: transform .15s;
}
.vt-chip.is-open { display: inline-flex; animation: vt-chip-in .25s ease; }
.vt-chip:hover { transform: translateY(-2px); }
@keyframes vt-chip-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.vt-chip-spin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  animation: vt-spin .8s linear infinite;
}
@keyframes vt-spin { to { transform: rotate(360deg); } }
.vt-chip-time { font-variant-numeric: tabular-nums; font-weight: 400; opacity: .7; }

.vt-chip.is-error { background: #b91c1c; }
.vt-chip.is-error .vt-chip-spin { display: none; }

/* Responsive: apila en mobile */
@media (max-width: 720px) {
  .vt-modal { flex-direction: column; height: min(92vh, 760px); }
  .vt-left { flex: 0 0 44%; }
  .vt-right { padding: 28px 22px 20px; }
  .vt-title { font-size: 27px; }
  .vt-sub { margin-bottom: 22px; }
  .vt-tips { gap: 28px; margin-bottom: 26px; }
}
