/* ============================================
   NOTIFICATION SYSTEM STYLES
   ============================================ */

/* Bell Button */
.notification-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notification-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 8px;
    color: var(--theme-text-secondary);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-btn:hover {
    color: var(--color-primary-300);
}

/* Badge */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    max-height: 480px;
    background: var(--theme-bg-surface);
    border-radius: var(--border-radius-sm, 8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--theme-border-color);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-dropdown.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--theme-border-color);
}

.notification-dropdown-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.notification-mark-all-btn {
    background: none;
    border: none;
    color: var(--color-primary-300);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.notification-mark-all-btn:hover {
    background: rgba(100, 64, 251, 0.08);
}

/* Notification List */
.notification-dropdown-body {
    overflow-y: auto;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-border-color) transparent;
}

.notification-dropdown-body::-webkit-scrollbar {
    width: 4px;
}

.notification-dropdown-body::-webkit-scrollbar-thumb {
    background: var(--theme-border-color);
    border-radius: 4px;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--theme-border-color);
}

.notification-item:hover {
    background: var(--theme-bg-surface-hover, rgba(0,0,0,0.04));
}

.notification-item.unread {
    background: var(--color-primary-10, rgba(12,65,255,0.06));
    border-left: 3px solid var(--color-primary-300);
}

.notification-item.unread:hover {
    background: var(--color-primary-10, rgba(12,65,255,0.06));
}

.notification-item-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f4ff, #e8edff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

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

.notification-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary-300);
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.notification-item-message {
    font-size: 12px;
    color: var(--theme-text-secondary);
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: 11px;
    color: #a0a4b0;
}

/* Empty State */
.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: #a0a4b0;
}

.notification-empty p {
    margin: 12px 0 0;
    font-size: 13px;
}

/* Footer */
.notification-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--theme-border-color);
    text-align: center;
}

.notification-dropdown-footer a {
    color: var(--color-primary-300);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.notification-dropdown-footer a:hover {
    color: var(--color-primary-300);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.notification-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    background: var(--theme-bg-surface);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--theme-border-color);
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    animation: toastSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-toast.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.notification-toast-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
}

.notification-toast-body {
    flex: 1;
    min-width: 0;
}

.notification-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin: 0 0 4px 0;
}

.notification-toast-message {
    font-size: 13px;
    color: var(--theme-text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--theme-text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.notification-toast-close:hover {
    color: var(--theme-text-primary);
}

.notification-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-300), var(--color-primary-300));
    border-radius: 0 0 12px 12px;
    animation: toastProgress 5s linear forwards;
}

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

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================
   NOTIFICATIONS PAGE
   ============================================ */

.notifications-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 15px;
}

.notifications-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.notifications-page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
}

.notifications-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.notifications-filter-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--theme-text-secondary);
    background: var(--theme-bg-surface);
    border: 1px solid var(--theme-border-color);
    transition: all 0.2s;
}

.notifications-filter-tab:hover {
    background: var(--color-primary-10, rgba(12,65,255,0.08));
    color: var(--color-primary-300);
    border-color: var(--color-primary-300);
}

.notifications-filter-tab.active {
    background: var(--color-primary-300);
    color: #fff;
    border-color: var(--color-primary-300);
}

.notification-page-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--theme-bg-surface);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--theme-border-color);
    transition: all 0.15s;
    text-decoration: none;
    color: var(--theme-text-primary);
}

.notification-page-item:hover {
    border-color: var(--color-primary-300);
    box-shadow: 0 2px 8px rgba(100, 64, 251, 0.06);
}

.notification-page-item.unread {
    background: var(--color-primary-10, rgba(12,65,255,0.06));
    border-color: var(--color-primary-200, #a5b4fc);
}

/* Responsive */
@media (max-width: 576px) {
    .notification-dropdown {
        width: calc(100vw - 24px);
        right: -60px;
    }

    .notification-toast {
        min-width: auto;
        max-width: calc(100vw - 40px);
    }
}
