/**
 * IXNDN 通知系统
 */

/* ===== 通知容器 ===== */
#ixndn-notification-container {
    position: fixed;
    top: 32px;
    right: 20px;
    z-index: 999999;
    width: 360px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    pointer-events: none;
    padding: 10px 0;
}

#ixndn-notification-container .ixndn-notification {
    pointer-events: auto;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: ixndn-notification-slide-in 0.4s ease;
    border-left: 4px solid #6366f1;
    transition: all 0.3s;
}

#ixndn-notification-container .ixndn-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

#ixndn-notification-container .ixndn-notification.removing {
    animation: ixndn-notification-slide-out 0.3s ease forwards;
}

/* ===== 通知类型 ===== */
#ixndn-notification-container .ixndn-notification.success {
    border-left-color: #22c55e;
}
#ixndn-notification-container .ixndn-notification.error {
    border-left-color: #dc3545;
}
#ixndn-notification-container .ixndn-notification.warning {
    border-left-color: #f59e0b;
}
#ixndn-notification-container .ixndn-notification.info {
    border-left-color: #3b82f6;
}

/* ===== 通知图标 ===== */
#ixndn-notification-container .ixndn-notification .notif-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.4;
}
#ixndn-notification-container .ixndn-notification.success .notif-icon { color: #22c55e; }
#ixndn-notification-container .ixndn-notification.error .notif-icon { color: #dc3545; }
#ixndn-notification-container .ixndn-notification.warning .notif-icon { color: #f59e0b; }
#ixndn-notification-container .ixndn-notification.info .notif-icon { color: #3b82f6; }

/* ===== 通知内容 ===== */
#ixndn-notification-container .ixndn-notification .notif-content {
    flex: 1;
}
#ixndn-notification-container .ixndn-notification .notif-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}
#ixndn-notification-container .ixndn-notification .notif-message {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.5;
}
#ixndn-notification-container .ixndn-notification .notif-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1.2;
}
#ixndn-notification-container .ixndn-notification .notif-close:hover {
    color: #1e293b;
}

/* ===== 通知进度条 ===== */
#ixndn-notification-container .ixndn-notification .notif-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #6366f1;
    border-radius: 0 0 0 12px;
    transition: width 0.1s linear;
    width: 100%;
}
#ixndn-notification-container .ixndn-notification.success .notif-progress { background: #22c55e; }
#ixndn-notification-container .ixndn-notification.error .notif-progress { background: #dc3545; }
#ixndn-notification-container .ixndn-notification.warning .notif-progress { background: #f59e0b; }
#ixndn-notification-container .ixndn-notification.info .notif-progress { background: #3b82f6; }

/* ===== 动画 ===== */
@keyframes ixndn-notification-slide-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ixndn-notification-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
        margin-bottom: 10px;
    }
    to {
        opacity: 0;
        transform: translateX(40px);
        max-height: 0;
        margin-bottom: 0;
        padding: 0 20px;
    }
}

/* ===== 上传队列 ===== */
#ixndn-upload-queue {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999998;
    width: 380px;
    max-height: 60vh;
    overflow-y: auto;
}

#ixndn-upload-queue .ixndn-upload-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    animation: ixndn-notification-slide-in 0.3s ease;
    transition: all 0.3s;
    position: relative;
}

#ixndn-upload-queue .ixndn-upload-item.slide-out {
    animation: ixndn-notification-slide-out 0.3s ease forwards;
}

#ixndn-upload-queue .upload-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

#ixndn-upload-queue .upload-item-name {
    font-weight: 500;
    font-size: 13px;
    color: #1e293b;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ixndn-upload-queue .upload-item-size {
    font-size: 12px;
    color: #94a3b8;
}

#ixndn-upload-queue .upload-item-status {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    background: #f0f0f1;
    color: #6c757d;
}

#ixndn-upload-queue .upload-item-status.uploading {
    background: #dbeafe;
    color: #1e40af;
}

#ixndn-upload-queue .upload-item-status.complete {
    background: #d1fae5;
    color: #065f46;
}

#ixndn-upload-queue .upload-item-status.error {
    background: #fee2e2;
    color: #991b1b;
}

#ixndn-upload-queue .upload-item-progress {
    height: 4px;
    background: #f0f0f1;
    border-radius: 2px;
    overflow: hidden;
}

#ixndn-upload-queue .upload-item-progress .upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}

#ixndn-upload-queue .upload-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

#ixndn-upload-queue .upload-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

#ixndn-upload-queue .upload-item-actions .upload-cancel-btn:hover {
    background: #fee2e2;
}

#ixndn-upload-queue .upload-item-actions .upload-retry-btn {
    color: #6366f1;
}
#ixndn-upload-queue .upload-item-actions .upload-retry-btn:hover {
    background: #dbeafe;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    #ixndn-notification-container {
        width: calc(100% - 40px);
        top: 50px;
        right: 20px;
    }
    #ixndn-upload-queue {
        width: calc(100% - 40px);
        bottom: 10px;
        right: 20px;
    }
}