/* 通知弹窗样式 */

/* 弹窗遮罩 */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.notification-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* 弹窗头部 */
.notification-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-popup-header.style-default {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.notification-popup-header.style-info {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: #fff;
}

.notification-popup-header.style-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #fff;
}

.notification-popup-header.style-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: #fff;
}

.notification-popup-header.style-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: #fff;
}

.notification-popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.notification-popup-title .icon {
    font-size: 24px;
}

.notification-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: inherit;
    font-size: 18px;
}

.notification-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 弹窗内容 */
.notification-popup-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.notification-popup-content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
}

/* 弹窗底部 */
.notification-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9fafb;
}

.notification-popup-meta {
    font-size: 12px;
    color: #9ca3af;
}

.notification-popup-actions {
    display: flex;
    gap: 8px;
}

.notification-popup-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.notification-popup-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.notification-popup-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.notification-popup-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.notification-popup-btn-secondary:hover {
    background: #d1d5db;
}

/* 通知导航指示器 */
.notification-popup-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f3f4f6;
}

.notification-popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-popup-dot.active {
    background: #6366f1;
    width: 24px;
    border-radius: 4px;
}

/* 页面右下角通知入口 */
.notification-float-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    border: none;
}

.notification-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.notification-float-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* 通知列表面板 */
.notification-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 360px;
    max-height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-panel-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-panel-body {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.notification-item-icon.style-default { background: #ede9fe; color: #6366f1; }
.notification-item-icon.style-info { background: #dbeafe; color: #3b82f6; }
.notification-item-icon.style-success { background: #d1fae5; color: #10b981; }
.notification-item-icon.style-warning { background: #fef3c7; color: #f59e0b; }
.notification-item-icon.style-danger { background: #fee2e2; color: #ef4444; }

.notification-item-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-time {
    font-size: 12px;
    color: #9ca3af;
}

.notification-item-content {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.notification-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
    .notification-popup {
        width: 95%;
        max-height: 85vh;
    }
    
    .notification-panel {
        width: calc(100% - 32px);
        right: 16px;
        bottom: 80px;
    }
    
    .notification-float-btn {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
