/* ALTEREGO V4.0.5 · Contraste específico del checkout
   Corrige únicamente textos colocados sobre bloques verdes o claros. */

/* MODO CLARO: texto blanco sobre los dos fondos verdes del checkout. */
html[data-theme="light"] body.checkout-page .checkout-form__top,
html[data-theme="light"] body.checkout-page .checkout-form__top :where(h1,h2,h3,h4,p,span,strong,small,div),
html[data-theme="light"] body.checkout-page .checkout-summary-premium .summary-total,
html[data-theme="light"] body.checkout-page .checkout-summary-premium .summary-total :where(span,strong,small,div) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Mantiene el subtítulo del encabezado verde blanco y legible. */
html[data-theme="light"] body.checkout-page .checkout-form__top p {
  color: #e4f4ec !important;
  -webkit-text-fill-color: #e4f4ec !important;
}

/* MODO OSCURO: texto negro sobre elementos que conservan fondo blanco/claro. */
html[data-theme="dark"] body.checkout-page .checkout-summary-premium > h2,
html[data-theme="dark"] body.checkout-page .checkout-summary-premium > h2 :where(span,strong,small),
html[data-theme="dark"] body.checkout-page .checkout-section__step,
html[data-theme="dark"] body.checkout-page .checkout-trust-grid > div,
html[data-theme="dark"] body.checkout-page .checkout-trust-grid > div :where(strong,span,small),
html[data-theme="dark"] body.checkout-page .payment-shell__head,
html[data-theme="dark"] body.checkout-page .payment-shell__head :where(strong,span,small,div),
html[data-theme="dark"] body.checkout-page .payment-security-note,
html[data-theme="dark"] body.checkout-page .payment-security-note :where(strong,span,small,div) {
  color: #101715 !important;
  -webkit-text-fill-color: #101715 !important;
  text-shadow: none !important;
}

/* Contraste reforzado de números y etiquetas pequeñas en modo oscuro. */
html[data-theme="dark"] body.checkout-page .checkout-section__step {
  background: #f1f7f4 !important;
  border: 1px solid #cfe0d7 !important;
  font-weight: 900 !important;
}

html[data-theme="dark"] body.checkout-page .checkout-trust-grid > div {
  background: #f1f7f4 !important;
  border: 1px solid #d5e5dc !important;
}

html[data-theme="dark"] body.checkout-page .checkout-summary-premium > h2 {
  background: #f8fbf9 !important;
  border-bottom-color: #dbe7e1 !important;
}

/* El total del modo oscuro conserva fondo verde oscuro y texto blanco. */
html[data-theme="dark"] body.checkout-page .checkout-summary-premium .summary-total,
html[data-theme="dark"] body.checkout-page .checkout-summary-premium .summary-total :where(span,strong,small,div) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}


/* Mensaje posterior al pago: contraste solicitado por tema. */
html[data-theme="dark"] body.checkout-page #checkoutMsg.alert--success {
  display:block!important;background:#ffffff!important;border:2px solid #1b9b5e!important;color:#087444!important;
  -webkit-text-fill-color:#087444!important;font-weight:900!important;box-shadow:0 12px 30px rgba(0,0,0,.28)!important;
}
html[data-theme="light"] body.checkout-page #checkoutMsg.alert--success {
  display:block!important;background:#087a4c!important;border:2px solid #087a4c!important;color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;font-weight:900!important;box-shadow:0 12px 28px rgba(8,122,76,.22)!important;
}
body.checkout-page #checkoutMsg.alert--processing {
  display:block!important;background:#fff8dc!important;border:1px solid #dfb94b!important;color:#5f4800!important;
  -webkit-text-fill-color:#5f4800!important;font-weight:850!important;padding:12px 14px!important;border-radius:12px!important;text-align:center!important;
}
body.checkout-page #checkoutForm[data-processing="true"] button[type="submit"]{cursor:wait!important;opacity:.86!important}

/* Avisos de la tienda siempre visibles por encima de modales. */
body .app-toast,body .cart-toast{top:18px!important;right:18px!important;bottom:auto!important;left:auto!important;z-index:2147483000!important;}
@media(max-width:680px){body .app-toast,body .cart-toast{left:12px!important;right:12px!important;max-width:none!important;}}


/* === R25 · Checkout premium feedback + dark form fixes === */
body.checkout-page .checkout-submit-wrap{position:relative;}
body.checkout-page #checkoutMsg{display:none !important;}
body.checkout-page .checkout-form-premium[data-processing="true"]{pointer-events:none;opacity:.98;}
body.checkout-page .checkout-form-premium[data-processing="true"] .checkout-submit-wrap{pointer-events:auto;}
body.checkout-page .checkout-form-premium button[type="submit"]{min-height:52px;font-weight:900;letter-spacing:.01em;}
body.checkout-page .checkout-submit-meta{opacity:.86;}

