/**
 * 文件作用：询盘表单区块：定义展示样式。插件后备版，可由主题同名组件覆盖。
 */
/* ajax-contact-form */
.ajax-contact-form input:-webkit-autofill,
.ajax-contact-form input:-webkit-autofill:focus,
.ajax-contact-form input:-webkit-autofill:hover {
    background-color: #fff !important;
    color: #212529 !important;
    box-shadow: 0 0 0px 1000px #fff inset !important;
}
.ajax-contact-form .form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: transparent;
}
.ajax-contact-form button[type="submit"].disabled,
.ajax-contact-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}
/* 仅「提交中」显示转圈，成功态 disabled 不再转圈 */
.ajax-contact-form button[type="submit"].is-submitting::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: loading 1s linear infinite;
}
.ajax-contact-form:has(button[type="submit"].is-submitting) {
    pointer-events: none;
}
.ajax-contact-form:has(button[type="submit"].is-submitting) input,
.ajax-contact-form:has(button[type="submit"].is-submitting) textarea {
    opacity: 0.6;
    cursor: not-allowed;
}
.ajax-contact-form.submitted {
    pointer-events: none;
}
.ajax-contact-form.submitted input,
.ajax-contact-form.submitted textarea,
.ajax-contact-form.submitted button {
    opacity: 0.6;
    cursor: not-allowed;
}
.ajax-contact-form.submitted button[type="submit"] {
    opacity: 1;
}
#globalContactModal .ajax-contact-form.submitted .alert-success {
    display: block !important;
    font-weight: 600;
}
#globalContactModal .modal-header .btn-close {
    pointer-events: auto;
    z-index: 2;
}
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Avoid default GET submissions when JavaScript is unavailable. */
html.no-js .ajax-contact-form { display: none; }
