/* ============================================
   MANAGEMENT NOTIFICATIONS DROPDOWN
   ============================================ */

/* Notification Button - ensure relative positioning */
.btn-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Notification Dropdown Container */
.notification-dropdown {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 400px;
    max-width: calc(100vw - 32px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: calc(80vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .notification-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* Notification Header */
.notification-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.notification-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.notification-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-count {
    font-size: 13px;
    font-weight: 600;
    color: #055059;
    background: #e6f2f3;
    padding: 4px 10px;
    border-radius: 12px;
}

.notification-header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4b5563;
}

    .notification-header-btn:hover {
        background: #e5e7eb;
    }

    .notification-header-btn svg {
        width: 20px;
        height: 20px;
    }

/* Notification Filter Tabs */
.notification-tabs {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
    flex-shrink: 0;
    overflow-x: auto;
    background: white;
}

.notification-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .notification-tab:hover {
        background: #f3f4f6;
    }

    .notification-tab.active {
        background: #dbeafe;
        color: #1e40af;
    }

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    border-bottom: none;
}

    .notification-item:hover {
        background: #f9fafb;
    }

    .notification-item.unread {
        background: #eff6ff;
    }

        .notification-item.unread:hover {
            background: #dbeafe;
        }

/* Notification Item Icon (matches home.css) */
.notification-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

    .notification-item-icon svg {
        width: 24px;
        height: 24px;
        color: white;
    }

    /* Message type - Blue gradient */
    .notification-item-icon.message {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    }

    /* Order type - Orange gradient */
    .notification-item-icon.order {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    }

/* Unread indicator on icon */
.notification-item.unread .notification-item-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--bs-red);
    border: 2px solid white;
    border-radius: 50%;
}

/* Old avatar styles - keep for backwards compatibility */
.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #055059 0%, #078895 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

    /* Order Avatar (for food orders) */
    .notification-avatar.order-avatar {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    }

        .notification-avatar.order-avatar i {
            font-size: 20px;
        }

/* Unread indicator on avatar */
.notification-item.unread .notification-avatar::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border: 2px solid white;
    border-radius: 50%;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.notification-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: #9ca3af;
}

.notification-empty-icon {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin: 0 auto 12px;
}

.notification-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 4px 0;
}

.notification-empty-text {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* Notification Footer */
.notification-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: white;
    flex-shrink: 0;
}

.notification-footer-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .notification-footer-btn:hover {
        background: #f3f4f6;
        border-color: #9ca3af;
    }

    .notification-footer-btn.primary {
        background: #055059;
        border-color: #055059;
        color: white;
    }

        .notification-footer-btn.primary:hover {
            background: #044049;
            border-color: #044049;
        }

/* Scrollbar Styling */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

    .notification-list::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-dropdown {
        top: 56px;
        right: 8px;
        width: calc(100vw - 16px);
        max-width: 400px;
    }

    .notification-title {
        font-size: 18px;
    }

    .notification-item {
        padding: 10px 12px;
    }

    .notification-avatar {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

        .notification-avatar.order-avatar i {
            font-size: 18px;
        }

    .notification-tabs {
        padding: 6px 8px;
    }

    .notification-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        top: 56px;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}

/* Animation for new notification */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-item.new {
    animation: slideInRight 0.3s ease;
}

/* Notification badge pulse animation */
.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(5, 80, 89, 0.7);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(5, 80, 89, 0);
    }
}
