/* Selector de moneda (soles / USDT) del navbar y avisos de tipo de cambio.
 *
 * CSS plano y no utilidades Tailwind: el estado activo lo pone el JS y
 * Tailwind solo compila las clases que ve escritas en los templates.
 */

.moneda-toggle {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #f1f5f9;
}
.moneda-toggle[aria-busy="true"] {
    opacity: 0.6;
}

.moneda-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.moneda-bandera {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}
/* Globo: mismo tamaño que la bandera. */
.moneda-globo {
    width: 18px;
    height: 18px;
}
/* Bandera apagada cuando no es la moneda activa: el globo y ella se leen como par. */
.moneda-toggle button[aria-pressed="false"] .moneda-bandera,
.moneda-toggle button[aria-pressed="false"] .moneda-globo {
    opacity: 0.7;
}
.moneda-toggle button:hover {
    color: #1e293b;
}
.moneda-toggle button[aria-pressed="true"] {
    background-color: #fff;
    color: #2563eb;
    box-shadow: 0 0 0 1.5px #2563eb;
}
.moneda-toggle button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.dark .moneda-toggle {
    border-color: #334155;
    background-color: #1e293b;
}
.dark .moneda-toggle button {
    color: #94a3b8;
}
.dark .moneda-toggle button:hover {
    color: #e2e8f0;
}
.dark .moneda-toggle button[aria-pressed="true"] {
    background-color: #0f172a;
    color: #60a5fa;
    box-shadow: 0 0 0 1.5px #3b82f6;
}

/* Tipo de cambio visible en carrito, pago y ficha (solo en modo USDT). */
.moneda-nota {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.35;
    color: #64748b;
}
.dark .moneda-nota {
    color: #94a3b8;
}

/* Bloques que solo aplican a una moneda (data-moneda-solo) o al modo USDT. */
.moneda-oculto {
    display: none !important;
}

/* Checkout: instrucciones de pago en USDT (reemplaza al bloque de Yape/Plin). */
.pago-usdt {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}
.dark .pago-usdt {
    border-color: #334155;
}
.pago-usdt-cabecera {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.pago-usdt-radio {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid #2563eb;
    border-radius: 9999px;
    box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 10px #2563eb;
}
.dark .pago-usdt-radio {
    box-shadow: inset 0 0 0 4px #1e293b, inset 0 0 0 10px #3b82f6;
    border-color: #3b82f6;
}
.pago-usdt-titulo {
    font-weight: 600;
    color: #0f172a;
}
.dark .pago-usdt-titulo {
    color: #fff;
}
.pago-usdt-red {
    padding: 2px 8px;
    border-radius: 9999px;
    background-color: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}
.dark 


/* La barra de compra móvil no alcanza para "14.56 USDT" + tachado + botón en
   pantallas angostas: en USDT se deja el total y el ahorro (badge de arriba). */
@media (max-width: 420px) {
    html[data-moneda="USDT"] #mobile-bar-old-price {
        display: none;
    }
}

/* Móvil angosto: el logo va centrado en landing/catálogo y el selector no
   puede pisarlo. */
@media (max-width: 400px) {
    .moneda-toggle button {
        min-width: 32px;
        padding: 0 6px;
    }
}

/* Checkout/carrito en móvil: el selector necesita el lugar del rótulo
   "Compra segura"; queda el candado. */
@media (max-width: 479px) {
    .compra-segura-texto {
        display: none;
    }
}

/* "+ Act. 7.28 USDT" es más largo que en soles: sin esto parte la micro-tira
   de carrito y checkout en dos líneas. */
#mobile-co-activacion-line,
#mobile-summary-activacion-line {
    white-space: nowrap;
}

/* Checkout: elección del método de pago (Yape/Plin o USDT). */
.pago-metodos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.pago-metodo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background-color: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.pago-metodo:hover {
    border-color: #cbd5e1;
}
.pago-metodo[aria-pressed="true"] {
    border-color: #2563eb;
    background-color: #eff6ff;
}
.pago-metodo:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.pago-metodo-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}
.pago-metodo-texto strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}
.pago-metodo-texto small {
    font-size: 11px;
    line-height: 1.2;
    color: #64748b;
}
.dark .pago-metodo {
    border-color: #334155;
    background-color: #1e293b;
}
.dark .pago-metodo:hover {
    border-color: #475569;
}
.dark .pago-metodo[aria-pressed="true"] {
    border-color: #3b82f6;
    background-color: rgba(37, 99, 235, 0.16);
}
.dark .pago-metodo-texto strong {
    color: #f1f5f9;
}
.dark .pago-metodo-texto small {
    color: #94a3b8;
}
@media (max-width: 420px) {
    .pago-metodos {
        grid-template-columns: 1fr;
    }
}


