/* RFQ 页面样式 */

.rfq-container {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    background-color: #f5f5f5;
}

.rfq-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.rfq-form-container {
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: none;
    padding: 40px 50px;
}

/* 表单标题 */
.rfq-header {
    margin-bottom: 50px;
    text-align: left;
}

.rfq-title {
    font-size: 30px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 17px;
    line-height: 1.2;
}

.rfq-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 0;
    line-height: 1.5;
}

/* 分区标题 */
.rfq-section {
    margin-bottom: 45px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 45px;
    padding-bottom: 0;
    border-bottom: none;
    line-height: 1.2;
}

/* 表单组 */
.form-group {
    margin-bottom: 27px;
}

/* 左右布局的表单行 */
.form-group.form-row {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.form-group.form-row .form-label {
    flex: 0 0 160px;
    margin-bottom: 0;
    padding-top: 13px;
    text-align: right;
}

.form-group.form-row .form-control,
.form-group.form-row .form-select,
.form-group.form-row .input-group,
.form-group.form-row .lead-time-group,
.form-group.form-row textarea.form-control {
    flex: 1;
    max-width: 703px;
}

.form-group.form-row textarea.form-control {
    margin-top: 0;
}

/* 特定宽度的输入框 */
.form-group.form-row .form-control.input-medium {
    max-width: 400px;
}

.form-group.form-row .form-select.select-medium {
    max-width: 300px;
}

.form-group.form-row .form-select.select-small,
.form-group.form-row .form-control.input-small {
    max-width: 201px;
}

.form-label {
    display: block;
    font-size: 16px;
    color: #333333;
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.2;
}

.form-label.required::before {
    content: "*";
    color: #ff0000;
    margin-right: 5px;
    font-size: 20px;
    font-weight: 700;
    vertical-align: middle;
    line-height: 1;
}

.form-control {
    width: 100%;
    height: 41px;
    padding: 10px 17px;
    font-size: 16px;
    color: #333333;
    border: 1px solid #999999;
    border-radius: 0;
    transition: border-color 0.3s;
    background-color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: none;
}

.form-control::placeholder {
    color: #999999;
    font-size: 16px;
}

.form-control.is-invalid {
    border-color: #ff0000;
}

textarea.form-control {
    height: auto;
    min-height: 105px;
    resize: vertical;
    line-height: 1.6;
    padding: 14px 17px;
}

.form-select {
    width: 100%;
    height: 41px;
    padding: 10px 40px 10px 17px;
    font-size: 16px;
    color: #333333;
    border: 1px solid #999999;
    border-radius: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath fill='%23333' d='M0 0l6 6 6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 17px center;
    background-size: 12px 6px;
    background-color: #ffffff;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: none;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 22px;
    align-items: center;
    max-width: 703px;
}

.input-group .form-control {
    flex: 1;
    max-width: none;
}

.input-group .form-select {
    flex: 0 0 auto;
    min-width: 201px;
    max-width: 201px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 16px;
    color: #333333;
    background-color: transparent;
    border: none;
    border-radius: 0;
    line-height: 1;
}

.unit-select,
.currency-select {
    min-width: 201px;
    max-width: 201px;
}

/* Lead Time 组 */
.lead-time-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.lead-time-group span {
    font-size: 16px;
    color: #333333;
    line-height: 1;
    white-space: nowrap;
}

.lead-time-input {
    width: 137px !important;
    min-width: 137px !important;
    max-width: 137px !important;
    flex: 0 0 137px !important;
}

/* 文件上传 */
.file-upload-wrapper {
    flex: 1;
    max-width: 703px;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1px dashed #999999;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fafafa;
    margin-bottom: 0;
}

.file-upload-label:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary-lightest);
}

.file-upload-label i.bi-paperclip {
    font-size: 20px;
    color: var(--color-primary);
}

.file-upload-label .upload-text {
    font-size: 16px;
    color: var(--color-primary);
    line-height: 1;
    font-weight: 500;
}

.file-upload-label .upload-text #file-count {
    color: var(--color-primary);
}

.file-upload-label .upload-help {
    font-size: 16px;
    color: var(--color-primary);
    margin-left: auto;
    cursor: help;
}

.file-upload-input {
    display: none;
}

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

.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.file-list-item .file-icon {
    font-size: 24px;
    color: #ff6b6b;
    flex-shrink: 0;
}

.file-list-item .file-name {
    font-size: 14px;
    color: #333333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-list-item .file-status {
    font-size: 18px;
    color: #52c41a;
    flex-shrink: 0;
}

.file-list-item .file-delete {
    font-size: 14px;
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.3s;
}

.file-list-item .file-delete:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* 旧的文件预览样式保留作为备用 */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.file-item {
    position: relative;
    width: 120px;
    height: 120px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
}

.file-item img {
    max-width: 100%;
    max-height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.file-item i {
    font-size: 40px;
    color: #999999;
}

.file-item .file-name {
    font-size: 12px;
    color: #666666;
    text-align: center;
    margin-top: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.file-item .btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ff4444;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-item .btn-remove:hover {
    background-color: #cc0000;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 50px;
    padding-top: 0;
    border-top: none;
}

.btn-submit {
    min-width: 171px;
    height: 45px;
    padding: 11px 60px;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    background: linear-gradient(-90deg, var(--color-primary) 0%, var(--color-primary) 0%, var(--color-primary-dark) 100%, var(--color-primary-dark) 100%);
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.btn-submit:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 164, 137, 0.3);
}

.btn-reset {
    min-width: 171px;
    height: 45px;
    padding: 11px 60px;
    font-size: 16px;
    font-weight: 400;
    color: #666666;
    background-color: #ffffff;
    border: 1px solid #999999;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.btn-reset:hover {
    background-color: #f5f5f5;
    border-color: #666666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .rfq-form-container {
        padding: 30px 20px;
    }

    .rfq-title {
        font-size: 24px;
    }

    .rfq-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 18px;
    }

    /* 移动端改为上下布局 */
    .form-group.form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-group.form-row .form-label {
        flex: none;
        padding-top: 0;
        margin-bottom: 10px;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group .form-select {
        width: 100%;
    }

    .lead-time-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .lead-time-input {
        width: 100% !important;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-reset {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .rfq-container {
        padding: 20px 0;
    }

    .rfq-form-container {
        padding: 20px 15px;
    }

    .rfq-title {
        font-size: 20px;
    }

    .file-item {
        width: 100px;
        height: 100px;
    }
}
