/* ========================================
   上传相关：拖拽遮罩、上传面板、进度面板、成功面板
   ======================================== */

/* ---------- 拖拽上传遮罩 ---------- */
.drag-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    border: 2px dashed transparent;
}

.drag-overlay.active {
    opacity: 1;
    visibility: visible;
    border-color: var(--accent-blue);
}

.drag-content {
    text-align: center;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.drag-overlay.active .drag-content {
    transform: scale(1);
}

.drag-icon {
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.drag-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drag-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- 拖拽文件面板 & 上传进度面板 ---------- */
.drag-file-panel,
.upload-progress-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 450px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    transform: translateY(120%);
    opacity: 0;
    transition: all var(--transition-normal);
}

.drag-file-panel.active,
.upload-progress-panel.active {
    transform: translateY(0);
    opacity: 1;
}

.drag-file-header,
.progress-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.drag-file-title,
.progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-all {
    font-size: 12px;
    color: var(--accent-red);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    min-height: 32px;
}

.btn-clear-all:hover {
    background: var(--accent-red-light);
}

.drag-file-list,
.file-progress-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 100px;
    max-height: 250px;
}

.drag-file-item,
.file-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

.drag-file-item:last-child,
.file-progress-item:last-child {
    margin-bottom: 0;
}

.file-preview {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info,
.file-progress-info {
    flex: 1;
    min-width: 0;
}

.file-name,
.file-progress-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta,
.file-progress-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-remove-file {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-remove-file:hover {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.drag-file-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.drag-total-size {
    font-size: 12px;
    color: var(--text-muted);
}

.drag-file-actions {
    display: flex;
    gap: 10px;
}

.btn-cancel-upload {
    padding: 8px 16px;
    background: var(--btn-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: all var(--transition-fast);
    min-height: 36px;
}

.btn-cancel-upload:hover {
    background: var(--btn-secondary-hover);
    color: var(--text-primary);
}

.btn-start-upload {
    padding: 8px 16px;
    background: var(--btn-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-height: 36px;
}

.btn-start-upload:hover {
    background: var(--btn-primary-hover);
}

/* ---------- 进度面板详情 ---------- */
.progress-overall {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.progress-bar-container {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.file-progress-bar {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.file-progress-bar-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.file-progress-percent {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

/* ---------- 成功面板 ---------- */
.success-panel {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.success-panel.active {
    opacity: 1;
    visibility: visible;
}

.success-content {
    text-align: center;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.success-panel.active .success-content {
    transform: scale(1);
}

.success-icon {
    color: var(--accent-green);
    margin-bottom: 20px;
}

.success-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 8px;
}

.success-message {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-view-files {
    padding: 12px 24px;
    background: var(--btn-success);
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.btn-view-files:hover {
    background: var(--btn-success-hover);
}

.btn-continue-upload {
    padding: 12px 24px;
    background: var(--btn-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.btn-continue-upload:hover {
    background: var(--btn-secondary-hover);
}
