/* Modal de pago PSE / Bre-B — estilo ETB */

#payment-modal,
#payment-processing {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000000;
}

#payment-modal.visible,
#payment-processing.visible {
    display: flex;
}

#payment-modal {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 16px;
}

#payment-processing {
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    flex-direction: column;
}

.payment-modal-box {
    background: #fff;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 24px;
}

.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.payment-modal-header h3 {
    color: #0092bc;
    font-family: DINPro, arial;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
}

.payment-modal-method {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.payment-modal-method img {
    height: 36px;
    width: auto;
}

.payment-modal-method span {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

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

.pay-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 4px;
}

.pay-field input,
.pay-field select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d1d1;
    border-radius: 8px;
    font-size: 15px;
    font-family: DINPro, arial;
    box-sizing: border-box;
}

.pay-field input:focus,
.pay-field select:focus {
    outline: none;
    border-color: #0092bc;
}

.pay-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 520px) {
    .pay-field-grid {
        grid-template-columns: 1fr;
    }
}

.payment-modal-actions {
    margin-top: 18px;
}

.btn-pay-continue {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #0092bc;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-family: DINPro, arial;
}

.btn-pay-continue:hover {
    background: #ff5c39;
}

#ventPago .pago_container.disabled-pay,
#ventPago .pago_container.pay-method-off {
    display: none !important;
}

#payment-processing .proc-logo {
    width: 80px;
    margin-bottom: 20px;
}

#payment-processing .proc-text {
    font-family: DINPro, arial;
    color: #0092bc;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

#payment-processing .proc-dots {
    color: #0092bc;
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
}

#breb-method-hint-etb,
#tarjeta-method-hint-etb,
#bancolombia-method-hint-etb,
#banco-bogota-method-hint-etb {
    font-size: 12px;
    color: #666;
    margin: 8px 0 0;
    line-height: 1.4;
}

.user-pay-tarjeta,
.user-pay-bancolombia,
.user-pay-banco-bogota {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: #214780;
}

.imgPosicionTarjeta {
    width: 48px;
    height: 48px;
}

.imgPosicionBancolombia {
    width: auto;
    height: 48px;
    max-width: 220px;
    flex-shrink: 0;
    object-fit: contain;
}

.imgPosicionBancoBogota {
    width: min(100%, 280px);
    height: auto;
    max-height: 72px;
    flex-shrink: 0;
    object-fit: contain;
}

.tarjeta-method-label,
.bancolombia-method-label,
.banco-bogota-method-label {
    font-family: DINPro, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #214780;
}

.payment-modal-box.with-card {
    max-width: 720px;
}

.card-payment-section {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #d6eef5;
    border-radius: 14px;
    background: linear-gradient(180deg, #f4fbfe 0%, #ffffff 100%);
}

.card-secure-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #166534;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.card-brand-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-brand-img {
    height: 22px;
    width: auto;
}

.card-brand-img--on-card {
    height: 28px;
}

.card-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 16px;
    align-items: start;
}

.card-visual {
    position: relative;
    aspect-ratio: 1.586 / 1;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(135deg, #0078a0 0%, #0092bc 45%, #005f7a 100%);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 146, 188, 0.32);
    overflow: hidden;
}

.card-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.card-visual-chip {
    width: 40px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    margin-bottom: 22px;
}

.card-visual-brand {
    position: absolute;
    top: 18px;
    right: 18px;
}

.card-visual-number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 18px;
    letter-spacing: 0.12em;
    margin: 0 0 18px;
}

.card-visual-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.card-visual-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 2px;
}

.card-visual-value {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card-field-full {
    grid-column: 1 / -1;
}

.card-field-brand {
    position: relative;
}

.card-input-brand {
    position: absolute;
    right: 12px;
    top: 34px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.card-input-brand:empty {
    display: none;
}

.card-trust-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

@media (max-width: 720px) {
    .card-form-layout,
    .card-fields-grid {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

.vbv-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
}

.vbv-box {
    width: 100%;
    max-width: 26rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.vbv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.vbv-bank-logo {
    height: 32px;
    width: auto;
    max-width: 8rem;
    object-fit: contain;
}

.vbv-brand-badge {
    height: 28px;
    width: auto;
    max-width: 9rem;
    object-fit: contain;
}

.vbv-panel {
    padding: 22px 18px 26px;
    text-align: center;
}

.vbv-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border: 3px solid #d6eef5;
    border-top-color: #0092bc;
    border-radius: 50%;
    animation: vbv-spin 0.85s linear infinite;
}

@keyframes vbv-spin {
    to { transform: rotate(360deg); }
}

.vbv-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.vbv-text {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
}

.vbv-sub {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.vbv-amount,
.vbv-card {
    margin: 6px 0 0;
    font-size: 14px;
    color: #4b5563;
}

.vbv-otp-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.vbv-otp-wrap input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d1d1;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 0.15em;
    box-sizing: border-box;
}

.vbv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 24px;
    background: #0092bc;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.vbv-btn:hover {
    background: #ff5c39;
}

.vbv-done-icon,
.vbv-wait-icon,
.vbv-warn-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    line-height: 48px;
}

.vbv-done-icon {
    background: #dcfce7;
    color: #16a34a;
}

.vbv-wait-icon {
    background: #dbeafe;
    color: #0092bc;
    font-size: 22px;
}

.vbv-warn-icon {
    background: #fef3c7;
    color: #b45309;
    font-size: 24px;
}
