/* =========================================================== */
/* ESTILOS PARA MODALES DE PAGO - Webstore                     */
/* Archivo: payment-modals.css                                 */
/* Propósito: Estilos centralizados para todos los modales     */
/*            relacionados con el flujo de pagos               */
/* =========================================================== */

/* ----------------------------- */
/* COMPONENTES BASE              */
/* ----------------------------- */

.payment-icon-wrapper {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.btn-icon-wrapper {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ----------------------------- */
/* ANIMACIONES DE CONEXIÓN       */
/* ----------------------------- */

.connection-waves {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.wave {
    position: absolute;
    border: 2px solid #e74c3c;
    border-radius: 50%;
    opacity: 0;
    animation: wave-animation 2s infinite;
}

.wave-1 {
    animation-delay: 0s;
}

.wave-2 {
    animation-delay: 0.5s;
}

.wave-3 {
    animation-delay: 1s;
}

.wifi-icon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

@keyframes wave-animation {
    0% {
        width: 20px;
        height: 20px;
        top: 30px;
        left: 30px;
        opacity: 1;
    }
    100% {
        width: 80px;
        height: 80px;
        top: 0px;
        left: 0px;
        opacity: 0;
    }
}

/* ----------------------------- */
/* INDICADORES DE ESTADO         */
/* ----------------------------- */

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.offline-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes pulse {
    0% { 
        transform: scale(0.95); 
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); 
    }
    70% { 
        transform: scale(1); 
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); 
    }
    100% { 
        transform: scale(0.95); 
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); 
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* ----------------------------- */
/* ANIMACIONES DE CARGA          */
/* ----------------------------- */

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

@keyframes progress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* ----------------------------- */
/* TARJETAS DE CONTACTO          */
/* ----------------------------- */

.contact-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef !important;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-color: #007bff !important;
}

/* ----------------------------- */
/* BOTONES MEJORADOS             */
/* ----------------------------- */

.payment-modal .btn-lg {
    transition: all 0.3s ease;
    padding: 1rem !important;
    height: auto !important;
    font-size: 1.2rem !important;
}

.payment-modal .btn-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ----------------------------- */
/* MODAL BASE                    */
/* ----------------------------- */

.payment-modal .modal-content {
    border: none;
    overflow: hidden;
}

.payment-modal .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important;
}

/* Gradientes para alertas */
.payment-modal .alert {
    border: none;
}

/* ----------------------------- */
/* SPINNER Y VERIFICACIÓN        */
/* ----------------------------- */

.verification-animation {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verification-animation .spinner-grow {
    width: 1rem;
    height: 1rem;
}

/* Progress bar animado */
.payment-modal .progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* ----------------------------- */
/* CENTRADO DE MODALES DE PAGO   */
/* ----------------------------- */

.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: calc(100vh - 1rem) !important;
}

.modal-dialog-centered .modal-content {
    margin: auto !important;
    max-width: 90vw !important;
}

/* Centrando específico para modales de pago */
#paymentRecoveryOnLoadModal .modal-dialog,
#paymentRecoveryModal .modal-dialog,
#contactInfoModal .modal-dialog,
#paymentTimeoutModal .modal-dialog,
#connectionLossModal .modal-dialog,
#paymentRejectedModal .modal-dialog {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
    height: 100vh !important;
}

#paymentRecoveryOnLoadModal .modal-content,
#paymentRecoveryModal .modal-content,
#contactInfoModal .modal-content,
#paymentTimeoutModal .modal-content,
#connectionLossModal .modal-content,
#paymentRejectedModal .modal-content {
    margin: auto !important;
    position: relative !important;
}

/* ----------------------------- */
/* RESPONSIVE - MÓVILES          */
/* ----------------------------- */

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .payment-icon-wrapper {
        width: 35px;
        height: 35px;
    }
    
    .btn-icon-wrapper {
        width: 30px;
        height: 30px;
    }
    
    .connection-waves {
        width: 60px;
        height: 60px;
    }
    
    @keyframes wave-animation {
        0% {
            width: 15px;
            height: 15px;
            top: 22.5px;
            left: 22.5px;
            opacity: 1;
        }
        100% {
            width: 60px;
            height: 60px;
            top: 0px;
            left: 0px;
            opacity: 0;
        }
    }
}

@media (max-width: 576px) {
    .payment-modal .modal-content {
        margin: 1rem !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    .payment-modal .btn-lg {
        font-size: 1rem !important;
        padding: 0.75rem !important;
    }
}

/* ----------------------------- */
/* ESTADOS DE ERROR              */
/* ----------------------------- */

.payment-error-icon {
    font-size: 4rem;
    color: #dc3545;
}

.payment-warning-icon {
    font-size: 4rem;
    color: #ffc107;
}

.payment-success-icon {
    font-size: 4rem;
    color: #28a745;
}

.payment-info-icon {
    font-size: 4rem;
    color: #17a2b8;
}

/* ----------------------------- */
/* UTILIDADES                    */
/* ----------------------------- */

.payment-modal .text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.payment-modal .border-dashed {
    border-style: dashed !important;
}

/* ----------------------------- */
/* MODAL FORMA DE ENTREGA        */
/* ----------------------------- */

/* Limitar altura máxima del contenido del modal */
#modalFormaDeEntrega .modal-content,
#modalMetodoDePago .modal-content,
#modalPagoAlContado .modal-content,
#modalPagoACredito .modal-content {
    max-height: calc(100vh - 3.5rem);
}
