/* ==========================================================================
   拖拽上传和文件进度样式
   ========================================================================== */

/* 文件上传进度 */
.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;
    }
}

/* Toast提示样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 200px;
    max-width: 80%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    animation: slideUpFade 0.3s ease-out;
}

.toast-success {
    background: var(--primary-color);
    color: white;
}

.toast-warning {
    background: #ff9500;
    color: white;
}

.toast-error {
    background: #fa5151;
    color: white;
}

.toast-info {
    background: #10aeff;
    color: white;
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}