/* Estilos para el sistema de notificaciones */

/* Navbar superior flotante */
.top-navbar {
    background: transparent;
    right: 0 !important;
    left: auto !important;
    width: auto !important;
    min-width: 350px;
}

/* Contenedor del navbar con fondo blanco */
.top-navbar .bg-white {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.top-navbar .bg-white:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Asegurar que el navbar flotante tenga z-index alto */
.top-navbar {
    z-index: 1030 !important;
}

/* Dropdowns con superposición */
.dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
    .top-navbar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 0.5rem 1rem;
        background: transparent;
    }

    .top-navbar .bg-white {
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        border-radius: 8px;
        width: 100%;
        justify-content: flex-end;
    }
}

.notification-dropdown {
    min-width: 350px;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.notification-dropdown .dropdown-header {
    font-weight: bold;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.notification-item.unread:hover {
    background-color: #bbdefb;
}

.notification-content {
    width: 100%;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.notification-message {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: #adb5bd;
    font-style: italic;
}

.notification-badge {
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    line-height: 18px;
}

/* Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        min-width: 300px;
        max-width: 320px;
    }

    .notification-title {
        font-size: 0.85rem;
    }

    .notification-message {
        font-size: 0.8rem;
    }
}

/* Animaciones */
@keyframes notificationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.notification-badge {
    animation: notificationPulse 2s infinite;
}

/* Estados de carga */
.notification-loading {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
}

.notification-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para el botón de notificaciones */
#notificationDropdown {
    position: relative;
}

#notificationDropdown .fa-bell {
    font-size: 1.1rem;
}

/* Mejorar el dropdown en móviles */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none;
        width: auto;
        transform: none !important;
    }
}