/* Modern Notification System */

/* Notification Wrapper */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

/* Bell Button */
.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #6b7280;
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.notification-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    display: none;
}

.notification-badge.show {
    display: block;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 500px;
    overflow: hidden;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Header */
.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
}

.notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background-color: #eef2ff;
    color: #4f46e5;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background-color: #f8fafc;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: #fef7ff;
    border-left: 3px solid #a855f7;
}

.notification-item.unread:hover {
    background-color: #faf5ff;
}

/* Notification Icon */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-icon.success {
    background-color: #dcfce7;
    color: #16a34a;
}

.notification-icon.info {
    background-color: #dbeafe;
    color: #2563eb;
}

.notification-icon.warning {
    background-color: #fef3c7;
    color: #d97706;
}

.notification-icon.profile {
    background-color: #e0e7ff;
    color: #6366f1;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    margin: 0 0 4px 0;
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* Unread Indicator */
.notification-dot {
    width: 8px;
    height: 8px;
    background-color: #a855f7;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
    margin-top: 6px;
}

/* Empty State */
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.notification-empty-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.notification-empty-text {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.notification-empty-subtext {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* Error State */
.notification-error {
    padding: 20px;
    text-align: center;
    color: #dc2626;
    background-color: #fef2f2;
    margin: 10px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.notification-error-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Loading State */
.notification-loading {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.notification-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 16px;
        right: 16px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
    
    .notification-list {
        max-height: calc(100vh - 140px);
    }
}

/* Animation for new notifications */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item.new {
    animation: slideIn 0.3s ease-out;
}

/* Success message styling */
.notification-success {
    padding: 12px 20px;
    background-color: #f0fdf4;
    color: #16a34a;
    border-left: 3px solid #22c55e;
    margin: 10px;
    border-radius: 6px;
    font-size: 14px;
}