/* ============================================================
   wpcf7.css — Contact Form 7 表单公共样式（全站通用）
   从 common.css / framework.css 抽离，覆盖：
   - CF7 结构元素（隐藏域、屏幕阅读器响应区、提交结果输出区）
   - 字段包装层布局
   - 校验错误状态（invalid）提示浮层与红框
   注意：screen-reader-response 位于 <form> 之外（div.wpcf7 直接子级），
   不能用 form 后代选择器。
   ============================================================ */

/* ---------- CF7 结构元素 ---------- */

/* 隐藏域 fieldset 不占位 */
form .hidden-fields-container {
    display: none;
}

/* 屏幕阅读器响应区（校验错误汇总）：视觉隐藏但保留无障碍访问 */
.wpcf7 .screen-reader-response {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 提交结果输出区：去间距、去 CF7 默认白色边框盒，避免撑开布局 */
form .wpcf7-response-output {
    margin: 0.18rem 0 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #1E9E4A !important;
    font-weight: 500 !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 0.16rem !important;
    font-style: normal !important;
    line-height: normal !important;
}

/* ---------- 字段包装层 ---------- */

form .wpcf7-form-control-wrap {
    display: block;
    position: relative;
}

/* ---------- 校验错误状态（wpcf7 invalid）----------
   错误提示浮层显示在输入框下方，不占布局空间，避免撑破栅格 */
form .wpcf7-not-valid-tip {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 2;
    margin: 0;
    padding: 0.03rem 0 0;
    background: transparent;
    border: none;
    color: #E02020;
    font-family: "Inter", sans-serif;
    font-size: 0.12rem;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
}

/* 错误字段红框提示 */
form .wpcf7-not-valid {
    border-color: #E02020 !important;
}

/* ---------- H5 ---------- */
html[data-mode="h5"] form .wpcf7-not-valid-tip {
    font-size: 0.2rem;
    padding-top: 0.05rem;
}

html[data-mode="h5"] form .wpcf7-response-output {
    font-size: 0.22rem;
}
