
/* ── Swal 1: Selección de pasarela ──────────────────────────── */

.pg-popup {
    text-align: center;
    padding: 4px 0 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.pg-swal-close,
.mp-swal-close,
.yape-swal-close {
    position: absolute !important;
    top: 8px !important;
    right: 14px !important;
    margin: 0 !important;
    color: #555 !important;
    font-size: 1.4rem !important;
    border-radius: 50% !important;
    width: 25px !important;
    height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    z-index: 10 !important;
    background: rgba(0,0,0,.08) !important;
    outline: none !important;
    box-shadow: none !important;
}

.pg-icon-wrap {
    width: 68px;
    height: 68px;
    background: #eef4ff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.pg-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.pg-subtitle {
    font-size: 13px;
    color: #9a9a9a;
    margin: 0 0 22px;
    line-height: 1.55;
}

.swal-pasarela {
    width: 580px !important;
}

.pg-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.pg-card {
    flex: 1;
    min-width: 130px;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    padding: 14px 8px 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.pg-card .pg-radio-row {
    margin-bottom: 10px;
}


.pg-card:hover {
    border-color: #b0c8f0;
    box-shadow: 0 4px 14px rgba(74,144,217,.15);
}

.pg-card.selected-mp {
    border-color: #009ee3;
    box-shadow: 0 4px 16px rgba(0,158,227,.2);
    background: aliceblue;
}

.pg-card.selected-fw {
    border-color: #009ee3;
    box-shadow: 0 4px 16px rgba(0,158,227,.2);
    background: aliceblue;
}

.pg-card.selected-yape {
    border-color: #009ee3;
    box-shadow: 0 4px 16px rgba(0,158,227,.2);
    background: aliceblue;
}

.pg-logo-wrap {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.pg-logo-wrap img {
    max-height: 55px;
    max-width: 120px;
    object-fit: contain;
}

.pg-radio-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.pg-radio {
    width: 17px;
    height: 17px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    background: #fff;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pg-radio-inner {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: transparent;
    transition: background .2s;
}

.selected-mp .pg-radio,
.selected-fw .pg-radio {
    border-color: #009ee3;
}
.selected-yape .pg-radio {
    border-color: #009ee3;
}

.selected-mp .pg-radio-inner,
.selected-fw .pg-radio-inner {
    background: #009ee3;
}
.selected-yape .pg-radio-inner {
    background: #009ee3;
}


.pg-features {
    margin-top: 7px;
    text-align: left;
    padding: 0 4px;
}

.pg-feat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #666;
    margin-bottom: 3px;
}

.pg-feat-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pg-continuar {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #d5d5d5;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all .25s;
}

.pg-continuar.active {
    background: #2563c7;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37,99,199,.25);
}

.pg-continuar.active:hover {
    background: #1d51a8;
    box-shadow: 0 6px 18px rgba(37,99,199,.35);
    /*transform: translateY(-1px);*/
}

.pg-secure {
    margin-top: 13px;
    font-size: 11.5px;
    color: #b0b0b0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


/* ── Swal 2: Modal de pago MP ────────────────────────────────── */

.mp-swal-container2 {
    padding: 24px 0 !important;
    align-items: center !important;
}

.mp-swal-popup2 {
    width: 520px !important;
    padding: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 64px rgba(0,0,0,.2) !important;
    margin: auto !important;
}


.mp-wrap {
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-align: left;
    background: #fff;
    border-radius: 18px;
}


.mp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px 16px;
}

.mp-header-logo img {
    height: 40px;
    object-fit: contain;
    display: block;
}

.mp-header-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
    text-align: right;
}


.mp-dots {
    border-top: 2px dashed #e2e5ed;
    margin: 0 24px;
}


.mp-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 4px;
}

.mp-progress-track {
    flex: 1;
    height: 5px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}

.mp-progress-bar {
    height: 100%;
    background: #009ee3;
    border-radius: 99px;
    transition: width .4s ease;
}

.mp-progress-lbl {
    font-size: .78rem;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}


.mp-body {
    padding: 18px 24px 24px;
    overflow-y: auto;
    max-height: 72vh;
    transition: opacity .3s ease, transform .3s ease;
}