.pago-usdt-qr img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
}
.pago-usdt-direccion {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.pago-usdt-direccion code {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 11px;
    text-align: left;
    word-break: break-all;
    user-select: all;
}
.pago-usdt-direccion button {
    flex-shrink: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.pago-usdt-direccion button:hover {
    background: #1d4ed8;
}
.dark 
.dark .pago-usdt-direccion code {
    background: #0f172a;
    color: #e2e8f0;
}

/* Marcador de wallet/QR sin configurar (pagoUsdt.json vacío). */
.pago-usdt-qr.pago-usdt-vacio {
    border-style: dashed;
}
.pago-usdt-marcador {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}
.pago-usdt-direccion code.pago-usdt-vacio {
    color: #94a3b8;
    font-style: italic;
}
.pago-usdt-direccion button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Aviso de red (BEP20): sobrio, en rojo, justo antes del QR; el "?" despliega el porqué. */
.pago-usdt-alerta {
    margin-top: 16px;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 10px;
    background-color: #fef2f2;
    color: #7f1d1d;
}
.pago-usdt-alerta summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}
.pago-usdt-alerta summary::-webkit-details-marker {
    display: none;
}
.pago-usdt-alerta summary:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    border-radius: 8px;
}
.pago-usdt-alerta-ico {
    flex-shrink: 0;
    color: #dc2626;
}
.pago-usdt-alerta-texto {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: #b91c1c;
}
.pago-usdt-alerta-q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 1.5px solid #dc2626;
    border-radius: 9999px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.pago-usdt-alerta summary:hover .pago-usdt-alerta-q,
.pago-usdt-alerta[open] .pago-usdt-alerta-q {
    background: #dc2626;
    color: #fff;
}
.pago-usdt-alerta-detalle {
    padding: 0 12px 12px 36px;
    font-size: 12px;
    line-height: 1.55;
    color: #7f1d1d;
    text-align: left;
}
.pago-usdt-alerta-detalle p {
    margin: 0;
}
.pago-usdt-alerta-detalle p + p {
    margin-top: 8px;
}
.dark .pago-usdt-alerta {
    border-color: rgba(248, 113, 113, 0.3);
    border-left-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}
.dark .pago-usdt-alerta-ico,
.dark .pago-usdt-alerta-texto {
    color: #fca5a5;
}
.dark .pago-usdt-alerta-q {
    border-color: #f87171;
    color: #fca5a5;
}
.dark .pago-usdt-alerta summary:hover .pago-usdt-alerta-q,
.dark .pago-usdt-alerta[open] .pago-usdt-alerta-q {
    background: #ef4444;
    color: #fff;
}
.dark .pago-usdt-alerta-detalle {
    color: #fecaca;
}







.dark 
.dark 
@media (max-width: 479px) {
    
}

/* ─── Panel de pago en USDT (rediseño) ───────────────────────────────── */
.pago-metodo-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}
.pago-metodo-ico {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
}
.pago-metodo-ico:not(.moneda-globo) {
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}
.pago-usdt-lead {
    margin: 14px 0 0;
    font-size: 13px;
    color: #475569;
}
.dark .pago-usdt-lead {
    color: #94a3b8;
}

/* Wallet: QR a la izquierda y dirección a la derecha (en móvil, apilados). */
.pago-usdt-wallet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}
.dark .pago-usdt-wallet {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(37, 99, 235, 0.1);
}
.pago-usdt-qr {
    flex: 0 0 auto;
    margin: 0 auto;
    padding: 10px;
    border: 2px solid #bfdbfe;
    border-radius: 16px;
    background: #fff;
}
.pago-usdt-datos {
    flex: 1 1 220px;
    min-width: 0;
}
.pago-usdt-etiqueta {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
}
.dark .pago-usdt-etiqueta {
    color: #93c5fd;
}
.pago-usdt-pista {
    margin: 8px 0 0;
    font-size: 11px;
    color: #64748b;
}
.dark .pago-usdt-pista {
    color: #94a3b8;
}

/* Resumen de tres pasos: lo mínimo para pagar sin abrir la guía. */
.pago-usdt-resumen {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.pago-usdt-resumen p {
    margin: 0;
}
.pago-usdt-resumen li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #334155;
}
.dark .pago-usdt-resumen li {
    color: #cbd5e1;
}
.pago-usdt-resumen li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

