/* REFACTORIZADO: 2025-05-21 (Versión Final Definitiva) */
/* /modules/modal-opciones-pago/assets/css/frontend.css */

/* --- Trigger (Enlace de apertura) --- */
.gdos-open-modal-button {
    display: inline-block;
    cursor: pointer;
    color: #2271b1; /* WP Core Blue */
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
    transition: color 0.2s ease;
}

.gdos-open-modal-button:hover,
.gdos-open-modal-button:focus {
    color: #135e96;
    text-decoration: underline;
}

/* --- Backdrop (Fondo Oscuro) --- */
.gdos-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999; /* Asegurar estar sobre el header/menú */
    
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    
    display: none; /* Estado inicial */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

/* FIX CRÍTICO VISIBILIDAD: Forzamos visualización al tener la clase */
.gdos-modal-backdrop.is-visible {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* --- Contenido del Modal --- */
.gdos-modal-content {
    background: #fff;
    width: 100%;
    max-width: 550px;
    max-height: 90vh; /* Evita que se salga de la pantalla */
    
    padding: 30px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    
    overflow-y: auto; /* Scroll interno si la lista es larga */
    overscroll-behavior: contain; /* Evita scrollear el body al llegar al fin */
    
    /* Animación de entrada suave */
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gdos-modal-backdrop.is-visible .gdos-modal-content {
    transform: translateY(0);
}

/* --- Botón Cerrar (Cruz Superior) --- */
.gdos-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 24px;
    line-height: 1;
    color: #646970;
    
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.gdos-modal-close:hover {
    background-color: #f0f0f1;
    color: #1d2327;
}

/* --- Lista de Opciones --- */
.gdos-cuotas-list__title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1d2327;
    padding-right: 20px; /* Espacio para la X */
    line-height: 1.3;
}

.gdos-cuotas-list__item {
    display: flex;
    align-items: center; /* CORRECCIÓN: Centrado vertical perfecto */
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f1;
}

.gdos-cuotas-list__item:last-of-type {
    border-bottom: none;
}

.gdos-cuotas-list__icon {
    width: 42px;
    height: auto;
    margin-right: 15px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid #f0f0f1; /* Marco sutil para logos */
}

.gdos-cuotas-list__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #3c434a;
}

.gdos-cuotas-list__text strong {
    color: #1d2327;
    font-weight: 700;
}

.gdos-cuotas-list__disclaimer {
    display: block;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #f0f0f1;
    font-size: 12px;
    color: #8c8f94;
    text-align: center;
}

/* --- Footer (Botón Cerrar Inferior) --- */
.gdos-modal-footer {
    text-align: center;
    margin-top: 25px;
}

.gdos-modal-close-btn {
    background-color: #f6f7f7;
    color: #2c3338;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gdos-modal-close-btn:hover {
    background-color: #fff;
    border-color: #c3c4c7;
    color: #1d2327;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .gdos-modal-content {
        padding: 20px;
        width: 100%;
        max-height: 85vh;
    }
    
    .gdos-cuotas-list__title {
        font-size: 16px;
    }
    
    .gdos-cuotas-list__text {
        font-size: 13px;
    }
}