.mp-body-saliendo {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.mp-body-entrando {
    opacity: 0;
    transform: translateY(10px);
}

.mp-body-entrando-activo {
    opacity: 1;
    transform: translateY(0);
}


.mp-detalle-bloque {
    background: #f5f6fa;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.mp-detalle-estudiante {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.mp-detalle-est-lbl {
    font-size: 1.1rem;
    font-weight: 600;
    color: #009ee3;
    text-transform: uppercase;
    /*letter-spacing: .04em;*/
    margin-bottom: 2px;
}

.mp-detalle-est-nombre {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.mp-detalle-est-doc {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 2px;
}

.mp-detalle-conceptos {
    border-top: 1px solid #e2e5ed;
    padding-top: 10px;
    margin-bottom: 10px;
}

.mp-cuota-item {
    display: flex;
    flex-direction: column;
    padding: 5px 0;
    border-bottom: 1px solid #eaecf0;
}

.mp-cuota-item:last-child {
    border-bottom: none;
}

.mp-cuota-num {
    font-size: .78rem;
    color: #9ca3af;
    font-weight: 600;
}

.mp-cuota-desc {
    font-size: .92rem;
    color: #374151;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2px;
}

.mp-detalle-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e5ed;
    padding-top: 10px;
}

.mp-detalle-total-lbl {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.mp-detalle-total-monto {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
}


.mp-seccion-sep {
    height: 1px;
    background: #e2e5ed;
    margin: 4px 0 16px;
}

.mp-seccion-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #009ee3;
    text-transform: uppercase;
    /*letter-spacing: .05em;*/
    margin-bottom: 12px;
}

.mp-secure-footer {
    text-align: center;
    font-size: 1rem;
    color: #b0b8c8;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


.mp-grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.mp-field {
    margin-bottom: 14px;
}

.mp-lbl {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}

.mp-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e5ed;
    border-radius: 10px;
    font-size: 1.1rem;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border .15s;
}

.mp-input:focus {
    border-color: #009ee3;
}


.mp-btn-primary {
    width: 100%;
    padding: 14px;
    background: #2563c7;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    margin-top: 6px;
    box-shadow: 0 4px 14px rgba(37,99,199,.25);
}

.mp-btn-primary:hover {
    background: #1d51a8;
    box-shadow: 0 6px 18px rgba(37,99,199,.35);
    /*transform: translateY(-1px);*/
}
.mp-btn-primary:active { transform: scale(.985); }
.mp-btn-primary:disabled {
    background: #a8d8f0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.mp-btn-yape {
    background: #742384;
    box-shadow: 0 4px 14px rgba(116,35,132,.25);
    font-size: 1.3rem;
}
.mp-btn-yape:hover {
    background: #5e1a6b;
    box-shadow: 0 6px 18px rgba(116,35,132,.35);
}

.mp-btn-ghost {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #009ee3;
    border: 1.5px solid #009ee3;
    border-radius: 10px;
    font-size: .93rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    margin-top: 10px;
}

.mp-btn-ghost:hover {
    background: #f0faff;
    border-color: #007ab8;
    color: #007ab8;
}

.mp-btn-dev {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #d97706;
    border: 1.5px dashed #fcd34d;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all .15s;
}

.mp-btn-dev:hover { background: #fffbeb; }

.mp-metodo {
    border: 1.5px solid #e2e5ed;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color .4s ease, box-shadow .4s ease;
}

.mp-metodo.mp-metodo-on {
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
}

.mp-metodo-header {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    cursor: pointer;
    user-select: none;
}

.mp-metodo-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .35s ease, background .35s ease;
}

.mp-metodo-on .mp-metodo-radio {
    border-color: #009ee3;
    background: #009ee3;
}

.mp-metodo-radio-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: opacity .35s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}

.mp-metodo-on .mp-metodo-radio-dot {
    opacity: 1;
    transform: scale(1);
}

.mp-metodo-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

.mp-metodo-logos {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mp-metodo-logos img {
    height: 25px;
    object-fit: contain;
    border-radius: 5px;
    border: 0.1px;
    border-style: solid;
    border-color: #e6e6e6;
}

.mp-metodo-body {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 18px;
    transition: max-height .5s cubic-bezier(.4,0,.2,1), opacity .4s ease, padding .5s cubic-bezier(.4,0,.2,1);
}

.mp-metodo-on .mp-metodo-body {
    max-height: 700px;
    opacity: 1;
    padding: 0 18px 18px;
}

.mp-yape-hint {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 11px 14px;
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ── Yape Modal ─────────────────────────────────────────── */
.yape-popup {
    max-width: 400px !important;
}
.pg-swal-popup {
    width: 580px !important;
    max-width: 580px !important;
}
.yape-popup {
    border-radius: 18px !important;
    padding: 0 !important;
    overflow: hidden;
}
.yape-wrap {
    font-family: 'Segoe UI', system-ui, sans-serif;
}
.yape-header {
    border-bottom: 2px dashed #e2e5ed;
    padding: 18px 24px 14px;
    display: flex;
    justify-content: center;
}
.yape-logo {
    height: 70px;
}
.yape-body {
    padding: 20px 24px 24px;
    text-align: left;
}
.yape-field-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #742384;
    margin-bottom: 6px;
}
.yape-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #111827;
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s;
}
.yape-input:focus {
    border-color: #742384;
}
.yape-input-err {
    display: none;
    font-size: 1.2rem;
    color: #dc2626;
    margin-top: 4px;
}
.yape-otp-grid {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}
.yape-otp-box {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    outline: none;
    transition: border-color .2s;
}
.yape-otp-box:focus {
    border-color: #742384;
}
.yape-hint {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 11px 14px;
    margin-top: 14px;
    font-size: 1.2rem;
    color: #6b7280;
    line-height: 1.6;
}
.yape-btn-pagar {
    width: 100%;
    margin-top: 20px;
    padding: 13px;
    background: #742384;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.yape-btn-pagar:hover {
    background: #5e1a6b;
}
.yape-btn-pagar:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.mp-btn-pe {
    background: #fac912;
    color: #111;
    box-shadow: 0 4px 14px rgba(250,201,18,.35);
    font-size: 1.3rem;
}
.mp-btn-pe:hover {
    background: #e0b400;
    box-shadow: 0 6px 18px rgba(250,201,18,.45);
}

