/* ===== 独立表单样式（命名空间 .custom-message-form） ===== */
.custom-message-form {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px 28px 36px;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

/* 重置列表 */
.custom-message-form ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-message-form ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 22px;
    gap: 16px;
    flex-wrap: wrap;
}

/* 标签 */
.custom-message-form ul li h4 {
    min-width: 88px;
    font-weight: 500;
    font-size: 15px;
    color: #1e293b;
    line-height: 44px;  /* 与输入框高度对齐 */
    margin: 0;
    flex-shrink: 0;
}

/* 必填星号 */
.custom-message-form ul li h4.xh::after {
    content: " *";
    color: #ef4444;
    font-weight: 600;
}

/* 输入框容器 */
.custom-message-form .msg_ipt12,
.custom-message-form .msg_ipt2 {
    flex: 1;
    min-width: 200px;
}

/* 验证码行特殊处理 */
.custom-message-form .msg_ipt2 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-message-form .c_yzm {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

/* 文本框 */
.custom-message-form .textborder {
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #fafbfc;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    width: 100%;
    max-width: 150px;  /* 验证码输入框宽度 */
}

.custom-message-form .textborder:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.custom-message-form .textborder::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* 验证码图片 */
.custom-message-form .yzm_img img {
    display: block;
    height: 44px;
    width: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    cursor: pointer;
    transition: opacity 0.2s;
}

.custom-message-form .yzm_img img:hover {
    opacity: 0.8;
}

/* 文本域 */
.custom-message-form .areatext {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #fafbfc;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    outline: none;
    line-height: 1.6;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.custom-message-form .areatext:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.custom-message-form .areatext::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

/* 按钮区域 */
.custom-message-form .msg_btn {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.custom-message-form .msg_btn input[type="submit"],
.custom-message-form .msg_btn input[type="reset"] {
    height: 44px;
    padding: 0 34px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 1px;
}

.custom-message-form .msg_btn input[type="submit"] {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.custom-message-form .msg_btn input[type="submit"]:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.custom-message-form .msg_btn input[type="reset"] {
    background: #f1f5f9;
    color: #475569;
}

.custom-message-form .msg_btn input[type="reset"]:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ===== 响应式设计 ===== */
@media screen and (max-width: 640px) {
    .custom-message-form {
        padding: 22px 16px 28px;
        border-radius: 12px;
    }

    .custom-message-form ul li {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 18px;
    }

    .custom-message-form ul li h4 {
        min-width: unset;
        line-height: 1.5;
        font-size: 14px;
        margin-bottom: 2px;
    }

    .custom-message-form .msg_ipt12,
    .custom-message-form .msg_ipt2 {
        min-width: unset;
        width: 100%;
    }

    /* 验证码行：输入框+图片保持同行 */
    .custom-message-form .c_yzm {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .custom-message-form .textborder {
        max-width: 120px;
        flex: 1;
        height: 40px;
    }

    .custom-message-form .yzm_img img {
        height: 40px;
    }

    .custom-message-form .areatext {
        min-height: 80px;
    }

    .custom-message-form .msg_btn {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .custom-message-form .msg_btn input[type="submit"],
    .custom-message-form .msg_btn input[type="reset"] {
        width: 100%;
        justify-content: center;
        padding: 0 20px;
        height: 48px;
    }
}

/* 小屏手机（< 400px）验证码换行 */
@media screen and (max-width: 400px) {
    .custom-message-form .c_yzm {
        flex-wrap: wrap;
    }

    .custom-message-form .textborder {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .custom-message-form .yzm_img img {
        height: 38px;
    }
}