﻿.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 90%;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .alert.show {
        opacity: 1;
        transform: translateX(0);
    }

.alert-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.alert-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-text {
    flex-grow: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0 0 10px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .alert-close:hover {
        opacity: 1;
    }

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    width: 100%;
    animation: progressBar linear forwards;
}

/* Colores por tipo */
.alert-exito {
    background-color: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-advertencia {
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.notification-container {
    position: relative;
    display: inline-block;
    margin: 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    z-index: 1000;
}

.notification-btn {
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    color: var(--text-color);
}

    .notification-btn:hover {
        background-color: var(--light-bg);
        transform: translateY(-2px);
    }

    .notification-btn i {
        font-size: 20px;
    }

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--badge-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: 60px;
    width: 350px;
    max-height: 0;
    overflow: hidden;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 1000;
    pointer-events:none;
}

    .notification-dropdown.active {
        max-height: 500px;
        opacity: 1;
        pointer-events: all;
    }

.notification-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .notification-header h3 {
        margin: 0;
        font-size: 16px;
        color: var(--text-color);
    }

    .notification-header a {
        color: var(--primary-color);
        text-decoration: none;
        font-size: 14px;
    }

.notification-list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    z-index:1000
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    transition: var(--transition);
    cursor: pointer;
}

    .notification-item:hover {
        background-color: var(--light-bg);
    }

    .notification-item.unread {
        background-color: rgba(67, 97, 238, 0.05);
    }

.notification-icon {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 14px;
}

.notification-message {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.notification-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid #eee;
}

    .notification-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
    }

/* Animación para notificaciones nuevas */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 1.5s infinite;
}

/* Animación de la barra de progreso */
@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@media (max-width: 1600px) {
    .notification-dropdown {
        left: 0;
    }
}


    /* Responsive */
    @media (max-width: 576px) {
        .alert-container {
            left: 50%;
            transform: translateX(-50%);
            right: auto;
            width: 95%;
        }

        .alert {
            width: 100%;
        }
    }
