/* ==========================================================================
   MODAL DE SUSCRIPCIÓN — usa los tokens --vs-* ya definidos por la página
   que lo carga (sub-embed.css en index.html). No redefine :root: si esta
   hoja se usa en una página sin esos tokens, hay que cargar primero la que
   los declara.
   ========================================================================== */

.vs-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(32, 35, 23, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.28s var(--vs-ease, ease);
}
.vs-checkout-overlay.is-open { opacity: 1; }

.vs-checkout-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--vs-r-card, 40px);
  padding: clamp(28px, 4vw, 40px);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.32s var(--vs-ease, ease);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.vs-checkout-overlay.is-open .vs-checkout-modal { transform: translateY(0) scale(1); }

.vs-checkout-modal__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--vs-bg, #f6f6f6);
  color: var(--vs-ink, #202317);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}
.vs-checkout-modal__close:hover { background: var(--vs-sand, #cfc6b8); }

.vs-checkout-modal__eyebrow {
  font-family: var(--vs-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vs-accent, #777e66);
  margin: 0 0 10px;
}

.vs-checkout-modal h3 {
  font-family: var(--vs-display);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.15;
  color: var(--vs-ink, #202317);
  margin: 0 0 8px;
}

.vs-checkout-modal p {
  font-family: var(--vs-text);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
  color: var(--vs-muted, #757575);
  margin: 0 0 22px;
}

.vs-checkout-modal__plan {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--vs-bg, #f6f6f6);
  border-radius: 16px;
  margin-bottom: 22px;
}
.vs-checkout-modal__plan span:first-child {
  font-family: var(--vs-text);
  font-size: 13px;
  color: var(--vs-ink, #202317);
}
.vs-checkout-modal__plan span:last-child {
  font-family: var(--vs-display);
  font-weight: 300;
  font-size: 18px;
  color: var(--vs-ink, #202317);
}

.vs-checkout-field label {
  display: block;
  font-family: var(--vs-text);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vs-ink, #202317);
  margin-bottom: 8px;
}
.vs-checkout-field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid var(--vs-line, rgba(39, 51, 40, 0.16));
  border-radius: 14px;
  background: #fff;
  font-family: var(--vs-text);
  font-weight: 300;
  font-size: 15px;
  color: var(--vs-ink, #202317);
  transition: border-color 0.2s ease;
}
.vs-checkout-field input:focus {
  outline: none;
  border-color: var(--vs-ink, #202317);
}
.vs-checkout-field input::placeholder { color: var(--vs-muted, #757575); }

.vs-checkout-error {
  font-family: var(--vs-text);
  font-size: 13px;
  color: #b23b3b;
  margin: 12px 0 0;
  display: none;
}
.vs-checkout-error.is-visible { display: block; }

.vs-checkout-submit {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  margin-top: 22px;
  border: 0;
  border-radius: var(--vs-r-btn, 27px);
  background: var(--vs-dark, #27271d);
  color: #fff;
  font-family: var(--vs-text);
  font-weight: 300;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.28s ease, transform 0.28s var(--vs-ease, ease), opacity 0.2s ease;
}
.vs-checkout-submit:hover { background: #3d3d2e; transform: translateY(-2px); }
.vs-checkout-submit:disabled { opacity: 0.55; cursor: default; transform: none; }

.vs-checkout-spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  animation: vs-checkout-spin 0.7s linear infinite;
  flex: none;
}
@keyframes vs-checkout-spin { to { transform: rotate(360deg); } }

.vs-checkout-result {
  text-align: center;
  padding: 8px 0 4px;
}
.vs-checkout-result__icon {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.vs-checkout-result__icon--ok      { background: var(--vs-blue, #dfe9f2); }
.vs-checkout-result__icon--pending { background: var(--vs-sand, #cfc6b8); }
.vs-checkout-result__icon--error   { background: #f3dede; }

.vs-checkout-result h3 { text-align: center; }
.vs-checkout-result p  { text-align: center; margin-bottom: 26px; }

.vs-checkout-back {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: var(--vs-r-btn, 27px);
  background: var(--vs-bg, #f6f6f6);
  color: var(--vs-ink, #202317);
  font-family: var(--vs-text);
  font-weight: 300;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.vs-checkout-back:hover { background: var(--vs-sand, #cfc6b8); }

@media (prefers-reduced-motion: reduce) {
  .vs-checkout-overlay, .vs-checkout-modal { transition: none; }
  .vs-checkout-spinner { animation: none; }
}
