/* ============================================================
   request-quote-pro — UI 重构版样式
   设计还原自 content/Request a Quote.html 的参考稿
   ============================================================ */

.rqp-root,
.rqp-root *,
.rqp-root *::before,
.rqp-root *::after {
    box-sizing: border-box;
}

.rqp-root[hidden] {
    display: none;
}

/* ---------- 遮罩 / 定位 ---------- */
.rqp-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0px, 4vw, 32px);
    background: rgba(20, 26, 33, 0.55);
    backdrop-filter: blur(2px);
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-y: auto;
}

/* 内联（短代码）模式：去掉遮罩与固定定位 */
.rqp-root.rqp-inline {
    display: block;
}
.rqp-root.rqp-inline .rqp-overlay {
    position: static;
    inset: auto;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    z-index: auto;
}
.rqp-root.rqp-inline .rqp-card {
    animation: none;
    box-shadow: 0 10px 40px rgba(15, 20, 28, 0.14);
}
.rqp-root.rqp-inline .rqp-close {
    display: none;
}

/* ---------- 卡片 ---------- */
.rqp-card {
    width: 760px;
    max-width: 100%;
    max-height: min(92vh, 800px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 20, 28, 0.45);
    animation: rqp-pop 0.35s cubic-bezier(0.2, 0.8, 0.25, 1) both;
    color: #2b3441;
    line-height: 1.4;
    text-align: left;
}

/* ---------- 头部 ---------- */
.rqp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2b3441;
    padding: 11px 26px;
}
.rqp-head-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.rqp-head-title h2 {
    margin: 0;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 21px;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.rqp-subtitle {
    font-size: 12.5px;
    color: #9aa6b4;
    font-weight: 500;
}
.rqp-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.07);
    color: #c4ccd6;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.rqp-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* ---------- 主体网格 ---------- */
.rqp-body {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* ---------- 表单列 ---------- */
.rqp-form {
    padding: 26px 26px 22px 26px;
    margin: 0;
}
.rqp-row {
    margin-bottom: 14px;
}
.rqp-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.rqp-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.rqp-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #2b3441;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}
.rqp-req {
    color: #e07a2f;
}
.rqp-hint {
    color: #9aa3ad;
    font-weight: 500;
}

.rqp-field input,
.rqp-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 13.5px;
    color: #2b3441;
    background: #ffffff;
    border: 1.5px solid #dce0e5;
    border-radius: 9px;
    outline: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rqp-field textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}
.rqp-field input:focus,
.rqp-field textarea:focus {
    border-color: #c98a4e;
    box-shadow: 0 0 0 3px rgba(224, 122, 47, 0.12);
    background: #ffffff;
}
.rqp-field input.rqp-invalid,
.rqp-field textarea.rqp-invalid {
    background: #fdf5f5;
    border-color: #e6a3a3;
}

/* ---------- 行内错误 ---------- */
.rqp-error {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: #d23f3f;
    font-size: 11.5px;
    font-weight: 500;
    animation: rqp-fade 0.2s both;
}
.rqp-error.rqp-show {
    display: flex;
}
.rqp-error-ico {
    font-size: 12px;
    line-height: 1;
}

/* ---------- 文件上传 ---------- */
.rqp-uploader {
    margin-bottom: 16px;
}
.rqp-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    border: 1.5px dashed #cdd2d8;
    border-radius: 11px;
    background: #fbfaf8;
    transition: border-color 0.15s, background 0.15s;
}
.rqp-dropzone:focus {
    outline: none;
    border-color: #c98a4e;
}
.rqp-dropzone.rqp-dragging {
    border-color: #c98a4e;
    background: rgba(224, 122, 47, 0.06);
}
.rqp-dropzone.rqp-full {
    opacity: 0.55;
    pointer-events: none;
    border-color: #dcdfe3;
}
.rqp-drop-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c06a26;
}
.rqp-drop-text {
    font-size: 12.5px;
    color: #5a6675;
    font-weight: 500;
}
.rqp-drop-accent {
    color: #c06a26;
    font-weight: 600;
}
.rqp-drop-meta {
    font-size: 11px;
    color: #9aa3ad;
}

.rqp-progress {
    width: 100%;
    height: 6px;
    margin-top: 8px;
    appearance: none;
    border: none;
    border-radius: 4px;
    background: #eceef1;
    overflow: hidden;
}
.rqp-progress[hidden] {
    display: none;
}
.rqp-progress::-webkit-progress-bar {
    background: #eceef1;
    border-radius: 4px;
}
.rqp-progress::-webkit-progress-value {
    background: #f0a12e;
    border-radius: 4px;
}
.rqp-progress::-moz-progress-bar {
    background: #f0a12e;
}

