/**
 * Notification Bell System Styles - FINAL FIXED VERSION
 * File: public/css/notifications.css
 * ✅ FIX: Bell icon stays visible, badge shows on top-right
 */

/* Notification Bell Icon */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: #f5f5f5;
}

.notification-bell .material-icons-sharp {
    font-size: 1.5rem;
    color: var(--text);
    position: relative;
    z-index: 1 !important; /* ✅ Bell is layer 1 (bottom) */
    pointer-events: auto !important; /* ✅ Bell receives clicks */
    display: block !important; /* ✅ Force display */
}

/* Notification Badge (unread count) */
.notification-badge {
    position: absolute;
    top: 0px; /* ✅ Adjusted for better positioning */
    right: 4px; /* ✅ Adjusted for better positioning */
    background: #f44336;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 4px;
    border: 2px solid white;
    z-index: 10 !important; /* ✅ Badge is layer 10 (top) - always above bell */
    pointer-events: none !important; /* Badge doesn't block clicks */
}

.notification-badge.hidden {
    display: none !important;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 380px;
    max-height: 500px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.notification-dropdown.show {
    display: flex;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Header */
.notification-header {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    transition: 0.3s;
}

.mark-all-read:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* Notification Item */
.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid var(--primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.notification-icon.info {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.notification-icon.warning {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.notification-icon.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Empty State */
.notification-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty span {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 1rem;
}

.notification-empty p {
    margin: 0;
}

/* Notification Footer */
.notification-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.view-all-notifications {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.view-all-notifications:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 320px;
        max-height: 400px;
    }

    .notification-list {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: 60px !important;
        right: 10px;
        left: 10px;
        width: auto;
    }
}