/* ========== Sistema de Notificaciones Personalizado ========== */

/* Contenedor de notificaciones */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

/* Notificación individual */
.notification {
    min-width: 320px;
    max-width: 400px;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    pointer-events: all;
    animation: slideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.notification:hover {
    transform: translateX(-5px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Barra de progreso */
.notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.3;
    animation: progress 4s linear;
}

/* Iconos */
.notification-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Contenido */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Botón cerrar */
.notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.6;
}

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

/* Tipos de notificación */
.notification-success {
    color: #2E7D32;
    border-left: 4px solid #2E7D32;
}

.notification-success .notification-icon {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.notification-error {
    color: #C62828;
    border-left: 4px solid #C62828;
}

.notification-error .notification-icon {
    background: linear-gradient(135deg, #EF5350, #C62828);
    color: white;
}

.notification-warning {
    color: #F57C00;
    border-left: 4px solid #F57C00;
}

.notification-warning .notification-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.notification-info {
    color: #1976D2;
    border-left: 4px solid #1976D2;
}

.notification-info .notification-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.notification.removing {
    animation: slideOut 0.3s ease forwards;
}

/* Modal de confirmación */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
    padding: 20px;
}

.notification-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.notification-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.notification-modal-message {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.notification-modal-actions {
    display: flex;
    gap: 1rem;
}

.notification-modal-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.notification-modal-btn-primary {
    background: var(--primary-color);
    color: white;
}

.notification-modal-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.notification-modal-btn-secondary {
    background: #f5f5f5;
    color: var(--text-primary);
}

.notification-modal-btn-secondary:hover {
    background: #e0e0e0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        max-width: none;
    }

    .notification-modal-content {
        padding: 1.5rem;
    }

    .notification-modal-actions {
        flex-direction: column-reverse;
    }
}