/*
 * 前端样式表
 * 提供“获取报价”表单的布局和美化效果
 */
.rfq-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    max-width: 960px;
    /* 在默认布局及古腾堡区块中均水平居中 */
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 当作为古腾堡区块使用时，根据 align 类控制对齐 */
.wp-block-rf-quote-form-block.alignleft .rfq-container {
    margin-left: 0;
    margin-right: auto;
}
.wp-block-rf-quote-form-block.alignright .rfq-container {
    margin-left: auto;
    margin-right: 0;
}
.wp-block-rf-quote-form-block.aligncenter .rfq-container,
.wp-block-rf-quote-form-block .rfq-container {
    /* 默认和 aligncenter 均居中 */
    margin-left: auto;
    margin-right: auto;
}

/* 左侧信息区域 */
.rfq-info {
    flex: 1 1 40%;
    padding: 40px 30px;
    background: #f7f8fa;
    box-sizing: border-box;
}
.rfq-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.2;
    color: #333;
}
.rfq-intro {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 24px;
}
.rfq-learn-more {
    display: inline-block;
    padding: 12px 24px;
    background: #0099e5;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}
.rfq-learn-more:hover {
    background: #007acc;
    color: #fff;
}

/* 左侧自定义图片 */
.rfq-info img.rfq-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

/* 右侧表单区域 */
.rfq-form-wrap {
    flex: 1 1 60%;
    padding: 40px 30px;
    background: #fff;
    box-sizing: border-box;
    border-left: 1px solid #e5e5e5;
}
.rfq-form {
    width: 100%;
}
.rfq-field {
    margin-bottom: 18px;
}
.rfq-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
.rfq-field input,
.rfq-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.rfq-field textarea {
    resize: vertical;
}
.rfq-actions {
    margin-top: 10px;
}
.rfq-submit {
    background: #0099e5;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.rfq-submit:hover {
    background: #007acc;
}

/* 提交时的动画状态 */
.rfq-submit.submitting {
    opacity: 0.6;
    cursor: not-allowed;
}
.rfq-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #237804;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.rfq-error {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #a8071a;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* 表单字段焦点状态 */
.rfq-field input:focus,
.rfq-field textarea:focus {
    outline: none;
    border-color: #0099e5;
    box-shadow: 0 0 0 2px rgba(0, 153, 229, 0.2);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .rfq-container {
        flex-direction: column;
    }
    .rfq-info,
    .rfq-form-wrap {
        flex: 1 1 100%;
        border-left: none;
    }
    .rfq-info {
        border-bottom: 1px solid #e5e5e5;
    }
}