/* ===== ALERTAS MODALES MODERNAS ===== */

/* ===== POSICIONAMIENTO RESPONSIVE DEL ALERT CONTAINER ===== */
#alertContainer {
    position: fixed !important;
    top: 60px !important;
    right: 1rem !important;
    z-index: 1055 !important;
    max-width: 380px;
    transition: top 0.3s ease;
}

/* Estilos para alertas más compactas */
#alertContainer .alert {
    padding: 0.6rem 0.9rem !important;
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
    border-radius: 8px !important;
}

#alertContainer .alert i {
    font-size: 0.8rem !important;
    margin-right: 0.4rem !important;
}

#alertContainer .btn-close {
    font-size: 0.65rem !important;
    padding: 0.2rem !important;
    width: 1rem !important;
    height: 1rem !important;
    opacity: 0.6 !important;
    transition: opacity 0.2s ease !important;
}

#alertContainer .btn-close:hover {
    opacity: 1 !important;
}

/* Ajuste para header con scroll (altura reducida) */
.navbar-custom.scrolled ~ * #alertContainer,
body.scrolled #alertContainer {
    top: 65px !important;
}

/* Responsive breakpoints */
@media (max-width: 991.98px) {
    #alertContainer {
        top: 65px !important;
        max-width: 320px;
    }
    
    .navbar-custom.scrolled ~ * #alertContainer,
    body.scrolled #alertContainer {
        top: 55px !important;
    }
}

@media (max-width: 576px) {
    #alertContainer {
        top: 60px !important;
        left: 1rem !important;
        right: 1rem !important;
        max-width: calc(100vw - 2rem);
    }
    
    #alertContainer .alert {
        padding: 0.5rem 0.7rem !important;
        font-size: 0.8rem !important;
    }
    
    #alertContainer .btn-close {
        font-size: 0.6rem !important;
        padding: 0.15rem !important;
        width: 0.9rem !important;
        height: 0.9rem !important;
    }
    
    .navbar-custom.scrolled ~ * #alertContainer,
    body.scrolled #alertContainer {
        top: 50px !important;
    }
}

/* ===== ESTILOS DE ALERTAS ===== */
.modal-alert {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 9999 !important;
    min-width: 400px;
    max-width: 500px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
    padding: 2rem;
    overflow: hidden;
    border: 2px solid;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Asegurar que no haya conflictos con Bootstrap */
    position: fixed !important;
    margin: 0 !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Barra superior de color */
.modal-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--alert-gradient);
}

/* Variantes de color */
.modal-alert--primary {
    border-color: #667eea;
    --alert-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-alert--warning {
    border-color: #f39c12;
    --alert-gradient: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.modal-alert--danger {
    border-color: #e74c3c;
    --alert-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.modal-alert--success {
    border-color: #28a745;
    --alert-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Contenido de la alerta */
.modal-alert__content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.modal-alert__icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-alert__icon--primary { color: #667eea; }
.modal-alert__icon--warning { color: #f39c12; }
.modal-alert__icon--danger { color: #e74c3c; }
.modal-alert__icon--success { color: #28a745; }

.modal-alert__title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.modal-alert__message {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.modal-alert__message--small {
    font-size: 0.9rem;
}

/* Botón de cerrar */
.modal-alert__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-alert__close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

/* Código de verificación */
.verification-code {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px dashed #667eea;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}

.verification-code__number {
    color: #667eea;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* Botones de acción */
.modal-alert__button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.modal-alert__button--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-alert__button--warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.modal-alert__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enlaces secundarios */
.modal-alert__link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-alert__link:hover {
    color: #764ba2;
}

/* Responsive */
@media (max-width: 576px) {
    .modal-alert {
        min-width: 90vw;
        max-width: 90vw;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-alert__icon {
        font-size: 1.5rem;
    }
    
    .modal-alert__title {
        font-size: 1rem;
    }
    
    .verification-code__number {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
} 