/* ==========================================================================
   上传和拖拽功能
   ========================================================================== */
/**
 * 文件上传相关样式
 * @selector .upload-progress-container - 上传进度容器
 * @selector .upload-progress-bar - 上传进度条
 * @selector .upload-progress - 上传进度指示
 * @selector .upload-progress-text - 上传进度文本
 * @selector .upload-status - 上传状态
 * @selector .drag-over - 拖拽上传高亮状态
 */

/* 文件上传进度 */
.upload-progress-container {
    margin-top: 8px;
    position: relative;
}

.upload-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.upload-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-progress-text {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    text-align: center;
}

.upload-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.upload-status.error {
    color: #fa5151;
}

/* 拖拽上传样式 */
.drag-over {
    background: rgba(7, 193, 96, 0.1) !important;
    border: 2px dashed var(--primary-color) !important;
    position: relative;
}

.drag-over::before {
    content: '📁 拖拽文件到这里上传';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(7, 193, 96, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
    animation: fadeInScale 0.3s ease-out;
}

#msg.drag-over::before {
    font-size: 14px;
    padding: 8px 16px;
}

#input.drag-over::before {
    font-size: 14px;
    padding: 8px 16px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 移动端拖拽优化 */
@media (max-width: 768px) {
    .drag-over::before {
        font-size: 14px;
        padding: 10px 20px;
        max-width: 80%;
        text-align: center;
    }
    
    /* 移动端文件消息样式调整 */
    .file-message {
        min-width: 250px !important;
        max-width: 280px !important;
    }
    
    /* 移动端上传进度调整 */
    .upload-progress-container {
        margin-top: 6px;
    }
    
    .upload-progress-bar {
        height: 3px;
    }
    
    .upload-progress-text {
        font-size: 10px;
    }
    
    .upload-status {
        font-size: 11px;
    }
}