/* ===================== NOTIFICATION SYSTEM - BOTTOM POSITIONED ===================== */

/* Notification Box - Bottom Right (Same line as chatbot) */
.notification-box {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999998 !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.notification-box:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.notification-box::before {
    content: '🔔';
    font-size: 28px;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Notification Panel - Slide up from bottom */
.notification-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    max-height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 999999;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.notification-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.notification-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.notification-panel-content {
    max-height: 450px;
    overflow-y: auto;
    padding: 16px;
    background: #f9fafb;
}

.notification-panel-content::-webkit-scrollbar {
    width: 6px;
}

.notification-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.notification-panel-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.notification-panel-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.notification-item:hover {
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notification-item.unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.notification-item-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-text {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.notification-item-type {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    background: #e5e7eb;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.notification-item.unread .notification-item-type {
    background: #dbeafe;
    color: #1e40af;
}

.no-notifications {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 15px;
    font-weight: 500;
}

.no-notifications::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* Notification Toast - Slide from right */
.notification-toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999997;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-toast .notification-icon {
    font-size: 20px;
}

.notification-toast .notification-text {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 640px) {
    .notification-box {
        width: 55px !important;
        height: 55px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .notification-box::before {
        font-size: 24px;
    }
    
    .notification-badge {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .notification-panel {
        width: calc(100vw - 30px);
        bottom: 80px;
        right: 15px;
        max-height: 60vh;
    }
    
    .notification-panel-content {
        max-height: 50vh;
    }
    
    .notification-toast {
        width: calc(100vw - 30px);
        right: 15px;
        bottom: 80px;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-item-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .notification-item-text {
        font-size: 13px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .notification-box,
    .notification-panel,
    .notification-toast,
    .notification-badge {
        animation: none;
        transition: none;
    }
}