body.checkout-page .checkout-trust-grid{gap:12px!important;}
body.checkout-page .checkout-trust-card{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:16px 12px!important;border-radius:18px!important;text-align:center!important;min-height:122px!important;}
body.checkout-page .checkout-trust-card__icon{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;border-radius:50%!important;background:rgba(9,111,67,.10)!important;color:#0d764b!important;font-size:18px!important;font-weight:900!important;}
body.checkout-page .checkout-trust-card__label{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:6px 10px!important;border-radius:999px!important;background:rgba(9,111,67,.08)!important;color:#0d764b!important;font-size:12px!important;font-weight:800!important;}
body.checkout-page .checkout-trust-card__label--brand{letter-spacing:.02em!important;}
body.checkout-page .checkout-trust-card__label--whatsapp{background:rgba(37,211,102,.12)!important;color:#128c4b!important;}

html[data-theme="dark"] body.checkout-page .checkout-field input,
html[data-theme="dark"] body.checkout-page .checkout-field select,
html[data-theme="dark"] body.checkout-page .checkout-field textarea{
  background:#0c1714 !important;
  color:#ecf7f2 !important;
  -webkit-text-fill-color:#ecf7f2 !important;
  border:1px solid rgba(115,193,155,.28) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] body.checkout-page .checkout-field input::placeholder,
html[data-theme="dark"] body.checkout-page .checkout-field textarea::placeholder{
  color:rgba(231,243,237,.58) !important;
  -webkit-text-fill-color:rgba(231,243,237,.58) !important;
}
html[data-theme="dark"] body.checkout-page .checkout-field input:focus,
html[data-theme="dark"] body.checkout-page .checkout-field select:focus,
html[data-theme="dark"] body.checkout-page .checkout-field textarea:focus{
  border-color:#2bd386 !important;
  box-shadow:0 0 0 3px rgba(43,211,134,.14) !important;
  outline:none !important;
}
html[data-theme="dark"] body.checkout-page .checkout-field span,
html[data-theme="dark"] body.checkout-page .checkout-field label,
html[data-theme="dark"] body.checkout-page .checkout-section__head p,
html[data-theme="dark"] body.checkout-page .checkout-section__head h3{
  color:#eff9f4 !important;
  -webkit-text-fill-color:#eff9f4 !important;
}
html[data-theme="dark"] body.checkout-page .card-input-wrap{background:#0c1714 !important;border-color:rgba(115,193,155,.28) !important;box-shadow:none !important;}
html[data-theme="dark"] body.checkout-page .card-input-icon{color:#9fd9bc !important;}

body.checkout-page .checkout-status-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(5,12,10,.64);backdrop-filter:blur(8px);z-index:2147483500;}
body.checkout-page .checkout-status-modal.is-visible{display:flex;}
body.checkout-page .checkout-status-card{width:min(100%,520px);background:linear-gradient(180deg,#ffffff,#f8fbf9);color:#10211a;border:1px solid rgba(15,105,69,.14);border-radius:28px;box-shadow:0 30px 80px rgba(0,0,0,.22);padding:28px 28px 24px;text-align:center;position:relative;}
body.checkout-page .checkout-status-card__badge{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;margin:0 auto 16px;font-size:30px;font-weight:900;background:rgba(9,122,76,.10);color:#097a4c;}
body.checkout-page .checkout-status-card__spinner{width:28px;height:28px;border-radius:50%;border:3px solid rgba(9,122,76,.16);border-top-color:#0b8a55;animation:aeCheckoutSpin .8s linear infinite;}
body.checkout-page .checkout-status-card h3{margin:0 0 10px;font-size:28px;line-height:1.05;color:#10211a;}
body.checkout-page .checkout-status-card p{margin:0;color:#4a5b53;line-height:1.55;font-size:15px;}
body.checkout-page .checkout-status-card__meta{margin-top:8px;font-size:12px;color:#6d7d76;}
body.checkout-page .checkout-status-card__actions{display:flex;justify-content:center;gap:10px;margin-top:22px;flex-wrap:wrap;}
body.checkout-page .checkout-status-card__actions button{min-width:170px;min-height:46px;border:none;border-radius:14px;padding:0 16px;font-weight:900;cursor:pointer;}
body.checkout-page .checkout-status-card__actions .checkout-status-primary{background:linear-gradient(135deg,#12a15f,#0d7046);color:#fff;box-shadow:0 14px 28px rgba(13,112,70,.24);}
body.checkout-page .checkout-status-card__actions .checkout-status-secondary{background:#edf3f0;color:#163126;}
body.checkout-page .checkout-status-modal--processing .checkout-status-card__badge{background:rgba(9,122,76,.10);color:#097a4c;}
body.checkout-page .checkout-status-modal--success .checkout-status-card__badge{background:rgba(20,157,85,.12);color:#0e8a54;}
body.checkout-page .checkout-status-modal--error .checkout-status-card__badge{background:rgba(205,65,65,.10);color:#b93333;}
body.checkout-page .checkout-status-modal--error .checkout-status-card__spinner{display:none;}
body.checkout-page .checkout-status-modal--error .checkout-status-card__meta{color:#8a5d5d;}
html[data-theme="dark"] body.checkout-page .checkout-status-card{background:linear-gradient(180deg,#0d1815,#10201b);color:#edf8f3;border-color:rgba(120,211,167,.14);box-shadow:0 30px 80px rgba(0,0,0,.42);}
html[data-theme="dark"] body.checkout-page .checkout-status-card h3{color:#f4fff8;}
html[data-theme="dark"] body.checkout-page .checkout-status-card p{color:#d7e9df;}
html[data-theme="dark"] body.checkout-page .checkout-status-card__meta{color:#93b1a1;}
html[data-theme="dark"] body.checkout-page .checkout-status-card__actions .checkout-status-secondary{background:#162621;color:#eff9f4;}
body.checkout-page.checkout-modal-open{overflow:hidden;}
@keyframes aeCheckoutSpin{to{transform:rotate(360deg);}}
@media (max-width:680px){
  body.checkout-page .checkout-status-card{padding:24px 18px 20px;border-radius:24px;}
  body.checkout-page .checkout-status-card h3{font-size:24px;}
  body.checkout-page .checkout-status-card__actions button{width:100%;}
}
