/* checkout.css — layout de la pantalla principal (2 columnas) */

/* despues de 2 horas peleando con flexbox por fin quedo */

/* sr-only — para a11y */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* shell — App-Container > App > [Overview | Payment]. .CheckoutPage es alias legacy */
.App-Container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* clases utility de Stripe (no quitar) — solo viven para que los selectores
   compuestos tipo .App-Container.local-default-background sigan resolviendo */
.local-default-background {}
.flex-container {}
.justify-content-center {}

.App,
.CheckoutPage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--stripe-bg-card);
}

.App-Overview,
.CheckoutPage-summary {
  padding: 48px 56px 48px 56px;
  background: var(--stripe-bg-page);
  border-right: 1px solid var(--stripe-border);
}

.App-Payment,
.CheckoutPage-form {
  padding: 48px 56px 48px 56px;
  background: var(--stripe-bg-card);
  display: flex;
  flex-direction: column;
}

/* wallet spacer = el slot que Stripe deja para Apple Pay / Link.
   no renderizamos nada de eso, pero el wrapper queda por fidelidad */
.CheckoutPaymentForm {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.CheckoutPaymentForm-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--stripe-bg-card);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.CheckoutPaymentForm-walletSpacer {
  height: 0;
}

/* placeholder vacio del banner "Need help? AI agent" de stripe — no lo usamos */
.AiAgentPaymentSteering {
  /* a propósito vacio */
}

/* el wrapper del footer. el classname raro con hash es como sale en stripe (CSS modules) */
.App-Footer,
.C1hyPwuu__CheckoutFooter {
  width: 100%;
  max-width: 440px;
  margin: 14px auto 0 auto;
}


/* === order summary (panel izquierdo) === */
.OrderSummary {
  max-width: 420px;
  margin-left: auto;
  margin-right: 0;
}

/* logo / "Paga a X" / total — stack vertical */
.OrderSummary-brandRow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 28px;
}

/* circulo negro con la letra de la marca. el padding-bottom es para
   centrar opticamente la minuscula (con line-height:1 se ve muy alta) */
.OrderSummary-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-system);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  padding-bottom: 2px;
  text-transform: lowercase;
  user-select: none;
}

.OrderSummary-merchantLabel {
  color: var(--stripe-text-secondary);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.2;
  margin-top: 14px;
}

.OrderSummary-total {
  margin: 4px 0 0 0;
  color: var(--stripe-text-primary);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

.OrderSummary-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.OrderSummary-line--product .OrderSummary-line-label {
  font-weight: 500;
}

/* thumbnail fake del producto — gradient azul */
.OrderSummary-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(135deg, #dbe6f0 0%, #c2d2e2 100%);
  border: 1px solid var(--stripe-border);
  position: relative;
  overflow: hidden;
}

/* linea brillante dentro del thumb para que no se vea vacío */
.OrderSummary-thumb::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  height: 14px;
  background:
    linear-gradient(135deg, #ffffffa0 0%, #ffffff60 50%, transparent 100%);
  border-radius: 3px;
}

.OrderSummary-line-label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--stripe-text-primary);
  font-size: var(--fs-body);
  line-height: 1.35;
}

.OrderSummary-line-sub {
  display: block;
  margin-top: 2px;
  color: var(--stripe-text-secondary);
  font-size: var(--fs-footer);
}

