/* Message and Notification Icon Fixes */

/* Ensure proper spacing between message and notification icons */
.message-bell, .notification-bell {
    background: none !important;
    border: none !important;
    color: #2c5aa0 !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    position: relative !important;
    margin: 0 0.25rem !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.message-bell:hover, .notification-bell:hover {
    background: rgba(44, 90, 160, 0.1) !important;
    transform: scale(1.1) !important;
}

/* Count badges */
#headerMessageCount, #notificationCount {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    background: #dc3545 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    font-size: 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Hide count when zero */
#headerMessageCount[data-count="0"], 
#notificationCount[data-count="0"] {
    display: none !important;
}

/* Notification dropdown */
#headerNotificationDropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    width: 320px !important;
    z-index: 10000 !important;
    max-height: 400px !important;
    overflow: hidden !important;
}

/* Notification items */
.notification-item {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.notification-item:hover {
    background: #f8f9fa !important;
}

.notification-item.unread {
    background: #e3f2fd !important;
    border-left: 3px solid #2c5aa0 !important;
}

.notification-item.read {
    background: white !important;
    opacity: 0.8 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #headerNotificationDropdown {
        right: -100px !important;
        width: 280px !important;
    }
    
    .message-bell, .notification-bell {
        font-size: 1.1rem !important;
        padding: 0.4rem !important;
    }
    
    #headerMessageCount, #notificationCount {
        width: 16px !important;
        height: 16px !important;
        font-size: 0.65rem !important;
    }
}

/* Prevent conflicts with other styles */
.message-bell *, .notification-bell * {
    pointer-events: none !important;
}

/* Loading states */
.message-bell.loading, .notification-bell.loading {
    opacity: 0.6 !important;
    cursor: wait !important;
}

/* Animation for count updates */
@keyframes countUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.count-updated {
    animation: countUpdate 0.3s ease !important;
}