.mp-pe-logo-wrap {
    background: #1c1f4a;
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
}

.mp-btn-ticket {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 12px;
    background: #fac912;
    color: #111;
    box-shadow: 0 4px 14px rgba(250,201,18,.35);
}
.mp-btn-ticket:hover {
    background: #e0b400;
    color: #111;
    box-shadow: 0 6px 18px rgba(250,201,18,.45);
}


.mp-input-err {
    display: none;
    color: #e53935;
    font-size: .78rem;
    margin-top: 4px;
}
.mp-input-err::before {
    content: '\f06a';
    font-family: FontAwesome;
    margin-right: 4px;
}


.mp-loading {
    text-align: center;
    color: #009ee3;
    font-size: 1.1rem;
    padding: 22px 0;
}

/* Overlay spinner */
.mp-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    z-index: 10;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.mp-overlay.mp-overlay-visible {
    display: flex;
}
.mp-overlay-spin {
    width: 48px;
    height: 48px;
    border: 5px solid #e0e7ef;
    border-top-color: #009ee3;
    border-radius: 50%;
    animation: mp-spin .8s linear infinite;
}
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-overlay-txt {
    font-size: 1rem;
    color: #4b5563;
}


.mp-resultado {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 40px 36px;
    gap: 0;
    background: #fff;
    border-radius: 16px;
}

.mp-resultado-visible {
    display: flex;
}

.mp-resultado-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}
.mp-resultado-ok  .mp-resultado-icon-wrap { background: #f0fdf4; border: 2.5px solid #86efac; }
.mp-resultado-pnd .mp-resultado-icon-wrap { background: #fffbeb; border: 2.5px solid #fcd34d; }
.mp-resultado-err .mp-resultado-icon-wrap { background: #fef2f2; border: 2.5px solid #fca5a5; }

.mp-resultado-icon {
    font-size: 2.4rem;
}
.mp-resultado-ok  .mp-resultado-icon { color: #16a34a; }
.mp-resultado-pnd .mp-resultado-icon { color: #d97706; }
.mp-resultado-err .mp-resultado-icon { color: #dc2626; }

.mp-resultado-titulo {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    letter-spacing: -.01em;
}

.mp-resultado-detalle {
    font-size: 1.2rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 300px;
}

.mp-resultado-error-desc {
    font-size: 1.05rem;
    color: #dc2626;
    margin-top: 2px;
}

.mp-resultado-id {
    font-size: 1rem;
    color: #b0b8c8;
    margin-top: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mp-resultado-divider {
    width: 48px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 20px 0;
}

.mp-resultado-btn-fin {
    margin-top: 24px;
    padding: 13px 44px;
    background: #2563c7;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(37,99,199,.25);
    letter-spacing: .01em;
}
.mp-resultado-btn-fin:hover {
    background: #1d51a8;
    box-shadow: 0 6px 18px rgba(37,99,199,.35);
}


/* Polling PagoEfectivo */
.mp-polling-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .95rem;
    color: #6b7280;
    margin: 8px 0 4px;
}
.mp-polling-status .fa-spinner {
    color: #fac912;
    font-size: 1.1rem;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 560px) {
    .mp-swal-container2 {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    .mp-swal-popup2 {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
    }
    .mp-body {
        padding: 14px 16px 24px;
        max-height: 65vh;
    }
    .mp-header {
        padding: 16px 16px 12px;
    }
    .mp-dots {
        margin: 0 16px;
    }
    .mp-progress {
        padding: 12px 16px 2px;
    }
    .mp-grid2 {
        grid-template-columns: 1fr;
    }
    .mp-lbl {
        font-size: .85rem;
    }
    .mp-input {
        font-size: .9rem;
        padding: 10px 12px;
    }
    .mp-field {
        margin-bottom: 8px;
    }
    .mp-metodo-label {
        font-size: .95rem;
    }
    .mp-swal-close {
        top: 8px !important;
        right: 10px !important;
    }
}
