/**
 * 询盘表单增强样式
 * @version 1.0.0
 */

/* 验证消息样式 */
.form-validation-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: none;
}

.form-validation-message.error {
    color: #ef4444;
    display: block;
}

.form-validation-message.success {
    color: #10b981;
    display: block;
}

.form-control.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.form-control.success {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
}

/* 文件上传样式 */
.file-upload-modern {
    margin-top: 0.5rem;
}

.file-input-hidden {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #3470ff;
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    border: none;
}

.file-upload-btn:hover {
    background: #2558cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 112, 255, 0.3);
}

.file-list-modern {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.file-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateX(4px);
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3470ff;
    color: white;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.875rem;
    color: #6b7280;
}

.file-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #ef4444;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.file-remove:hover {
    background: #fef2f2;
    transform: scale(1.1);
}

/* 提示消息样式 */
.alert-success {
    background: #f0fdf4;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success i {
    font-size: 1.25rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error i {
    font-size: 1.25rem;
}

/* 深色模式适配 */
.dark .file-item {
    background: #1f2937;
    border-color: #374151;
}

.dark .file-item:hover {
    background: #111827;
    border-color: #4b5563;
}

.dark .file-name {
    color: #f9fafb;
}

.dark .file-size {
    color: #9ca3af;
}

.dark .file-remove:hover {
    background: #7f1d1d;
}

.dark .form-control.error {
    background-color: #7f1d1d;
    border-color: #ef4444;
}

.dark .form-control.success {
    background-color: #064e3b;
    border-color: #10b981;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-item {
        padding: 0.75rem;
    }
    
    .file-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
    
    .file-name {
        font-size: 0.875rem;
    }
    
    .file-size {
        font-size: 0.75rem;
    }
    
    .file-upload-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-item {
    animation: slideIn 0.3s ease;
}

.form-validation-message {
    animation: slideIn 0.2s ease;
}