.rqp-file-error {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    color: #d23f3f;
    font-size: 11.5px;
    font-weight: 500;
    animation: rqp-shake 0.35s both;
}
.rqp-file-error[hidden] {
    display: none;
}

.rqp-file-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}
.rqp-file-list:empty {
    margin-top: 0;
}
.rqp-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px 7px 8px;
    background: #f6f7f8;
    border: 1px solid #e7eaee;
    border-radius: 9px;
    animation: rqp-chip 0.22s both;
}
.rqp-file-icon {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #fff;
    border: 1px solid #e3e7ec;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.rqp-file-meta {
    flex: 1;
    min-width: 0;
}
.rqp-file-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #2b3441;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rqp-file-size {
    font-size: 10.5px;
    color: #9aa3ad;
}
.rqp-file-remove {
    flex: none;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9aa3ad;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.rqp-file-remove:hover {
    background: #fdeaea;
    color: #d23f3f;
}

/* ---------- 表单整体提示 ---------- */
.rqp-form-message {
    margin-top: 14px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12.5px;
}
.rqp-form-message[hidden] {
    display: none;
}
.rqp-form-message.rqp-msg-success {
    background: #e8efe9;
    color: #2f6e46;
    border: 1px solid #cfe2d6;
}
.rqp-form-message.rqp-msg-error {
    background: #fdeaea;
    color: #a3343a;
    border: 1px solid #f1c9cc;
}
.rqp-form-message.rqp-msg-info {
    background: #eef3f8;
    color: #3a5a7a;
    border: 1px solid #d4e2ef;
}

/* ---------- 右侧说明栏 ---------- */
.rqp-rail {
    background: #f6f5f2;
    border-left: 1px solid #ecebe6;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
}
.rqp-rail h3 {
    margin: 0 0 16px 0;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 16px;
    color: #2b3441;
}
.rqp-benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rqp-benefit {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.5;
    color: #4a5564;
}
.rqp-check {
    flex: none;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #e8efe9;
    color: #3f8a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}
.rqp-privacy {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e7e5de;
}
.rqp-privacy p {
    margin: 0;
    font-style: italic;
    font-size: 11.5px;
    line-height: 1.55;
    color: #8a8578;
}

/* ---------- 底部 ---------- */
.rqp-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 26px;
    border-top: 1px solid #eef0f2;
    background: #fbfbfa;
}
.rqp-contact {
    font-size: 11.5px;
    color: #7a828c;
    line-height: 1.4;
}
.rqp-contact a {
    color: #2b3441;
    font-weight: 600;
    text-decoration: none;
}
.rqp-dot {
    color: #c9cdd2;
}
.rqp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 12px 22px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #2b2410;
    background: #f0a12e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(240, 161, 46, 0.32);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}
.rqp-submit:hover:not(:disabled) {
    /* 显式声明背景，压住主题全局 button:hover 的灰色覆盖 */
    background: #f4a83d;
    color: #2b2410;
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(240, 161, 46, 0.42);
}
.rqp-submit:disabled {
    cursor: not-allowed;
}
/* 提交中：保持品牌橙（略加深），不再用半透明洗淡 */
.rqp-submit.rqp-loading {
    background: #e0922a;
    box-shadow: 0 6px 16px rgba(224, 146, 42, 0.32);
}
.rqp-submit.rqp-sent {
    color: #ffffff;
    background: #3f8a5a;
    box-shadow: 0 6px 16px rgba(63, 138, 90, 0.3);
}
.rqp-submit.rqp-sent:hover {
    background: #46996a;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(63, 138, 90, 0.36);
}

/* ---------- 响应式（< 720px） ---------- */
@media screen and (max-width: 719px) {
    .rqp-body {
        grid-template-columns: 1fr;
    }
    .rqp-rail {
        border-left: none;
        border-top: 1px solid #ecebe6;
        order: -1;
        padding: 18px 22px;
    }
    .rqp-foot {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }
    .rqp-submit {
        width: 100%;
    }
}

/* ---------- 动画 ---------- */
@keyframes rqp-pop {
    0%   { opacity: 0; transform: translateY(14px) scale(0.985); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rqp-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes rqp-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
@keyframes rqp-chip {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