/* Guía con capturas: desplegable + paso a paso. */
.pago-guia {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.dark .pago-guia {
    border-color: #334155;
    background: #0f172a;
}
.pago-guia summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    cursor: pointer;
    list-style: none;
}
.pago-guia summary::-webkit-details-marker {
    display: none;
}
.dark .pago-guia summary {
    color: #93c5fd;
}
.pago-guia summary > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}
.pago-guia-sum-flecha {
    transition: transform 0.2s ease;
}
.pago-guia[open] .pago-guia-sum-flecha {
    transform: rotate(180deg);
}
.pago-guia-cuerpo {
    padding: 0 14px 14px;
}
.pago-guia-barra {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.pago-guia-barra[hidden] {
    display: none;
}
.pago-guia-contador {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.dark .pago-guia-contador {
    color: #94a3b8;
}
.pago-guia-segmentos {
    display: flex;
    flex: 1 1 auto;
    gap: 4px;
}
.pago-guia-segmentos i {
    flex: 1 1 0;
    height: 4px;
    border-radius: 9999px;
    background: #e2e8f0;
}
.dark .pago-guia-segmentos i {
    background: #334155;
}
.pago-guia-segmentos i.is-on {
    background: #2563eb;
}

.pago-paso {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 18px;
    align-items: center;
}
.pago-paso + .pago-paso {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px dashed #cbd5e1;
}
.pago-guia-pasos.is-stepper .pago-paso + .pago-paso {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.pago-paso[hidden] {
    display: none;
}
.pago-paso--texto {
    grid-template-columns: 1fr;
    padding: 6px 2px;
}
.pago-paso-img {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
    cursor: zoom-in;
}
.pago-paso-img img {
    display: block;
    width: 100%;
    height: auto;
}
.pago-paso-lupa {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.pago-paso-texto h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.dark .pago-paso-texto h4 {
    color: #f1f5f9;
}
.pago-paso-texto h4 span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
}
.pago-paso-texto p,
.pago-paso-texto li {
    font-size: 13px;
    line-height: 1.55;
    color: #334155;
}
.dark .pago-paso-texto p,
.dark .pago-paso-texto li {
    color: #cbd5e1;
}
.pago-paso-texto p {
    margin: 0;
}
.pago-paso-texto ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}
.pago-paso-texto li + li {
    margin-top: 6px;
}
.dark .dark 
/* Visor de captura ampliada. */
.pago-visor {
    max-width: min(92vw, 520px);
    max-height: calc(92vh / var(--zoom, 1));
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    overflow: auto;
}
.pago-visor::backdrop {
    background: rgba(2, 6, 23, 0.8);
}
.pago-visor img {
    display: block;
    width: 100%;
    height: auto;
}
.pago-visor-cerrar {
    position: sticky;
    top: 8px;
    float: right;
    z-index: 1;
    width: 36px;
    height: 36px;
    margin: 8px 8px -44px 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 560px) {
    .pago-paso {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pago-paso-img {
        width: min(100%, 260px);
        margin: 0 auto;
    }
    .pago-guia summary {
        font-size: 12px;
    }
}
.dark .pago-usdt-qr {
    border-color: rgba(59, 130, 246, 0.4);
}

/* Flechas compactas del paso a paso (van en la barra de progreso). */
.pago-guia-flechas {
    display: inline-flex;
    flex-shrink: 0;
    gap: 6px;
}
.pago-guia-flechas button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pago-guia-flechas button:hover:not(:disabled) {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}
.pago-guia-flechas button:disabled {
    opacity: 0.35;
    cursor: default;
}
.pago-guia-flechas button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.dark .pago-guia-flechas button {
    border-color: #475569;
    color: #cbd5e1;
}
.dark .pago-guia-flechas button:hover:not(:disabled) {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
}

/* Botones al pie del paso a paso: solo en móvil (≥48 px de alto, ancho completo). */
.pago-guia-nav-movil {
    display: none;
}
.pago-guia-barra {
    scroll-margin-top: 72px;
}
@media (max-width: 560px) {
    .pago-guia-flechas {
        display: none;
    }
    .pago-guia-nav-movil:not([hidden]) {
        display: flex;
        gap: 10px;
        margin-top: 16px;
    }
    .pago-guia-nav-movil button {
        flex: 1 1 0;
        min-height: 48px;
        border: 1.5px solid #2563eb;
        border-radius: 12px;
        background: transparent;
        color: #2563eb;
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
    }
    .pago-guia-nav-movil button[data-guia-next] {
        background: #2563eb;
        color: #fff;
    }
    .pago-guia-nav-movil button:disabled {
        opacity: 0.35;
        cursor: default;
    }
    .dark .pago-guia-nav-movil button {
        border-color: #3b82f6;
        color: #93c5fd;
    }
    .dark .pago-guia-nav-movil button[data-guia-next] {
        background: #3b82f6;
        color: #fff;
    }
}
