/* ============================================
   HUNXA NOTIFICATION SYSTEM STYLES
   Smooth animations and professional UI
   ============================================ */

/* Badge Styles */
#notifBadge {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

#notifBadge.show {
    display: flex;
}

/* Badge Increment Animation */
@keyframes badgeIncrement {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#notifBadge.badge-increment {
    animation: badgeIncrement 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Notification Button */
.notif-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-btn:hover {
    background: #f3f4f6;
    color: var(--blue);
    transform: scale(1.05);
}

.notif-btn:active {
    transform: scale(0.95);
}

/* Notification Modal */
.notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    align-items: flex-start;
    justify-content: flex-end;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notification-modal.active {
    display: flex;
}

.notification-modal-header {
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.notification-modal-header h3 {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.notification-modal-header button {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-modal-header button:hover {
    color: var(--dark);
    transform: scale(1.1);
}

/* Notification Panel */
#notificationPanel {
    background: white;
    max-height: 600px;
    overflow-y: auto;
    flex: 1;
}

.notification-item {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    gap: 12px;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread-notification {
    background: #ddf0f5;
}

.notification-item.unread-notification:hover {
    background: #e8f5fb;
}

/* Notification Modal Footer */
.notification-modal-footer {
    background: #f9fafb;
    padding: 12px 20px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

.notification-modal-footer button {
    flex: 1;
    padding: 10px;
    background: white;
    color: var(--gray);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.notification-modal-footer button:hover {
    background: #f3f4f6;
    border-color: var(--blue);
    color: var(--blue);
}

.notification-modal-footer button:active {
    transform: scale(0.95);
}

/* Toast Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-toast {
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
}

.notification-toast.hiding {
    animation: slideOut 0.3s ease-out;
}

/* Scrollbar Styling */
#notificationPanel::-webkit-scrollbar {
    width: 6px;
}

#notificationPanel::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#notificationPanel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#notificationPanel::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-modal {
        justify-content: center;
    }

    #notificationPanel {
        max-height: 400px;
        max-width: 90vw;
        width: 100%;
        border-radius: 12px;
    }

    .notification-modal-header {
        border-radius: 12px 12px 0 0;
    }

    .notification-modal-footer {
        border-radius: 0 0 12px 12px;
    }
}

/* Animation Utilities */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-bounce {
    animation: bounce 1s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification-modal {
        background: rgba(0, 0, 0, 0.5);
    }

    .notification-modal-header,
    #notificationPanel {
        background: #1f2937;
        color: #f3f4f6;
    }

    .notification-modal-header h3 {
        color: #f3f4f6;
    }

    .notification-item {
        background: #1f2937;
        border-bottom-color: #374151;
        color: #f3f4f6;
    }

    .notification-item:hover {
        background: #374151;
    }

    .notification-item.unread-notification {
        background: #0f172a;
    }

    .notification-item.unread-notification:hover {
        background: #1e293b;
    }

    .notification-modal-footer {
        background: #374151;
        border-top-color: #4b5563;
    }

    .notification-modal-footer button {
        background: #1f2937;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .notification-modal-footer button:hover {
        background: #374151;
        border-color: #6E93B0;
    }

    #notificationPanel::-webkit-scrollbar-track {
        background: #1f2937;
    }

    #notificationPanel::-webkit-scrollbar-thumb {
        background: #4b5563;
    }

    #notificationPanel::-webkit-scrollbar-thumb:hover {
        background: #6b7280;
    }
}
