/* ============================================================
   Standalone Checkout — /pagos/
   Self-contained CSS. No theme deps.
   ============================================================ */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body.tm-checkout-body{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    margin:0;
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    font-size:14px;
    line-height:1.5;
    color:#373535;
    background:#F6F7FA;
    -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:#7B3FF2;text-decoration:none}
a:hover{text-decoration:underline}

/* Topbar */
.tm-checkout-topbar{
    background:#fff;
    border-bottom:1px solid #E7E9EF;
    padding:16px 20px;
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:12px;
    position:sticky;
    top:0;
    z-index:999;
}
.tm-checkout-topbar .tm-checkout-progress{justify-self:center}
@media (max-width:520px){
    .tm-checkout-topbar{
        grid-template-columns:auto 1fr;
    }
    .tm-checkout-topbar .tm-checkout-progress{justify-self:end}
}
.tm-checkout-logo-link{display:block;line-height:0}
.tm-checkout-logo{height:clamp(26px,4vw,36px);width:auto}
.tm-checkout-progress{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px;
    color:#6B7280;
    font-weight:500;
}
.tm-checkout-progress-step{display:flex;align-items:center;gap:8px}
.tm-checkout-progress-dot{
    display:inline-flex;align-items:center;justify-content:center;
    width:26px;height:26px;border-radius:50%;
    background:#E7E9EF;color:#6B7280;font-weight:600;font-size:12px;
    transition:background-color .2s ease,color .2s ease;
}
.tm-checkout-progress-step--active .tm-checkout-progress-dot,
.tm-checkout-progress-step--done .tm-checkout-progress-dot{
    background:linear-gradient(135deg,#8A55FF,#7B3FF2);color:#fff;
}
.tm-checkout-progress-step--active .tm-checkout-progress-label{color:#373535}
.tm-checkout-progress-line{width:32px;height:2px;background:#E7E9EF}

/* Main layout */
.tm-checkout-main{
    flex:1;
    width:100%;
    max-width:1400px;
    margin:0 auto;
    padding:clamp(16px,3vw,32px);
}
.tm-checkout-layout{
    display:grid;
    grid-template-columns:1fr clamp(320px,35vw,480px);
    gap:clamp(20px,3vw,32px);
    align-items:start;
}
@media (max-width:899px){
    .tm-checkout-layout{grid-template-columns:1fr}
    .tm-checkout-col-sidebar{order:-1}
}

/* Steps */
.tm-checkout-step{
    background:#fff;
    border:1px solid #E7E9EF;
    border-radius:14px;
    padding:clamp(18px,3vw,28px);
    box-shadow:0 1px 3px rgba(0,0,0,.04);
    margin-bottom:16px;
}
.tm-checkout-step[hidden]{display:none}
/* Entrada del paso al mostrarse (Información al cargar, Pago al avanzar): fade +
   slide-up suaviza el cambio brusco. Ocasional (1 vez por compra), ease-out
   fuerte, dentro del presupuesto. Se dispara cada vez que el paso recibe
   --active (JS lo togglea al mostrar). Respeta reduced-motion. */
.tm-checkout-step--active{animation:tmStepIn .32s cubic-bezier(0.23, 1, 0.32, 1) both}
@keyframes tmStepIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion: reduce){.tm-checkout-step--active{animation:none}}
.tm-checkout-step-title{
    margin:0 0 20px;
    font-size:18px;
    font-weight:700;
    color:#373535;
    letter-spacing:-.01em;
}
/* Tipografia de marca: titulos en Poppins (display), cuerpo/inputs en Inter */
.tm-checkout-step-title,
.tm-checkout-empty h1,
.tm-checkout h1, .tm-checkout h2, .tm-checkout h3,
.tm-azul-embed-result-title{
    font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
}
.tm-checkout-field-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px 16px;
}
.tm-checkout-field{display:flex;flex-direction:column;gap:6px}
.tm-checkout-field--half{grid-column:span 1}
.tm-checkout-field:not(.tm-checkout-field--half){grid-column:1/-1}
@media (max-width:520px){
    .tm-checkout-field-grid{grid-template-columns:1fr}
    .tm-checkout-field--half{grid-column:1/-1}
}
.tm-checkout-field label{
    font-size:13px;
    font-weight:600;
    color:#374151;
}
.tm-checkout-field input{
    width:100%;
    padding:11px 14px;
    border:1px solid #d0d5dd;
    border-radius:10px;
    background:#fff;
    font-family:inherit;
    font-size:14px;
    color:#373535;
    transition:border-color .15s,box-shadow .15s;
}
.tm-checkout-field input:focus{
    outline:none;
    border-color:#7B3FF2;
    box-shadow:0 0 0 3px rgba(123, 63, 242,.1);
}
.tm-checkout-field input[aria-invalid="true"]{
    border-color:#e85347;
    background:#fff5f5;
}
.tm-checkout-field-hint{
    display:block;
    font-size:12px;
    color:#6B7280;
    margin-top:4px;
    line-height:1.4;
}
.tm-checkout-field-hint[hidden]{display:none}
.tm-checkout-field-hint.is-warning{
    color:#d97706;
    font-weight:500;
    animation:tm-shake .3s ease;
}
/* Error inline debajo del campo (ej. "Los correos no coinciden"). Rojo, con el
   icono de aviso, para informar claramente al cliente por qué el campo está mal. */
.tm-checkout-field-error{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#DC2626;
    font-weight:500;
    margin-top:5px;
    line-height:1.4;
}
.tm-checkout-field-error::before{
    content:"";
    flex:0 0 auto;
    width:15px;height:15px;
    background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='13'/%3E%3Cline x1='12' y1='16.5' x2='12' y2='16.5'/%3E%3C/svg%3E");
}
.tm-checkout-field-error[hidden]{display:none}
/* El boton de la sugerencia de correo: parece un enlace dentro del aviso, no
   un boton mas del formulario. Lleva [hidden]{display:none} el contenedor, que
   es lo que hace falta cuando la clase declara display. */
.tm-email-sugerencia-btn{
    background:none;border:0;padding:0;margin:0;
    font:inherit;color:#7B3FF2;font-weight:600;
    text-decoration:underline;cursor:pointer;
}
.tm-email-sugerencia-btn:hover,
.tm-email-sugerencia-btn:focus-visible{color:#FF2E88}
@keyframes tm-shake{
    0%,100%{transform:translateX(0)}
    25%{transform:translateX(-3px)}
    75%{transform:translateX(3px)}
}

/* Phone group: selector de pais + input de numero */
.tm-checkout-phone-group{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:8px;
    align-items:stretch;
}
.tm-checkout-phone-number{width:100%}

/* ── Custom phone country picker ── */
.tm-phone-picker{position:relative}
.tm-phone-picker-button{
    appearance:none;
    background:#fff;
    border:1px solid #d0d5dd;
    border-radius:10px;
    padding:11px 10px;
    font-family:inherit;
    font-size:14px;
    color:#373535;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:6px;
    height:100%;
    min-width:100px;
    transition:border-color .15s,box-shadow .15s;
}
.tm-phone-picker-button:hover{border-color:#a4aebd}
.tm-phone-picker-button:focus-visible{
    outline:none;
    border-color:#7B3FF2;
    box-shadow:0 0 0 3px rgba(123, 63, 242,.1);
}
.tm-phone-picker-button[aria-expanded="true"]{
    border-color:#7B3FF2;
    box-shadow:0 0 0 3px rgba(123, 63, 242,.1);
}
.tm-phone-picker-flag{font-size:18px;line-height:1}
.tm-phone-picker-label{font-weight:600;white-space:nowrap;font-size:13px}
.tm-phone-picker-caret{
    font-size:10px;
    color:#6B7280;
    margin-left:2px;
    transition:transform .15s;
}
.tm-phone-picker-button[aria-expanded="true"] .tm-phone-picker-caret{
    transform:rotate(180deg);
}

.tm-phone-picker-dropdown{
    position:absolute;
    top:calc(100% + 4px);
    left:0;
    width:320px;
    max-width:calc(100vw - 40px);
    background:#fff;
    border:1px solid #E7E9EF;
    border-radius:12px;
    box-shadow:0 10px 30px rgba(0,0,0,.12);
    z-index:50;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}
/* hidden attr prevalece sobre display:flex */
.tm-phone-picker-dropdown[hidden]{display:none}
.tm-phone-picker-search{
    appearance:none;
    border:none;
    border-bottom:1px solid #E7E9EF;
    padding:11px 14px;
    font-family:inherit;
    font-size:14px;
    color:#373535;
    outline:none;
    background:#F6F7FA;
}
.tm-phone-picker-search:focus{background:#fff}
.tm-phone-picker-list{
    list-style:none;
    margin:0;
    padding:6px 0;
    max-height:320px;
    overflow-y:auto;
    overscroll-behavior:contain;
}
.tm-phone-picker-option{
    display:grid;
    grid-template-columns:24px 1fr auto;
    align-items:center;
    gap:10px;
    padding:9px 14px;
    cursor:pointer;
    font-size:13px;
    transition:background .1s;
}
.tm-phone-picker-option:hover,
.tm-phone-picker-option.is-highlighted{background:#f7f2ff}
.tm-phone-picker-option[aria-selected="true"]{background:#e8e0f7;font-weight:600}
.tm-phone-picker-option[hidden]{display:none}
.tm-phone-picker-opt-flag{font-size:18px;line-height:1}
.tm-phone-picker-opt-name{color:#373535;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-phone-picker-opt-dial{color:#6B7280;font-variant-numeric:tabular-nums}
.tm-phone-picker-divider{
    height:1px;
    background:#E7E9EF;
    margin:6px 14px;
    list-style:none;
}
.tm-checkout-req{color:#e85347}

.tm-checkout-step-actions{
    display:flex;
    gap:12px;
    justify-content:flex-end;
    margin-top:24px;
    flex-wrap:wrap;
}
.tm-checkout-step-actions .tm-checkout-btn--secondary{margin-right:auto}
/* Móvil: acciones en UNA sola línea (no escalonadas arriba/abajo). En pantallas
   angostas flex-wrap:wrap dejaba "Cambiar método de pago" arriba y "Continuar"
   debajo-derecha. Aquí van lado a lado (mitad y mitad), alineadas. */
@media (max-width:560px){
    .tm-checkout-step-actions{flex-wrap:nowrap;gap:10px;align-items:stretch}
    .tm-checkout-step-actions .tm-checkout-btn{flex:1 1 0;min-width:0;justify-content:center;text-align:center;padding:12px 10px}
    .tm-checkout-step-actions .tm-checkout-btn--secondary{margin-right:0}
}

/* Buttons */
.tm-checkout-btn{
    appearance:none;
    border:none;
    cursor:pointer;
    font-family:inherit;
    font-size:14px;
    font-weight:600;
    padding:12px 20px;
    /* 44px es el mínimo táctil de HIG; con padding 12px + 14px de texto el botón
       quedaba en 41px, y en móvil es el CTA principal del pago. */
    min-height:44px;
    border-radius:10px;
    transition:transform .1s,box-shadow .15s,opacity .15s;
    display:inline-flex;align-items:center;gap:8px;
    text-decoration:none;
}
.tm-checkout-btn:hover{transform:translateY(-1px)}
.tm-checkout-btn:active{transform:translateY(0)}
.tm-checkout-btn:disabled{opacity:.6;cursor:not-allowed;transform:none}
/* .tm-checkout-btn fija display:inline-flex explicito, que por
   especificidad le gana al display:none nativo del atributo [hidden] del
   navegador (user-agent stylesheet, muy baja especificidad) — sin esta
   regla, CUALQUIER boton con esta clase queda visible aunque tenga
   [hidden]. Hallado en el boton "Cambiar metodo de pago" (2026-07-06);
   la regla generica de aca cubre tambien "Continuar" y futuros botones. */
.tm-checkout-btn[hidden]{display:none}
.tm-checkout-btn--primary{
    background:linear-gradient(135deg,#8A55FF,#7B3FF2);
    color:#fff;
    box-shadow:0 2px 8px rgba(123, 63, 242,.25);
}
.tm-checkout-btn--primary:hover{box-shadow:0 4px 14px rgba(123, 63, 242,.35)}
.tm-checkout-btn--secondary{
    background:#fff;
    color:#374151;
    border:1px solid #d0d5dd;
}
.tm-checkout-btn--secondary:hover{background:#F6F7FA}

.tm-checkout-submit{min-width:180px;justify-content:center;font-size:15px;padding:14px 24px}
.tm-checkout-submit-spinner{
    width:16px;height:16px;
    border:2px solid rgba(255,255,255,.3);
    border-top-color:#fff;
    border-radius:50%;
    animation:tm-spin .6s linear infinite;
}
@keyframes tm-spin{to{transform:rotate(360deg)}}

/* Gateways */
.tm-checkout-gateways{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.tm-checkout-gateway-label{
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    gap:4px 12px;
    padding:14px 16px;
    border:1px solid #d0d5dd;
    border-radius:10px;
    background:#fff;
    cursor:pointer;
    transition:border-color .15s,background .15s;
}
.tm-checkout-gateway-label:has(input[name="payment_method"]:checked){
    border-color:#7B3FF2;
    background:#f7f2ff;
    box-shadow:0 0 0 3px rgba(123, 63, 242,.08);
}
/* El circulito del radio ya no se ve (pedido explicito, 2026-07-06): el
   resaltado de la tarjeta seleccionada + el ocultamiento de las demas
   opciones ya comunican cual esta elegida. Sigue siendo un <input
   type="radio"> real (NO se elimina): funcional con teclado/lector de
   pantalla, y el <label> que lo envuelve lo activa igual al hacer clic en
   cualquier parte de la tarjeta — solo se oculta visualmente (patron
   "screen-reader-only", no display:none, que sacaria el foco de teclado). */
.tm-checkout-gateway-label input{
    position:absolute;
    width:1px;height:1px;
    padding:0;margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}
.tm-checkout-gateway-label:has(input:focus-visible){
    outline:2px solid #7B3FF2;
    outline-offset:2px;
}
.tm-checkout-gateway-title{
    font-weight:600;
    color:#373535;
    display:flex;align-items:center;gap:12px;
}
.tm-checkout-gateway-icon img{max-height:20px;width:auto;display:inline}
/* Icono de cada metodo de pago (pedido de Carlos, 15-oct-2026): el mismo
   lenguaje que el checkout de MeBiz (20 px, trazo 1.9) a la
   izquierda del nombre, gris en reposo e indigo TICKETMAX al elegirlo.
   Va entero en CSS, colgado del data-gateway que la plantilla ya imprime:
   asi /pago/ sale identico de PHP y de Node (paridad byte a byte) sin tocar
   el HTML. Es un pseudo-elemento decorativo: el lector de pantalla sigue
   leyendo solo el nombre. Pasarela sin icono propio → el de banco
   (transferencias de Banreservas, BHD, Popular...). */
.tm-checkout-gateway-title::before{
    content:"";
    flex:0 0 20px;
    width:20px;height:20px;
    background-color:#667085;
    -webkit-mask:var(--tm-gw-ico) center/contain no-repeat;
    mask:var(--tm-gw-ico) center/contain no-repeat;
    transition:background-color .15s;
}
.tm-checkout-gateway-label:has(input[name="payment_method"]:checked) .tm-checkout-gateway-title::before{background-color:#7B3FF2}
.tm-checkout-gateway{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cline%20x1='3'%20x2='21'%20y1='22'%20y2='22'%20/%3E%20%3Cline%20x1='6'%20x2='6'%20y1='18'%20y2='11'%20/%3E%20%3Cline%20x1='10'%20x2='10'%20y1='18'%20y2='11'%20/%3E%20%3Cline%20x1='14'%20x2='14'%20y1='18'%20y2='11'%20/%3E%20%3Cline%20x1='18'%20x2='18'%20y1='18'%20y2='11'%20/%3E%20%3Cpolygon%20points='12%202%2020%207%204%207'%20/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="azul_checkout"],.tm-checkout-gateway[data-gateway="ppcp-card-button-gateway"],.tm-checkout-gateway[data-gateway="mepay_stripe"],.tm-checkout-gateway[data-gateway="e_commerce_azul"],.tm-checkout-gateway[data-gateway="azul_payments"],.tm-checkout-gateway[data-gateway="mepay_tap_to_pay"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20width='20'%20height='14'%20x='2'%20y='5'%20rx='2'%20/%3E%20%3Cline%20x1='2'%20x2='22'%20y1='10'%20y2='10'%20/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_paypal"],.tm-checkout-gateway[data-gateway="ppcp-gateway"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M7.016%2019.198h-4.2a.562.562%200%200%201-.555-.65L5.093.584A.692.692%200%200%201%205.776%200h7.222c3.417%200%205.904%202.488%205.846%205.5-.006.25-.027.5-.066.747A6.794%206.794%200%200%201%2012.071%2012H8.743a.69.69%200%200%200-.682.583l-.325%202.056-.013.083-.692%204.39-.015.087zM19.79%206.142c-.01.087-.01.175-.023.261a7.76%207.76%200%200%201-7.695%206.598H9.007l-.283%201.795-.013.083-.692%204.39-.134.843-.014.088H6.86l-.497%203.15a.562.562%200%200%200%20.555.65h3.612c.34%200%20.63-.249.683-.585l.952-6.031a.692.692%200%200%201%20.683-.584h2.126a6.793%206.793%200%200%200%206.707-5.752c.306-1.95-.466-3.744-1.89-4.906z'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="azul_googlepay"],.tm-checkout-gateway[data-gateway="mepay_googlepay"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M12.48%2010.92v3.28h7.84c-.24%201.84-.853%203.187-1.787%204.133-1.147%201.147-2.933%202.4-6.053%202.4-4.827%200-8.6-3.893-8.6-8.72s3.773-8.72%208.6-8.72c2.6%200%204.507%201.027%205.907%202.347l2.307-2.307C18.747%201.44%2016.133%200%2012.48%200%205.867%200%20.307%205.387.307%2012s5.56%2012%2012.173%2012c3.573%200%206.267-1.173%208.373-3.36%202.16-2.16%202.84-5.213%202.84-7.667%200-.76-.053-1.467-.173-2.053H12.48z'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="azul_applepay"],.tm-checkout-gateway[data-gateway="mepay_applepay"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M12.152%206.896c-.948%200-2.415-1.078-3.96-1.04-2.04.027-3.91%201.183-4.961%203.014-2.117%203.675-.546%209.103%201.519%2012.09%201.013%201.454%202.208%203.09%203.792%203.039%201.52-.065%202.09-.987%203.935-.987%201.831%200%202.35.987%203.96.948%201.637-.026%202.676-1.48%203.676-2.948%201.156-1.688%201.636-3.325%201.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04%202.48-4.494%202.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675%201.09-4.61%201.09zM15.53%203.83c.843-1.012%201.4-2.427%201.245-3.83-1.207.052-2.662.805-3.532%201.818-.78.896-1.454%202.338-1.273%203.714%201.338.104%202.715-.688%203.559-1.701'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_link"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10%2013a5%205%200%200%200%207.54.54l3-3a5%205%200%200%200-7.07-7.07l-1.72%201.71'%20/%3E%20%3Cpath%20d='M14%2011a5%205%200%200%200-7.54-.54l-3%203a5%205%200%200%200%207.07%207.07l1.71-1.71'%20/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_binance"],.tm-checkout-gateway[data-gateway="tm_binance_pay"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M16.624%2013.9202l2.7175%202.7154-7.353%207.353-7.353-7.352%202.7175-2.7164%204.6355%204.6595%204.6356-4.6595zm4.6366-4.6366L24%2012l-2.7154%202.7164L18.5682%2012l2.6924-2.7164zm-9.272.001l2.7163%202.6914-2.7164%202.7174v-.001L9.2721%2012l2.7164-2.7154zm-9.2722-.001L5.4088%2012l-2.6914%202.6924L0%2012l2.7164-2.7164zM11.9885.0115l7.353%207.329-2.7174%202.7154-4.6356-4.6356-4.6355%204.6595-2.7174-2.7154%207.353-7.353z'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_usdt"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M18.7538%2010.5176c0%20.6251-2.2379%201.1483-5.2381%201.2812l.0028.0007c-.0848.0064-.5233.0325-1.5012.0325-.7778%200-1.33-.0233-1.5237-.0325-3.0059-.1322-5.2495-.6555-5.2495-1.2819s2.2436-1.149%205.2495-1.2834v2.0442c.1965.0142.7594.0474%201.5372.0474.9334%200%201.4008-.0389%201.4849-.0466V9.2356c2.9994.1337%205.2381.657%205.2381%201.282zm5.19.5466L12.1248%2022.389a.1803.1803%200%200%201-.2496%200L.0562%2011.0635a.1781.1781%200%200%201-.0382-.2079l4.3762-9.1921a.1767.1767%200%200%201%20.1626-.1026h14.8878a.1768.1768%200%200%201%20.1612.1032l4.3762%209.1922a.1782.1782%200%200%201-.0382.2079zm-4.478-.4038c0-.8068-2.5515-1.4799-5.9473-1.6369V7.195h4.186V4.4055H6.3076V7.195h4.1852v1.8286c-3.4018.1562-5.9601.83-5.9601%201.6376%200%20.8075%202.5583%201.4806%205.9601%201.6376v5.8618h3.025v-5.8639c3.394-.1563%205.948-.8295%205.948-1.6363z'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_zelle"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M13.559%2024h-2.841a.483.483%200%200%201-.483-.483v-2.765H5.638a.667.667%200%200%201-.666-.666v-2.234a.67.67%200%200%201%20.142-.412l8.139-10.382h-7.25a.667.667%200%200%201-.667-.667V3.914c0-.367.299-.666.666-.666h4.23V.483c0-.266.217-.483.483-.483h2.841c.266%200%20.483.217.483.483v2.765h4.323c.367%200%20.666.299.666.666v2.137a.67.67%200%200%201-.141.41l-8.19%2010.481h7.665c.367%200%20.666.299.666.666v2.477a.667.667%200%200%201-.666.667h-4.32v2.765a.483.483%200%200%201-.483.483Z'/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_pagomovil"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20width='14'%20height='20'%20x='5'%20y='2'%20rx='2'%20ry='2'%20/%3E%20%3Cpath%20d='M12%2018h.01'%20/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_manual_cod"],.tm-checkout-gateway[data-gateway="mepay_efectivo"],.tm-checkout-gateway[data-gateway="tm_cash"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20width='20'%20height='12'%20x='2'%20y='6'%20rx='2'%20/%3E%20%3Ccircle%20cx='12'%20cy='12'%20r='2'%20/%3E%20%3Cpath%20d='M6%2012h.01M18%2012h.01'%20/%3E%3C/svg%3E")}
.tm-checkout-gateway[data-gateway="mepay_manual_gratis"],.tm-checkout-gateway[data-gateway="mepay_manual_cortesia"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='8'%20width='18'%20height='4'%20rx='1'%20/%3E%20%3Cpath%20d='M12%208v13'%20/%3E%20%3Cpath%20d='M19%2012v7a2%202%200%200%201-2%202H7a2%202%200%200%201-2-2v-7'%20/%3E%20%3Cpath%20d='M7.5%208a2.5%202.5%200%200%201%200-5A4.8%208%200%200%201%2012%208a4.8%208%200%200%201%204.5-5%202.5%202.5%200%200%201%200%205'%20/%3E%3C/svg%3E")}
/* MePay (billetera): la silueta del avion de papel de Menarve, entera y de una sola tinta, sin detalles internos */
.tm-checkout-gateway[data-gateway="mepay_wallet"]{--tm-gw-ico:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='252%20292%20520%20520'%3E%3Cpath%20fill='%23000'%20stroke='%23000'%20stroke-width='16'%20stroke-linejoin='round'%20d='M276%20326H748L538%20792L462%20546L276%20352Z'/%3E%3C/svg%3E")}
.tm-checkout-gateway-empty{
    padding:16px;
    background:#fff5f5;
    border:1px solid #fecaca;
    border-radius:8px;
    color:#991b1b;
}
/* Al elegir un método de pago, las demás opciones se ocultan para centrar
   el foco en el proceso de pago elegido (pedido explícito, 2026-07-06).
   NUNCA usa style.display inline: eso es lo que usan Apple/Google Pay/Link
   para ocultarse por incompatibilidad de navegador — ver el comentario del
   JS de toggle(). */
.tm-checkout-gateway.tm-gw-collapsed{display:none}
/* «Transferencia Bancaria»: la sub-lista de bancos bajo la fila del metodo (mismos colores y radios que las filas). */
.tm-bancos{min-width:0;margin:10px 0 0;padding:0 0 0 14px;border:0;border-left:2px solid #e2e8f0;display:flex;flex-direction:column;gap:8px}
.tm-bancos-titulo{padding:0;margin:0 0 8px;font-size:13px;font-weight:600;color:#64748b}
.tm-banco{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;font-size:14px;font-weight:600;color:#1e293b;cursor:pointer;transition:border-color .15s,background-color .15s}
.tm-banco input{accent-color:#7B3FF2;margin:0}
.tm-banco:has(input:checked){border-color:#7B3FF2;background:#f5f0ff}
.tm-banco:has(input:focus-visible){outline:2px solid #7B3FF2;outline-offset:2px}

/* Terms */
.tm-checkout-terms{
    margin:18px 0 0;
    padding:14px;
    background:#F6F7FA;
    border-radius:10px;
    transition:background .2s ease, box-shadow .2s ease;
}
/* Fila de confianza bajo el botón de pago (peak-end): aval en el momento de decisión */
.tm-checkout-trust{
    margin:16px 0 0;
    text-align:center;
}
.tm-checkout-trust-secure{
    display:flex;align-items:center;justify-content:center;gap:6px;
    margin:0;
    font-size:13px;font-weight:600;color:#1a7f37;
}
.tm-checkout-trust-secure svg{flex-shrink:0}
.tm-checkout-trust-methods{
    margin:5px 0 0;
    font-size:12px;color:#595959;
}
.tm-checkout-terms label{
    display:flex;align-items:flex-start;gap:10px;
    font-size:13px;color:#374151;cursor:pointer;
}
.tm-checkout-terms input{width:18px;height:18px;accent-color:#7B3FF2;margin-top:1px;flex-shrink:0}
/* Estado "necesita atención": pulse sutil cuando el checkbox debe marcarse para PayPal */
.tm-checkout-terms.tm-terms--needs-attention{
    background:linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.04) 100%);
    box-shadow:0 0 0 2px rgba(245,158,11,0.25);
    animation:tmTermsPulse 1.6s ease-in-out 2;
}
@keyframes tmTermsPulse{
    0%,100%{box-shadow:0 0 0 2px rgba(245,158,11,0.25)}
    50%{box-shadow:0 0 0 4px rgba(245,158,11,0.40)}
}

/* Banner aviso "Acepta términos" — hidden por default, visible cuando JS
   detecta intento de submit/click PayPal sin terms aceptados. Universal
   para todos los gateways (AZUL, PayPal, Card). */
.tm-paypal-terms-warning{
    display:none;
    position:relative;
    align-items:flex-start;gap:12px;
    margin:14px 0 26px; /* bottom amplio para que la flecha respire */
    padding:14px 16px;
    background:linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border:1px solid #fcd34d;
    border-radius:12px;
    box-shadow:0 1px 2px rgba(245,158,11,0.08);
    color:#78350f;
    font-size:13px;
    line-height:1.45;
    animation:tmTermsWarningIn .25s ease-out;
}

/* Flecha amber apuntando al checkbox debajo */
.tm-paypal-terms-warning__arrow{
    position:absolute;
    bottom:-22px;
    left:9px; /* center del círculo (9 + 30/2 = 24) cae sobre center del checkbox del .tm-checkout-terms (14 padding + 18/2 = 23) */
    width:30px;height:30px;
    border-radius:50%;
    background:#f59e0b;
    color:#fff;
    display:flex;align-items:center;justify-content:center;
    box-shadow:0 4px 10px rgba(245,158,11,0.35);
    animation:tmArrowBounce 1.1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events:none;
    z-index:2;
}
@keyframes tmArrowBounce{
    0%, 100% { transform:translateY(0); }
    50%      { transform:translateY(8px); }
}
.tm-checkout-form[data-show-terms-warning="true"] .tm-paypal-terms-warning{
    display:flex;
}
@keyframes tmTermsWarningIn{
    from{opacity:0;transform:translateY(-4px)}
    to{opacity:1;transform:translateY(0)}
}
.tm-paypal-terms-warning__icon{
    width:32px;height:32px;
    border-radius:50%;
    background:#f59e0b;
    color:#fff;
    display:flex;align-items:center;justify-content:center;
    flex-shrink:0;
}
.tm-paypal-terms-warning__content{
    display:flex;flex-direction:column;gap:2px;
}
.tm-paypal-terms-warning__content strong{
    font-size:13px;font-weight:700;color:#92400e;
}
.tm-paypal-terms-warning__content span{
    font-size:12px;color:#78350f;opacity:.92;
}

/* Wrapper de botones PayPal: cuando términos no aceptados, los botones se
   ven 100% normales pero un overlay invisible captura el click y muestra
   el banner de aviso. Sin opacity reducida — preserva la apariencia oficial
   de PayPal (yellow vivo) para no confundir al user. */
.tm-paypal-buttons-wrap{
    position:relative;
}
.tm-checkout-form[data-terms-accepted="false"] .tm-paypal-buttons-wrap > *{
    pointer-events:none; /* botones internos no responden a clicks */
}
.tm-checkout-form[data-terms-accepted="false"] .tm-paypal-buttons-wrap::after{
    content:"";
    position:absolute;inset:0;
    background:transparent;
    cursor:not-allowed;
    z-index:10;
    pointer-events:auto; /* el overlay sí captura click → JS muestra aviso */
}
/* Overlay de procesamiento — visible mientras se confirma el pago tras
   cerrar popup PayPal o submit de cualquier gateway. Evita que el user
   sienta que la página está colgada o quede dudando si el cobro pasó. */
.tm-processing-overlay{
    position:fixed;inset:0;
    background:rgba(15,23,42,0.78);
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    z-index:99999;
    display:flex;align-items:center;justify-content:center;
    animation:tmOverlayIn .25s ease-out;
}
@keyframes tmOverlayIn{
    from{opacity:0}
    to{opacity:1}
}
.tm-processing-overlay__card{
    background:#fff;
    border-radius:16px;
    padding:32px 40px;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);
    text-align:center;
    max-width:90vw;
    width:380px;
    display:flex;flex-direction:column;align-items:center;gap:14px;
}
.tm-processing-overlay__spinner{
    width:48px;height:48px;
    border-radius:50%;
    border:4px solid rgba(123, 63, 242,0.15);
    border-top-color:#7B3FF2;
    animation:tmSpinnerRotate .9s linear infinite;
}
@keyframes tmSpinnerRotate{
    to{transform:rotate(360deg)}
}
.tm-processing-overlay__title{
    font-size:18px;font-weight:700;color:#0f172a;
    margin:0;
}
.tm-processing-overlay__text{
    font-size:13px;color:#6B7280;
    margin:0;line-height:1.5;
}
/* Esconder lista <li> nativa del PPCP plugin con el mensaje feo */
.tm-checkout-gateway-fields ul li[class*="paypal"][class*="terms"],
.tm-checkout-form .ppcp-disabled-message,
.tm-checkout-form .ppcp-message-list,
.tm-checkout-form ul.ppcp-message-list{
    display:none !important;
}

/* Errors */
.tm-checkout-errors{
    margin:16px 0 0;
    padding:12px 16px;
    background:#fff5f5;
    border:1px solid #fecaca;
    border-radius:8px;
    color:#991b1b;
    font-size:13px;
}
.tm-checkout-errors[hidden]{display:none}
.tm-checkout-errors-alt{margin:8px 0 0}
.tm-checkout-errors-alt-btn{display:block;margin:8px 0 0;padding:4px 10px;background:#fff;border:1px solid #fecaca;border-radius:6px;color:#991b1b;font:inherit;font-weight:600;cursor:pointer}
.tm-checkout-errors-alt-btn:hover{background:#fee2e2}

/* Summary sidebar */
.tm-checkout-summary{
    position:sticky;top:100px;
    background:#fff;
    border:1px solid #E7E9EF;
    border-radius:14px;
    padding:20px;
    box-shadow:0 1px 3px rgba(0,0,0,.04);
}
@media (max-width:899px){.tm-checkout-summary{position:static}}
.tm-checkout-summary-title{
    margin:0 0 16px;
    font-size:15px;
    font-weight:700;
    color:#373535;
    text-transform:uppercase;
    letter-spacing:.04em;
}

/* ── Hold countdown ──
   Card independiente (encima del resumen del pedido). Shadow y
   padding propios, no embebida. */
.tm-checkout-hold{
    --hold-c1: #7B3FF2;
    --hold-c2: #8A55FF;
    --hold-bg: #ffffff;
    --hold-border: rgba(123, 63, 242,.22);
    --hold-tint: rgba(123, 63, 242,.05);
    position:relative;
    padding:16px 18px 18px;
    background:var(--hold-bg);
    border:1px solid var(--hold-border);
    border-radius:14px;
    box-shadow:0 4px 16px rgba(123, 63, 242,.10), 0 1px 2px rgba(0,0,0,.04);
    margin-bottom:16px;
    overflow:hidden;
    transition:background .3s,border-color .3s,box-shadow .3s;
}
/* Banda decorativa superior, tinted con el color del estado */
.tm-checkout-hold::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:3px;
    background:linear-gradient(90deg,var(--hold-c2),var(--hold-c1));
    transition:background .3s;
}
.tm-checkout-hold-head{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--hold-c1);
    font-size:12px;
    font-weight:600;
    letter-spacing:.02em;
    text-transform:uppercase;
    margin-bottom:10px;
}
.tm-checkout-hold-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:20px;height:20px;
    border-radius:50%;
    background:var(--hold-c1);
    color:#fff;
    flex-shrink:0;
}
.tm-checkout-hold-icon svg{width:12px;height:12px}
.tm-checkout-hold-label{
    color:#373535;
    text-transform:none;
    letter-spacing:0;
    font-weight:600;
    font-size:13px;
}
.tm-checkout-hold-timer{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    margin-bottom:10px;
}
.tm-checkout-hold-prefix{
    font-size:12px;
    color:#6B7280;
    font-weight:500;
}
.tm-checkout-hold-clock{
    font-family:'SF Mono','Monaco','Menlo',ui-monospace,monospace;
    font-size:24px;
    font-weight:700;
    color:var(--hold-c1);
    letter-spacing:-.02em;
    font-variant-numeric:tabular-nums;
    line-height:1;
    transition:color .3s;
}
.tm-checkout-hold-bar{
    height:4px;
    background:rgba(123, 63, 242,.08);
    border-radius:999px;
    overflow:hidden;
    transition:background .3s;
}
.tm-checkout-hold-bar-fill{
    height:100%;
    width:100%;
    background:linear-gradient(90deg,var(--hold-c2),var(--hold-c1));
    border-radius:inherit;
    transform-origin:left;
    transition:transform 1s linear,background .3s;
}

/* Warning state (< 2 min): se mantiene MORADO de marca para combinar con el
   resto del checkout (el usuario rechaza el ámbar). La urgencia se comunica con
   el pulso del reloj + la barra vaciándose, no con un cambio de color. */
.tm-checkout-hold.is-warning{
    --hold-c1:#7B3FF2;
    --hold-c2:#8A55FF;
    --hold-bg:#ffffff;
    --hold-border:rgba(123, 63, 242,.34);
}
.tm-checkout-hold.is-warning .tm-checkout-hold-bar{background:rgba(123, 63, 242,.12)}
.tm-checkout-hold.is-warning .tm-checkout-hold-clock{
    animation:tm-pulse-warn 1s ease-in-out infinite alternate;
}
@keyframes tm-pulse-warn{
    from{opacity:1}
    to{opacity:.55}
}

/* Expired state (00:00): rojo. */
.tm-checkout-hold.is-expired{
    --hold-c1:#dc2626;
    --hold-c2:#ef4444;
    --hold-bg:#fff5f5;
    --hold-border:rgba(220,38,38,.22);
}
.tm-checkout-hold.is-expired .tm-checkout-hold-bar{background:rgba(220,38,38,.14)}
.tm-checkout-hold.is-expired .tm-checkout-hold-clock{animation:none}

/* En móvil el sidebar va arriba (order:-1), así que el cronómetro es lo PRIMERO
   que ve quien va a pagar. Como tarjeta hero con reloj de 24px medía 105px de una
   pantalla de 844 y empujaba el primer campo del formulario a y=706. Aquí pasa a
   una sola fila: etiqueta a la izquierda, reloj a la derecha, barra abajo. No se
   quita información — el plazo es real: al vencer, empty_cart() en admisión
   general — solo deja de ser lo más grande de la pantalla de pago.
   OJO: este bloque va DESPUÉS de las reglas base de .tm-checkout-hold a propósito.
   Colocado antes, la cascada (misma especificidad, gana la última) revertía
   padding/font-size y el cronómetro terminaba MÁS alto, no más bajo. */
@media (max-width:640px){
    .tm-checkout-hold{
        display:flex;flex-wrap:wrap;align-items:center;
        gap:0 10px;
        padding:10px 14px 12px;
        margin-bottom:12px;
    }
    .tm-checkout-hold-head{margin-bottom:0;flex:1 1 auto;min-width:0;gap:6px}
    /* 12px para que etiqueta + reloj quepan en una sola fila a 390px
       (el ancho interior de la tarjeta es ~320px). */
    .tm-checkout-hold-label{font-size:12px;line-height:1.25}
    .tm-checkout-hold-icon{width:18px;height:18px}
    .tm-checkout-hold-icon svg{width:10px;height:10px}
    .tm-checkout-hold-timer{margin-bottom:0;flex:0 0 auto}
    .tm-checkout-hold-clock{font-size:16px}
    /* "Tiempo restante" es redundante junto a "Tienes tiempo limitado para finalizar" */
    .tm-checkout-hold-prefix{display:none}
    .tm-checkout-hold-bar{flex:1 1 100%;margin-top:8px}
}

/* Expired overlay */
.tm-checkout-expired-overlay{
    position:fixed;inset:0;
    background:rgba(55, 53, 53,.75);
    backdrop-filter:blur(6px);
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    animation:tm-fade-in .2s ease;
}
@keyframes tm-fade-in{from{opacity:0}to{opacity:1}}
.tm-checkout-expired-modal{
    background:#fff;
    border-radius:16px;
    padding:32px;
    max-width:440px;
    width:100%;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.3);
}
.tm-checkout-expired-icon{
    width:60px;height:60px;
    margin:0 auto 18px;
    border-radius:50%;
    background:linear-gradient(135deg,#fecaca,#dc2626);
    display:flex;align-items:center;justify-content:center;
    font-size:28px;color:#fff;
}
.tm-checkout-expired-title{
    font-size:20px;font-weight:700;color:#373535;margin:0 0 8px;
}
.tm-checkout-expired-text{
    font-size:14px;color:#6B7280;margin:0 0 18px;line-height:1.5;
}
.tm-checkout-expired-countdown{
    font-size:13px;color:#9CA3AF;margin:0 0 18px;
    font-variant-numeric:tabular-nums;
}
.tm-checkout-expired-countdown strong{color:#7B3FF2;font-weight:600}
.tm-checkout-items{list-style:none;margin:0 0 18px;padding:0 0 16px;border-bottom:1px solid #E7E9EF;display:flex;flex-direction:column;gap:12px}
.tm-checkout-item{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:flex-start}
/* A 390px la columna del precio (auto, ~110px) dejaba el nombre en 153px y ni
   con 3 líneas cabía la fecha completa ("… Viernes 21 Agost…"). Bajando el
   precio a su propia fila el nombre pasa a ~250px y entra entero. */
@media (max-width:560px){
    .tm-checkout-item{grid-template-columns:56px 1fr;gap:10px 12px}
    .tm-checkout-item-price{grid-column:2;justify-self:start}
}
.tm-checkout-item-img{
    width:56px;height:56px;border-radius:8px;
    object-fit:cover;background:#F6F7FA;
}
.tm-checkout-item-img--placeholder{background:linear-gradient(135deg,#e8e0f7,#f7f2ff)}
.tm-checkout-item-body{min-width:0}
/* 3 líneas: a 390px esta columna mide ~153px y con 2 líneas la fecha de la
   función quedaba cortada ("... | 7:…"), justo el dato que hay que poder
   confirmar antes de pagar cuando una obra tiene varias funciones. */
.tm-checkout-item-name{
    font-size:13px;line-height:1.35;font-weight:600;color:#373535;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.tm-checkout-item-variation,
.tm-checkout-item-seat{
    font-size:12px;line-height:1.3;color:#7B3FF2;margin-top:3px;
    font-weight:600;
}
.tm-checkout-item-variation p{margin:0;display:inline}
.tm-checkout-item-label{
    /* #9CA3AF daba 2.54:1 a 12px sobre blanco. Este gris cumple AA sin perder
       la jerarquía frente al valor en morado que va al lado. */
    color:#5F6775;
    font-weight:500;
    margin-right:2px;
}
.tm-checkout-item-price{font-size:13px;font-weight:600;color:#373535;white-space:nowrap}

.tm-checkout-totals{margin:0;display:flex;flex-direction:column;gap:8px}
.tm-checkout-totals-row{display:flex;justify-content:space-between;align-items:baseline}
.tm-checkout-totals-row dt{margin:0;color:#6B7280;font-size:13px}
.tm-checkout-totals-row dd{margin:0;color:#373535;font-size:13px}
.tm-checkout-totals-row--discount dt,
.tm-checkout-totals-row--discount dd{color:#16a34a;font-weight:600}
.tm-checkout-totals-row--discount dt{display:flex;align-items:center;gap:6px}
.tm-checkout-discount-icon{font-size:14px;line-height:1}

/* Banner verde "¡Promo aplicada!" sobre los totales */
.tm-checkout-promo-banner{
    display:flex;align-items:center;gap:10px;
    margin:0 0 14px;padding:11px 14px;
    background:linear-gradient(135deg,#ecfdf5 0%,#d1fae5 100%);
    border:1px solid #6ee7b7;border-radius:10px;
    color:#065f46;font-size:13px;line-height:1.4;
    animation:tm-checkout-promo-in .32s ease-out;
}
.tm-checkout-promo-banner strong{font-weight:700;color:#064e3b}
.tm-checkout-promo-icon{font-size:16px;flex-shrink:0}
.tm-checkout-promo-text{flex:1}
@keyframes tm-checkout-promo-in{
    from{opacity:0;transform:translateY(-4px)}
    to{opacity:1;transform:translateY(0)}
}
.tm-checkout-totals-row--total{
    padding-top:10px;margin-top:4px;
    border-top:1px dashed #E7E9EF;
}
.tm-checkout-totals-row--total dt,
.tm-checkout-totals-row--total dd{
    font-size:16px;font-weight:700;color:#7B3FF2;
}
/* Manual p14: numeros grandes (precios, totales) en Poppins */
.tm-checkout-totals-row--total dd,
.tm-checkout-item-price{
    font-family:'Poppins',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.tm-checkout-cart-link{margin-top:14px;font-size:13px;text-align:center}

/* Empty state */
.tm-checkout-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;
    max-width:480px;margin:auto;text-align:center;
    background:#fff;border-radius:14px;padding:40px;
    border:1px solid #E7E9EF;
}
.tm-checkout-empty h1{font-size:22px;margin:0 0 8px}
.tm-checkout-empty p{color:#6B7280;margin:0 0 24px}
.tm-checkout-empty-icon{
    width:60px;height:60px;
    margin:0 auto 20px;
    border-radius:50%;
    background:linear-gradient(135deg,#fecaca,#dc2626);
    color:#fff;
    display:flex;align-items:center;justify-content:center;
}
.tm-checkout-empty--expired{
    border-color:rgba(220,38,38,.2);
    box-shadow:0 4px 16px rgba(220,38,38,.08), 0 1px 2px rgba(0,0,0,.04);
    position:relative;overflow:hidden;
}
.tm-checkout-empty--expired::before{
    content:"";
    position:absolute;inset:0 0 auto 0;height:3px;
    background:linear-gradient(90deg,#ef4444,#dc2626);
}
.tm-checkout-empty--expired p strong{
    color:#dc2626;
    font-variant-numeric:tabular-nums;
    font-weight:700;
    margin:0 2px;
}

/* Footer */
.tm-checkout-footer{
    width:100%;
    max-width:1400px;margin:40px auto 24px;
    padding:0 clamp(16px,3vw,32px);
    display:flex;gap:20px;flex-wrap:wrap;
    /* 12px sobre #F6F7FA: #9CA3AF daba 2.37:1 */
    font-size:12px;color:#5F6775;
}
.tm-checkout-footer a{color:#5F6775}
/* El verde de WhatsApp (#25D366) sobre el fondo del pie daba 1.85:1; este verde
   mantiene la asociación de marca y cumple AA a 12px. Vivía como style inline
   en el PHP, que además es lo que bloquea la CSP de la página de pago. */
.tm-checkout-footer a.tm-checkout-footer-wa{color:#0B7A33;font-weight:600}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
    *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* ════════════════════════════════════════════════════════════
   Azul EMBEDDED overlay — iframe inline sin salir del sitio
   ════════════════════════════════════════════════════════════ */
body.tm-no-scroll{overflow:hidden}
.tm-azul-embed{
    position:fixed;inset:0;
    background:rgba(55, 53, 53,.75);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    animation:tm-fade-in .2s ease;
}
.tm-azul-embed-card{
    background:#fff;
    border-radius:16px;
    width:100%;
    max-width:560px;
    max-height:92vh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    box-shadow:0 20px 50px rgba(0,0,0,.3);
    position:relative;
}
.tm-azul-embed-card::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:3px;
    background:linear-gradient(90deg,#8A55FF,#7B3FF2);
    z-index:2;
}
.tm-azul-embed-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 18px;
    border-bottom:1px solid #E7E9EF;
    flex-shrink:0;
}
.tm-azul-embed-head-lead{
    display:flex;
    align-items:center;
    gap:12px;
}
.tm-azul-embed-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:36px;height:36px;
    border-radius:10px;
    background:linear-gradient(135deg,#e8e0f7,#f7f2ff);
    color:#7B3FF2;
    flex-shrink:0;
}
.tm-azul-embed-title{
    font-size:15px;font-weight:700;color:#373535;line-height:1.2;
}
.tm-azul-embed-sub{
    font-size:12px;color:#6B7280;margin-top:2px;line-height:1.2;
}
.tm-azul-embed-close{
    appearance:none;
    border:none;
    background:transparent;
    width:32px;height:32px;
    border-radius:8px;
    font-size:22px;line-height:1;
    color:#6B7280;
    cursor:pointer;
    transition:background .15s,color .15s;
}
.tm-azul-embed-close:hover{background:#F6F7FA;color:#373535}

/* Variant compacto (botón "Continuar con AZUL" en vez de iframe) */
.tm-azul-embed-card--compact{
    max-width:440px;
    max-height:none;
}
.tm-azul-embed-body--compact{
    min-height:0!important;
    background:#fff!important;
    padding:24px 28px 28px;
    text-align:center;
}
.tm-azul-embed-intro{
    font-size:14px;
    color:#475569;
    margin:0 0 22px;
    line-height:1.5;
}
.tm-azul-embed-intro strong{color:#373535}
.tm-azul-embed-pay-btn{
    width:100%!important;
    justify-content:center!important;
    padding:14px 24px!important;
    font-size:15px!important;
    margin-bottom:10px!important;
}
.tm-azul-embed-cancel{
    appearance:none;
    background:transparent;
    border:none;
    padding:8px 12px;
    margin-top:4px;
    font-family:inherit;
    font-size:13px;
    color:#6B7280;
    cursor:pointer;
    border-radius:6px;
    transition:color .15s,background .15s;
}
.tm-azul-embed-cancel:hover{color:#373535;background:#F6F7FA}
.tm-azul-embed-loader-inline{
    display:flex;
    justify-content:center;
    padding:10px 0 18px;
}
.tm-azul-embed-loader-inline .tm-azul-embed-spinner{margin:0}

/* Timer del overlay Azul (force-cancel antes de que WC cancele) */
.tm-azul-embed-timer{
    --tc: #7B3FF2;
    --tc2:#8A55FF;
    --tbg:rgba(123, 63, 242,.08);
    padding:12px 14px;
    border:1px solid rgba(123, 63, 242,.22);
    background:#fbf9ff;
    border-radius:10px;
    margin:14px 0 12px;
    display:grid;
    grid-template-columns:1fr auto;
    align-items:baseline;
    gap:8px 12px;
    transition:background .3s,border-color .3s;
}
.tm-azul-embed-timer-label{
    font-size:12px;
    color:#6B7280;
    font-weight:500;
    grid-column:1;
}
.tm-azul-embed-timer-clock{
    font-family:'SF Mono','Monaco','Menlo',ui-monospace,monospace;
    font-size:20px;
    font-weight:700;
    color:var(--tc);
    letter-spacing:-.02em;
    font-variant-numeric:tabular-nums;
    grid-column:2;
    line-height:1;
    transition:color .3s;
}
.tm-azul-embed-timer-bar{
    grid-column:1 / -1;
    height:3px;
    background:var(--tbg);
    border-radius:999px;
    overflow:hidden;
    margin-top:4px;
}
.tm-azul-embed-timer-bar-fill{
    height:100%;
    background:linear-gradient(90deg,var(--tc2),var(--tc));
    transform-origin:left;
    transition:transform 1s linear;
}
.tm-azul-embed-timer.is-warning{
    --tc:#d97706;
    --tc2:#f59e0b;
    --tbg:rgba(217,119,6,.14);
    background:#fffaf0;
    border-color:rgba(217,119,6,.28);
}
.tm-azul-embed-timer.is-warning .tm-azul-embed-timer-clock{
    animation:tm-pulse-warn 1s ease-in-out infinite alternate;
}
.tm-azul-embed-timer.is-expired{
    --tc:#dc2626;
    --tc2:#ef4444;
    --tbg:rgba(220,38,38,.16);
    background:#fff5f5;
    border-color:rgba(220,38,38,.28);
}

/* Result expired */
.tm-azul-embed-result--expired .tm-azul-embed-result-icon{
    background:linear-gradient(135deg,#fca5a5,#dc2626);
    font-size:28px;
}

.tm-azul-embed-body{
    position:relative;
    flex:1;
    min-height:520px;
    background:#F6F7FA;
}
.tm-azul-embed-loader{
    position:absolute;inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:14px;
    color:#6B7280;
    font-size:14px;
    pointer-events:none;
    z-index:1;
}
.tm-azul-embed-spinner{
    width:40px;height:40px;
    border:3px solid rgba(123, 63, 242,.15);
    border-top-color:#7B3FF2;
    border-radius:50%;
    animation:tm-spin .8s linear infinite;
}
.tm-azul-embed-iframe{
    position:relative;
    width:100%;
    height:100%;
    min-height:520px;
    border:0;
    display:block;
    z-index:0;
}

.tm-azul-embed-result{
    padding:40px 32px;
    text-align:center;
}
.tm-azul-embed-result-icon{
    width:64px;height:64px;
    margin:0 auto 18px;
    border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-size:32px;font-weight:700;color:#fff;
}
.tm-azul-embed-result--completed .tm-azul-embed-result-icon{
    background:linear-gradient(135deg,#10b981,#059669);
}
.tm-azul-embed-result--cancelled .tm-azul-embed-result-icon{
    background:linear-gradient(135deg,#9CA3AF,#6B7280);
}
.tm-azul-embed-result--failed .tm-azul-embed-result-icon{
    background:linear-gradient(135deg,#ef4444,#dc2626);
}
.tm-azul-embed-result-title{font-size:20px;font-weight:700;color:#373535;margin-bottom:6px}
.tm-azul-embed-result-sub{font-size:14px;color:#6B7280}

@media (max-width:640px){
    .tm-azul-embed{padding:0}
    .tm-azul-embed-card{
        max-width:none;max-height:100vh;
        height:100vh;border-radius:0;
    }
}

/* ════════════════════════════════════════════════════════════
   Azul overlay — integrado al look del checkout (plugin original)
   ════════════════════════════════════════════════════════════ */

/* Overlay backdrop con blur (igual que el modal de expiracion). */
#azul-popup-overlay.azul-popup-overlay{
    position:fixed;inset:0;
    background:rgba(55, 53, 53,.75);
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    animation:tm-fade-in .2s ease;
}

/* Card principal, mismos tokens del checkout. */
#azul-popup-overlay .azul-popup-overlay-card{
    background:#fff;
    border-radius:16px;
    padding:36px 32px 32px;
    max-width:440px;
    width:100%;
    text-align:center;
    box-shadow:0 20px 50px rgba(0,0,0,.3);
    position:relative;
    overflow:hidden;
}
/* Banda gradient morado arriba — misma del hold-countdown. */
#azul-popup-overlay .azul-popup-overlay-card::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:4px;
    background:linear-gradient(90deg,#8A55FF,#7B3FF2);
}

/* Iconos grandes arriba (el lock 🔒 o spinner). Rediseno el lock como
   circulo con icon. */
#azul-popup-overlay .azul-popup-overlay-card > div[style*="font-size:48px"]{
    font-size:0!important;
    width:64px!important;
    height:64px!important;
    margin:4px auto 20px!important;
    border-radius:50%!important;
    background:linear-gradient(135deg,#e8e0f7,#f7f2ff)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    position:relative;
}
#azul-popup-overlay .azul-popup-overlay-card > div[style*="font-size:48px"]::after{
    content:"🔒";
    font-size:28px!important;
    line-height:1;
}

/* Spinner moradito que reemplaza el azul default. */
#azul-popup-overlay .azul-popup-spinner{
    width:48px;height:48px;
    border:3px solid rgba(123, 63, 242,.15);
    border-top-color:#7B3FF2;
    margin:4px auto 20px;
}

/* Textos */
#azul-popup-overlay .azul-popup-message{
    font-size:20px;
    font-weight:700;
    color:#373535;
    margin:0 0 8px;
    letter-spacing:-.01em;
}
#azul-popup-overlay .azul-popup-submessage{
    font-size:14px;
    color:#6B7280;
    margin:0 0 24px;
    line-height:1.5;
}

/* Boton principal "PAGAR CON AZUL": igual que los CTAs del checkout. */
#azul-popup-overlay #azul-pay-now-btn{
    appearance:none!important;
    display:block!important;
    width:100%!important;
    padding:14px 24px!important;
    font-family:inherit!important;
    font-size:15px!important;
    font-weight:600!important;
    color:#fff!important;
    background:linear-gradient(135deg,#8A55FF,#7B3FF2)!important;
    border:none!important;
    border-radius:10px!important;
    cursor:pointer!important;
    transition:box-shadow .15s,transform .1s!important;
    margin-bottom:14px!important;
    box-shadow:0 2px 8px rgba(123, 63, 242,.3)!important;
    letter-spacing:.02em;
    text-transform:none!important;
}
#azul-popup-overlay #azul-pay-now-btn:hover{
    box-shadow:0 4px 14px rgba(123, 63, 242,.4)!important;
    background:linear-gradient(135deg,#8A55FF,#7B3FF2)!important;
    transform:translateY(-1px);
}
#azul-popup-overlay #azul-pay-now-btn:active{
    transform:translateY(0);
}

/* Boton cancelar: link-like gris, no outline azul. */
#azul-popup-overlay .azul-popup-close-btn{
    background:transparent!important;
    border:none!important;
    color:#6B7280!important;
    cursor:pointer;
    font-family:inherit;
    font-size:13px;
    font-weight:500;
    padding:8px 12px!important;
    border-radius:6px;
    transition:color .15s,background .15s;
    line-height:1!important;
    display:inline-block!important;
}
#azul-popup-overlay .azul-popup-close-btn:hover{
    color:#373535!important;
    background:#F6F7FA!important;
}
#azul-popup-overlay .azul-popup-close-btn:focus-visible{
    outline:2px solid #7B3FF2;outline-offset:2px;
}

/* M2: center empty state vertically in viewport */
.tm-checkout-main:has(.tm-checkout-empty) {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Prevenir auto-zoom de iOS Safari al focus en inputs.
   /pago/ no carga standalone-mobile-override.css, fix incluido aquí. */
@media (max-width: 767px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Cupones — toggle expandible dentro del card del Resumen del pedido */
.tm-checkout-coupon {
    margin: 0 0 16px;
    padding: 0 0 16px;
    border-bottom: 1px dashed #E7E9EF;
}
.tm-coupon-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 4px 0;
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s;
}
.tm-coupon-toggle:hover { color: #7B3FF2; }
.tm-coupon-toggle-label { flex: 1; min-width: 0; }
.tm-coupon-toggle-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.tm-coupon-toggle[aria-expanded="true"] .tm-coupon-toggle-chevron { transform: rotate(180deg); }
.tm-coupon-toggle[aria-expanded="true"] { color: #373535; }

.tm-coupon-panel { margin-top: 12px; }
.tm-coupon-panel[hidden] { display: none; }

.tm-coupon-row { display: flex; gap: 8px; }
/* Misma trampa que la del comentario de arriba (.tm-checkout-btn): el JS las
   alterna con .hidden y el display:flex de autor le gana al [hidden] nativo,
   asi que al aplicar un cupon seguian viendose la caja de texto Y el chip. */
.tm-coupon-row[hidden] { display: none; }
.tm-coupon-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #E7E9EF;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tm-coupon-input:focus {
    outline: none;
    border-color: #7B3FF2;
    box-shadow: 0 0 0 3px rgba(123, 63, 242,0.15);
}
.tm-coupon-btn {
    flex-shrink: 0;
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #8A55FF, #7B3FF2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}
.tm-coupon-btn:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(123, 63, 242,0.35); }
.tm-coupon-btn:active:not(:disabled) { transform: scale(0.97); }
.tm-coupon-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.tm-coupon-applied { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-coupon-applied[hidden] { display: none; }
.tm-coupon-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 6px 10px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #065F46;
    letter-spacing: 0.5px;
}
.tm-coupon-chip-code { text-transform: uppercase; }
.tm-coupon-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(6,95,70,0.15);
    color: #065F46;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}
.tm-coupon-remove:hover { background: rgba(6,95,70,0.3); }

.tm-coupon-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
}
.tm-coupon-msg--success { background: #ECFDF5; color: #065F46; }
.tm-coupon-msg--error   { background: #FEF2F2; color: #991B1B; }
.tm-coupon-msg--info    { background: #EFF6FF; color: #1E40AF; }

@media (max-width: 480px) {
    .tm-coupon-btn { padding: 11px 14px; }
}

/* Avisos (errores / mensajes / info) con el estilo de TICKETMAX. Los emiten
   TicketMax y MePay con las clases ticketmax-error/-message/-info. */
.ticketmax-error,
.ticketmax-message,
.ticketmax-info,
ul.ticketmax-error {
    list-style: none !important;
    padding: 14px 16px !important;
    margin: 0 0 12px !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 14px;
    line-height: 1.5;
}
.ticketmax-error,
ul.ticketmax-error {
    background: #FEF2F2 !important;
    color: #991B1B !important;
}
.ticketmax-message {
    background: #ECFDF5 !important;
    color: #065F46 !important;
}
.ticketmax-info {
    background: #EFF6FF !important;
    color: #1E40AF !important;
}
.ticketmax-error li,
.ticketmax-message li,
.ticketmax-info li {
    padding: 4px 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
.ticketmax-error li::before,
.ticketmax-message li::before,
.ticketmax-info li::before { content: none !important; }
.ticketmax-error a,
.ticketmax-message a,
.ticketmax-info a { color: inherit; text-decoration: underline; font-weight: 600; }
.ticketmax-error .button,
.ticketmax-message .button { display: none !important; }

/* Términos ANTES de elegir método (10-nov-2026): la casilla va arriba de la lista y la lista queda atenuada hasta marcarla. */
.tm-checkout-form[data-terms-first="true"] .tm-checkout-terms{margin:0 0 14px}
.tm-checkout-form[data-terms-first="true"][data-terms-accepted="false"] .tm-checkout-gateways{opacity:.55}

/* Terminos como AVISO, sin casilla (10-nov-2026, orden de Carlos): al continuar con la compra se aceptan; el input queda marcado para la validacion del servidor. */
.tm-checkout-form[data-terms-first="true"] .tm-checkout-terms input[name="terms"]{display:none}
.tm-checkout-form[data-terms-first="true"] .tm-checkout-terms label{cursor:default;gap:0}
