/* Precios + checkout Paddle (cualquier página con #planes.pagos) y página de gracias.
   Se carga después de la hoja de estilos de la página (sales.css o styles.css). */
.pagos,
.thanks {
  --pay-navy: #1e3a5f;
  --pay-mustard: #e8b319;
  --pay-blue: #459ad2;
  --pay-bg: #f0f1f5;
  --pay-white: #ffffff;
  --pay-line: rgba(30, 58, 95, 0.14);
  --pay-muted: #5f6f80;
  --pay-shadow: 0 24px 80px rgba(10, 31, 47, 0.15);
}

/* Página de ventas (sales.css): la paleta del brief reemplaza la de la página */
.pricing,
.thanks {
  --ink: var(--pay-navy);
  --gold: var(--pay-mustard);
  --blue: var(--pay-blue);
}

.pricing {
  background: var(--pay-bg);
}

.billing-toggle {
  display: flex;
  width: fit-content;
  margin: 36px auto 0;
  padding: 5px;
  gap: 4px;
  background: var(--pay-white);
  border: 1px solid var(--pay-line);
  border-radius: 999px;
}

.billing-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: var(--pay-navy);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.billing-toggle button[aria-checked="true"] {
  color: var(--pay-white);
  background: var(--pay-navy);
}

.billing-toggle__save {
  padding: 2px 8px;
  color: var(--pay-navy);
  background: var(--pay-mustard);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.checkout-email {
  max-width: 520px;
  margin: 24px auto 0;
  text-align: left;
}

.checkout-email label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
}

.checkout-email input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--pay-navy);
  background: var(--pay-white);
  border: 1px solid rgba(30, 58, 95, 0.25);
  border-radius: 10px;
  font: inherit;
}

.checkout-email input:focus {
  outline: 3px solid rgba(69, 154, 210, 0.35);
  border-color: var(--pay-blue);
}

.checkout-email p {
  margin: 8px 0 0;
  color: var(--pay-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.pricing-status {
  max-width: 520px;
  margin: 28px auto 0;
  color: var(--pay-muted);
  text-align: center;
  font-size: 0.95rem;
}

.pricing-status--error {
  color: #a3361f;
}

.pricing-group-title {
  margin: 56px 0 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.2rem;
  text-align: center;
}

.pricing-group-title + p {
  margin: 4px 0 0;
  color: var(--pay-muted);
  text-align: center;
  font-size: 0.92rem;
}

.pagos .pricing-grid {
  margin-top: 28px;
}

.pagos .price-card[hidden] {
  display: none;
}

.pagos #planesMultiSede {
  max-width: 720px;
  margin-inline: auto;
}

.pagos .price-card button {
  width: 100%;
}

.pagos .price-card__price .price-card__amount {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.pagos .price-card__price .price-card__period {
  color: var(--pay-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.price-card__tax {
  min-height: 1.2em;
  color: var(--pay-muted);
  font-size: 0.78rem;
}

/* Botón Comprar: igual en todas las páginas */
.pagos .pagos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 22px;
  color: var(--pay-navy);
  background: var(--pay-white);
  border: 2px solid var(--pay-navy);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease,
    box-shadow 160ms ease;
}

.pagos .pagos-btn:hover {
  color: var(--pay-white);
  background: var(--pay-navy);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(30, 58, 95, 0.22);
}

.pagos .pagos-btn--primary {
  color: var(--pay-navy);
  background: var(--pay-mustard);
  border-color: var(--pay-mustard);
  box-shadow: 0 12px 28px rgba(232, 179, 25, 0.35);
}

.pagos .pagos-btn--primary:hover {
  color: var(--pay-navy);
  background: #f2c232;
  border-color: #f2c232;
  box-shadow: 0 16px 34px rgba(232, 179, 25, 0.45);
}

.pagos .pagos-btn:active {
  transform: translateY(0);
}

.pagos .pagos-btn:focus-visible {
  outline: 3px solid var(--pay-blue);
  outline-offset: 3px;
}

.pagos .pagos-btn__arrow {
  transition: transform 160ms ease;
}

.pagos .pagos-btn:hover .pagos-btn__arrow {
  transform: translateX(3px);
}

.pagos .price-card button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.price-card__email-note {
  margin: 10px 0 0;
  color: var(--pay-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.pricing-legal {
  max-width: 640px;
  margin: 20px auto 0;
  color: var(--pay-muted);
  text-align: center;
  font-size: 0.8rem;
}

.pricing-legal a,
.pagos .checkout-email a,
.thanks a:not(.button):not(.store-badge) {
  color: var(--pay-navy);
  font-weight: 700;
}

/* Página de gracias */
.thanks {
  min-height: 100vh;
  padding: clamp(48px, 8vw, 96px) 0;
  background: var(--pay-bg);
}

.thanks-card {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  background: var(--pay-white);
  border: 1px solid var(--pay-line);
  border-radius: 20px;
  box-shadow: var(--pay-shadow);
}

.thanks-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  color: var(--pay-white);
  background: var(--pay-blue);
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 800;
}

.thanks h1 {
  margin: 0 0 8px;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.2;
}

.thanks-lead {
  margin: 0 0 28px;
  color: var(--pay-muted);
  font-size: 1.05rem;
}

.thanks-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.thanks-steps > li {
  position: relative;
  padding: 0 0 24px 52px;
  counter-increment: paso;
}

.thanks-steps > li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--pay-navy);
  background: var(--pay-mustard);
  border-radius: 50%;
  font-weight: 800;
}

.thanks-steps h2 {
  margin: 4px 0 4px;
  font-size: 1.05rem;
}

.thanks-steps p {
  margin: 0;
  color: var(--pay-muted);
  font-size: 0.95rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  color: var(--pay-white);
  background: #000;
  border-radius: 10px;
  text-decoration: none;
  line-height: 1.15;
}

.store-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.store-badge small {
  display: block;
  font-size: 0.65rem;
  opacity: 0.8;
}

.store-badge strong {
  display: block;
  font-size: 0.95rem;
}

.thanks-alert {
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(232, 179, 25, 0.14);
  border: 1px solid rgba(232, 179, 25, 0.45);
  border-radius: 12px;
  font-size: 0.92rem;
}

.thanks-help {
  margin: 24px 0 0;
  color: var(--pay-muted);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .billing-toggle button {
    padding: 0 14px;
  }
}
