/* =========================================
   NOTIFICATION SYSTEM STYLES
   ========================================= */

/* Floating Notification Button */
.notification-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    color: var(--color-white);
    font-size: 24px;
    cursor: pointer;
    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.3),
        0 8px 24px rgba(37, 99, 235, 0.2),
        0 0 0 0 rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

/* Floating animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Bell icon */
.notification-btn i {
    position: relative;
    z-index: 2;
}

/* Hover state */
.notification-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.4),
        0 12px 32px rgba(37, 99, 235, 0.3),
        0 0 40px rgba(37, 99, 235, 0.2);
}

.notification-btn:hover i {
    animation: bellRing 0.5s ease-in-out;
}

/* Bell ring animation */
@keyframes bellRing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-15deg);
    }

    20%,
    40% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-10deg);
    }

    60% {
        transform: rotate(10deg);
    }

    70% {
        transform: rotate(-5deg);
    }

    80% {
        transform: rotate(5deg);
    }
}

/* Active state */
.notification-btn.active {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    transform: rotate(15deg);
}

/* Pulse effect */
.notification-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-secondary);
    opacity: 0.6;
    animation: pulse 2s ease-out infinite;
    z-index: 0;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 3;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1002;
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Notification Popup */
.notification-popup {
    position: fixed;
    top: 0;
    left: -450px;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1003;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notification-popup.active {
    left: 0;
}

/* Popup Header */
.notification-popup__header {
    padding: 24px 20px;
    background: var(--gradient-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.15);
}

.notification-popup__header h3 {
    font-family: var(--font-primary);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-popup__header h3::before {
    content: '🔔';
    font-size: 24px;
}

.notification-popup__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-popup__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* View All Button Section */
.notification-popup__view-all {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-gray-200);
}

.notification-popup__view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.notification-popup__view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    color: var(--color-white);
}

.notification-popup__view-all-btn i:first-child {
    font-size: 18px;
}

.notification-popup__view-all-btn i:last-child {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.notification-popup__view-all-btn:hover i:last-child {
    transform: translateX(4px);
}

/* Notification List */
.notification-popup__list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Notification Item */
.notification-item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInItem 0.4s ease forwards;
}

.notification-item:nth-child(1) {
    animation-delay: 0.1s;
}

.notification-item:nth-child(2) {
    animation-delay: 0.2s;
}

.notification-item:nth-child(3) {
    animation-delay: 0.3s;
}

.notification-item:nth-child(4) {
    animation-delay: 0.4s;
}

.notification-item:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes slideInItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Unread indicator */
.notification-item[data-unread="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-secondary) 0%, var(--color-primary) 100%);
}

.notification-item[data-unread="true"] {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

/* Notification Icon */
.notification-item__icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

/* Notification Content */
.notification-item__content {
    flex: 1;
}

.notification-item__content h4 {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.notification-item__date {
    font-size: 12px;
    color: var(--color-gray-500);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-item__date::before {
    content: '🕐';
    font-size: 13px;
}

.notification-item__text {
    font-size: 13px;
    color: var(--color-gray-700);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty State */
.notification-popup__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-gray-500);
}

.notification-popup__empty i {
    font-size: 64px;
    color: var(--color-gray-300);
    margin-bottom: 16px;
}

.notification-popup__empty p {
    font-size: 16px;
    margin: 0;
}

/* Scrollbar Styling */
.notification-popup__list::-webkit-scrollbar {
    width: 8px;
}

.notification-popup__list::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

.notification-popup__list::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 4px;
}

.notification-popup__list::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* Responsive Design */
@media (max-width: 991px) {
    .notification-btn {
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .notification-popup {
        width: 100%;
        max-width: 100vw;
        left: -100%;
    }
}

@media (max-width: 576px) {
    .notification-btn {
        bottom: 20px;
        right: 20px;
    }

    .notification-btn:hover {
        transform: scale(1.1);
    }

    .notification-btn.active {
        transform: rotate(15deg);
    }

    @keyframes float {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }
}

/* Hide back-to-top button to avoid conflict with notification button */
.back-to-top,
#backToTop,
.scroll-top,
.scroll-to-top,
a[href="#home"],
a[href="#top"] {
    display: none !important;
}