/* =========================================================
 * 齐轩通信 - 联系表单 & 弹窗
 * ========================================================= */

/* ---------- 弹窗容器 ---------- */
.qx-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
.qx-modal.is-open { display: flex; }

.qx-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    animation: qxFadeIn .2s ease;
}

.qx-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 28px 28px 24px;
    animation: qxSlideUp .25s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.qx-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: all .2s;
}
.qx-modal-close:hover { background: #f5f5f5; color: var(--qx-primary, #fc5952); }

.qx-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--qx-text, #333);
}

body.qx-modal-open { overflow: hidden; }

@keyframes qxFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes qxSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 表单 ---------- */
.qx-contact-form { display: block; }

.qx-form-row { margin-bottom: 14px; }

.qx-form-row label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--qx-text, #333);
    margin-bottom: 6px;
}

.qx-required { color: #fc5952; }

.qx-form-row input[type="text"],
.qx-form-row input[type="tel"],
.qx-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: .95rem;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    transition: all .2s;
    box-sizing: border-box;
}

.qx-form-row input:focus,
.qx-form-row textarea:focus {
    background: #fff;
    border-color: var(--qx-primary, #fc5952);
    box-shadow: 0 0 0 3px rgba(252, 89, 82, .12);
}

.qx-form-row textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

/* ---------- 提交按钮 ---------- */
.qx-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.qx-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--qx-primary, #fc5952);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all .25s;
}
.qx-contact-submit:hover { background: var(--qx-primary-dark, #e0483f); transform: translateY(-1px); }
.qx-contact-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.qx-form-result { font-size: .9rem; color: #666; }
.qx-form-result.is-success { color: #0a8f3d; font-weight: 600; }
.qx-form-result.is-error   { color: #d63638; font-weight: 600; }

/* ---------- 联系我们页面里的表单（非弹窗） ---------- */
.qx-contact-form[data-context="page"] {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .qx-modal-dialog { padding: 22px 18px 18px; margin: 10px; }
    .qx-modal-title  { font-size: 1.1rem; }
    .qx-contact-form[data-context="page"] { padding: 20px; }
    .qx-contact-submit { width: 100%; }
}