/**
 * Notification Styles
 * 统一的通知样式
 */

/* 通知容器 */
#notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 通知 */
.notification {
    min-width: 350px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideInRight 0.3s ease-out;
    cursor: default;
    /* 防止被模态框的 backdrop-filter 模糊 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* 确保背景完全不透明 */
    background-color: #4CAF50;
    /* 增强可见性 */
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 16px;
    z-index: 99999;
}

.notification.clickable {
    cursor: pointer;
}

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

/* 通知图标 */
.notification-icon,
.notification > span:first-child {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #4CAF50;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 通知文本 */
.notification-text,
.notification > span:nth-child(2) {
    flex: 1;
    font-size: 14px;
    color: white;
    word-break: break-word;
}

/* 关闭按钮 */
.notification-close,
.notification button {
    flex-shrink: 0;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.notification-close:hover,
.notification button:hover {
    opacity: 1;
}

/* 成功通知 */
.notification.success {
    background-color: #4CAF50;
}

.notification.success > span:first-child {
    background-color: #4CAF50;
}

/* 错误通知 */
.notification.error {
    background-color: #F44336;
}

.notification.error > span:first-child {
    background-color: #F44336;
}

/* 警告通知 */
.notification.warning {
    background-color: #FF9800;
}

.notification.warning > span:first-child {
    background-color: #FF9800;
}

/* 信息通知 */
.notification.info {
    background-color: #2196F3;
}

.notification.info > span:first-child {
    background-color: #2196F3;
}

/* 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* 通知进度条动画 */
@keyframes notification-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    #notification-container {
        top: 5px;
        right: 5px;
        left: 5px;
        gap: 8px;
    }
    
    .notification {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .notification > span:first-child {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .notification button {
        width: 18px;
        height: 18px;
        font-size: 18px;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .notification {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .notification.clickable:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
}

/* 无障碍支持 */
.notification:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.notification button:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    #notification-container {
        display: none;
    }
}