/* ===================================
   Notification Bell Component
   =================================== */

.notification-bell-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-bell:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Notification nav link style */
.notification-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-bell.ring {
    animation: ringBell 0.5s ease;
}

@keyframes ringBell {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.125rem 0.4rem;
    border-radius: 50px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #1f2937;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: popIn 0.3s ease;
}

.notification-badge.active {
    display: flex;
}

@keyframes popIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Notification Dropdown - Desktop */
.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    max-height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
    padding: 0 !important;
    border: none !important;
}

/* Show state - both Bootstrap show and custom active */
.notification-dropdown-menu.show {
    display: flex !important;
    animation: slideDown 0.3s ease;
}

@media (min-width: 992px) {
    .notification-dropdown-menu.show {
        display: flex !important;
    }
}

/* Keep old class name for compatibility */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 400px;
    max-height: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
}

.notification-dropdown.active {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile animation - simplified for inline dropdown */
@media (max-width: 991px) {
    .notification-dropdown-menu.show,
    .notification-dropdown.active {
        animation: slideDownInline 0.3s ease;
    }
    
    @keyframes slideDownInline {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.notification-dropdown-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.notification-dropdown-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.mark-all-read-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mark-all-read-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 1rem;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #ede9fe;
}

.notification-item.unread:hover {
    background: #e9d5ff;
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.notification-item-message {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.notification-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #9ca3af;
}

.notification-empty i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.notification-dropdown-footer {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.view-all-notifications {
    color: #7c3aed;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-notifications:hover {
    color: #6d28d9;
}

/* Responsive - Tablet and below - Show inside navbar like other dropdowns */
@media (max-width: 991px) {
    /* On mobile, notification dropdown behaves like other dropdown menus */
    .notification-dropdown-menu,
    .notification-dropdown {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 400px !important;
        margin-top: 0.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 8px !important;
        /* Bootstrap handles display with .show class - don't override */
    }
    
    /* Bootstrap show class - must work like other dropdown menus */
    .notification-dropdown-menu.show {
        display: flex !important;
        flex-direction: column;
    }
    
    /* Ensure Bootstrap's inline style display:block is converted to flex */
    .notification-dropdown-menu[style*="display: block"] {
        display: flex !important;
        flex-direction: column;
    }
    
    .notification-dropdown.active {
        display: flex !important;
    }
    
    .notification-nav-link {
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem !important;
    }
    
    .notification-badge {
        position: static;
        margin-left: 0.5rem;
        display: inline-flex;
    }
    
    .notification-dot {
        position: static;
        margin-left: 0.25rem;
    }
    
    .notification-list {
        max-height: 300px !important;
        overflow-y: auto;
    }
    
    .notification-dropdown-header {
        padding: 1rem 1.25rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .notification-dropdown-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .mark-all-read-btn {
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .notification-dropdown-footer {
        padding: 0.875rem 1rem !important;
    }
    
    .mark-all-read-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .notification-item {
        padding: 0.875rem 1.25rem;
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .notification-item-title {
        font-size: 0.9rem;
    }
    
    .notification-item-message {
        font-size: 0.85rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 576px) {
    .notification-dropdown-menu,
    .notification-dropdown {
        max-height: 350px !important;
    }
    
    .notification-list {
        max-height: 250px !important;
    }
    
    .notification-dropdown-header {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .notification-dropdown-title {
        font-size: 0.95rem;
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .mark-all-read-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .notification-item {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .notification-item-title {
        font-size: 0.875rem;
    }
    
    .notification-item-message {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .notification-item-time {
        font-size: 0.7rem;
    }
    
    .notification-empty {
        padding: 2rem 1rem;
    }
    
    .notification-empty i {
        font-size: 2.5rem;
    }
    
    .notification-dropdown-footer {
        padding: 0.875rem 1rem;
    }
    
    .view-all-notifications {
        font-size: 0.875rem;
    }
    
    .notification-bell-container {
        position: static;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .notification-dropdown-menu,
    .notification-dropdown {
        max-height: 300px !important;
    }
    
    .notification-list {
        max-height: 200px !important;
    }
    
    .notification-dropdown-header {
        padding: 0.75rem 0.875rem;
    }
    
    .notification-item {
        padding: 0.625rem 0.875rem;
    }
}

/* Notification Dot Indicator */
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #1f2937;
    animation: pulse 2s ease-in-out infinite;
    display: none;
}

.notification-dot.active {
    display: block;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

