/* 文件上传样式 */

/* 上传进度条 */
.upload-progress {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.upload-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.file-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

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

/* 文件拖拽区域 */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-color, 0.05);
}

.file-drop-icon {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin: 0 auto 16px;
}

.file-drop-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.file-drop-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 文件列表 */
.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-icon svg {
    width: 16px;
    height: 16px;
    color: white;
}

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

.file-name-full {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

/* 头像上传 */
.avatar-upload {
    position: relative;
    display: inline-block;
}

.avatar-current {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-current:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.avatar-upload:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay-text {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* 附件上传区域 */
.attachment-upload {
    margin-top: 16px;
}

.attachment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* margin-bottom: 12px; */
}

.attachment-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.attachment-add-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
}

.attachment-list {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    max-height: 200px;
    overflow-y: auto;
    overflow: hidden;
}

.attachment-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
}

.attachment-item:last-child {
    border-bottom: none;
}

.attachment-icon {
    width: 24px;
    height: 24px;
    /* background: var(--text-tertiary); */
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.attachment-icon svg {
    width: 12px;
    height: 12px;
    color: white;
}

.attachment-name {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-size {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-right: 8px;
}

.attachment-remove {
    padding: 2px 4px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.attachment-remove:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* 上传容器 */
.upload-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

/* 响应式设计 */
@media (max-width: 1023px) {
    .file-drop-zone {
        padding: 24px 16px;
    }
    
    .file-drop-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 12px;
    }
    
    .upload-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .avatar-current {
        width: 60px;
        height: 60px;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .file-drop-zone {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .file-drop-zone:hover,
[data-theme="dark"] .file-drop-zone.drag-over {
    background: rgba(96, 165, 250, 0.1);
} 