.OrderSummary-line-amount {
  flex: 0 0 auto;
  color: var(--stripe-text-primary);
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.OrderSummary-divider {
  height: 1px;
  margin: 8px 0;
  background: var(--stripe-border);
  border: 0;
}

/* subtotal / discount / total */
.OrderSummary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.OrderSummary-row-label {
  color: var(--stripe-text-primary);
  font-size: var(--fs-body);
}

.OrderSummary-row-amount {
  color: var(--stripe-text-primary);
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.OrderSummary-row--total .OrderSummary-row-label,
.OrderSummary-row--total .OrderSummary-row-amount {
  font-weight: 600;
}

/* row del descuento: chip a la izquierda, monto en negativo a la derecha */
.OrderSummary-discount {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.OrderSummary-discount-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.OrderSummary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 8px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1px;
  line-height: 1.4;
}

.OrderSummary-chip-icon {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  color: currentColor;
  fill: currentColor;
}

.OrderSummary-chip-note {
  color: var(--stripe-text-secondary);
  font-size: var(--fs-footer);
  padding-left: 2px;
}

.OrderSummary-discount-amount {
  color: var(--stripe-text-primary);
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}


/* === panel derecho (form) === */
.PaymentForm {
  max-width: 420px;
  margin-right: auto;
  margin-left: 0;
}

.PaymentForm-heading {
  margin: 0 0 10px 0;
  color: var(--stripe-text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.PaymentForm-section {
  margin: 18px 0 8px 0;
  color: var(--stripe-text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}


/* === StripeFieldGroup ===
   N filas unidas dentro de un solo bordered box. inputs adentro no llevan
   border propio; los separa un border-top en cada row excepto el primero.
   focus ring va al wrapper entero via :focus-within — un solo glow. */

.StripeFieldGroup-label {
  display: block;
  margin: 0 0 4px 0;
  color: var(--stripe-text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.StripeFieldGroup {
  width: 100%;
  margin-bottom: 12px;
  background: var(--stripe-bg-card);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius-input);
  overflow: hidden;
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}

.StripeFieldGroup:focus-within {
  border-color: var(--stripe-border-focus);
  box-shadow: var(--shadow-focus-ring);
}

.StripeFieldGroup--error {
  border-color: var(--stripe-error);
}

.StripeFieldGroup-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 6px 12px;
  background: var(--stripe-bg-card);
}

.StripeFieldGroup-row + .StripeFieldGroup-row {
  border-top: 1px solid var(--stripe-border);
}

/* split row = 2 inputs lado a lado (MM/AA | CVC), con divisoria vertical */
.StripeFieldGroup-row--split {
  padding: 0;
}

.StripeFieldGroup-row--split > .StripeField-input {
  flex: 1 1 50%;
  min-width: 0;
  height: 38px;
  padding: 6px 14px;
}

.StripeFieldGroup-row--split > .StripeField-input + .StripeField-input {
  border-left: 1px solid var(--stripe-border);
}

/* select row — sin padding lateral para que el caret nativo se ubique */
.StripeFieldGroup-row--select {
  padding: 0;
}

/* iconos a los lados */
.StripeField-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #697386;
}

.StripeField-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.StripeField-icon--left {
  width: 18px;
  flex: 0 0 18px;
  margin-right: 8px;
}

.StripeField-icon--right {
  width: 18px;
  flex: 0 0 18px;
  margin-left: 8px;
}

/* el icon-phone agrupa flag + handset glyph */
.StripeField-icon--phone {
  width: auto;
  gap: 6px;
}

.StripeField-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 11px;
  margin-right: 6px;
  border-radius: 1px;
  overflow: hidden;
  flex: 0 0 auto;
}

.StripeField-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* badge del codigo de pais — visible junto a la bandera, sirve de debug si el SVG falla */
.StripeField-countryCode {
  display: inline-block;
  margin-right: 6px;
  padding: 0 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--stripe-text-secondary);
  background: #f1f4f7;
  border-radius: 3px;
  line-height: 14px;
  letter-spacing: 0.4px;
  user-select: none;
  flex: 0 0 auto;
}

.StripeField-phoneGlyph {
  flex: 0 0 12px;
}

/* el input adentro del group — sin border propio, sin radius, sin focus glow individual */
.StripeField-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0;
  background: transparent;
  color: var(--stripe-text-primary);
  font-family: var(--font-system);
  font-size: 14px;
  line-height: 1.3;
  border: 0;
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.StripeField-input::placeholder {
  color: #a3acb9;
  opacity: 1;
}

.StripeField-input:focus {
  box-shadow: none;
  border: 0;
}

/* select nativo dentro del group — caret pintado a la derecha */
.StripeField-input--select {
  padding: 8px 36px 8px 14px;
  background-color: transparent;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23425466' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  height: 38px;
}

/* iconos de marca (visa/mc/amex) flotando a la derecha del numero de tarjeta */
.CardNumberField {
  position: relative;
}

.CardNumberField .StripeField-input {
  padding-right: 124px;  /* aire para los 3 iconos */
}

.CardBrandIcons {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.CardBrandIcons svg {
  display: block;
  width: 32px;
  height: 20px;
  border-radius: 3px;
  opacity: 0.3;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

/* el JS setea data-brand y la marca detectada se ve sólida, las otras se desvanecen */
.CardBrandIcons[data-brand="visa"] [data-icon="visa"],
.CardBrandIcons[data-brand="mastercard"] [data-icon="mastercard"],
.CardBrandIcons[data-brand="amex"] [data-icon="amex"] {
  opacity: 1;
}

.CardBrandIcons[data-brand="visa"] [data-icon]:not([data-icon="visa"]),
.CardBrandIcons[data-brand="mastercard"] [data-icon]:not([data-icon="mastercard"]),
.CardBrandIcons[data-brand="amex"] [data-icon]:not([data-icon="amex"]) {
  opacity: 0.15;
}

/* el chip icon va alineado a la derecha de la fila MM/AA | CVC */
.StripeField-icon--chip {
  width: auto;
  padding-right: 12px;
  margin-left: 0;
}


/* === Link opt-in card === */
.LinkOptIn-card {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--stripe-bg-card);
  border: 1px solid var(--stripe-border);
  border-radius: var(--radius-input);
}

.LinkOptIn-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.LinkOptIn-checkbox {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--merchant-primary);
  cursor: pointer;
}

.LinkOptIn-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.LinkOptIn-title {
  color: var(--stripe-text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.LinkOptIn-sub {
  color: var(--stripe-text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

/* "Link" wordmark — italica azul estilo Stripe Link */
.Link-wordmark {
  color: var(--stripe-link-blue);
  font-weight: 500;
  font-style: italic;
}


/* tweaks chicos del accordion en esta página (spacing + tamaño del icon) */
.PaymentMethodAccordion {
  margin-top: 4px;
  margin-bottom: 16px;
}

.PaymentMethodAccordion-icon svg {
  display: block;
  height: 24px;
  width: auto;
}

/* logos reales en /assets — PNG, escalan a la altura del accordion */
.MethodIcon-oxxo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.MethodIcon-oxxo img {
  display: block;
  height: 22px;
  width: auto;
}

.MethodIcon-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.MethodIcon-paypal img {
  display: block;
  height: 23px;
  width: 23px;
  border-radius: 4px;
}


.CardForm {
  display: block;
  margin-top: 8px;
}


/* mobile — stackeamos las 2 columnas */
@media (max-width: 900px) {
  .App,
  .CheckoutPage {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .App-Overview,
  .CheckoutPage-summary {
    padding: 24px 20px 20px 20px;
    border-right: none;
    border-bottom: 1px solid var(--stripe-border);
  }

  .App-Payment,
  .CheckoutPage-form {
    padding: 24px 20px 32px 20px;
  }

  .CheckoutPaymentForm-card {
    padding: 20px;
    box-shadow: none;
  }

  .OrderSummary,
  .PaymentForm-form,
  .PaymentForm {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }

  .OrderSummary-total {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .App-Overview,
  .App-Payment,
  .CheckoutPage-summary,
  .CheckoutPage-form {
    padding-left: 16px;
    padding-right: 16px;
  }
}
