/* ====== 咨询报价弹窗样式 ====== */

/* 遮罩层 - 默认隐藏 */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: quoteFadeIn 0.25s ease;
}

@keyframes quoteFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 弹窗内容容器 - 使用统一padding，避免子元素溢出圆角边界 */
.quote-modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0 30px 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: quoteSlideIn 0.3s ease;
}

@keyframes quoteSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 关闭按钮 */
.quote-modal-close {
    position: absolute;
    right: 16px;
    top: 14px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s ease, transform 0.2s ease;
}

.quote-modal-close:hover,
.quote-modal-close:focus {
    color: #0066cc;
    transform: rotate(90deg);
    text-decoration: none;
}

/* 弹窗头部 - 左右padding已由父容器提供，这里只留上下 */
.quote-modal-header {
    padding: 28px 0 10px;
    text-align: center;
    border-bottom: none;
    width: 100%;
    box-sizing: border-box;
}

.quote-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

/* 提示文字 - 去掉左右margin，父容器已有统一padding */
.quote-modal-tip {
    margin: 0;
    padding: 10px 0 6px;
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.quote-modal-tip:last-of-type {
    color: #d9534f;
    font-size: 13px;
    padding-top: 0;
    padding-bottom: 12px;
}

/* 表单 - 去掉左右padding，父容器已提供 */
#modal-form {
    padding: 10px 0 0;
    width: 100%;
    box-sizing: border-box;
}

/* 表单字段 - 强制宽度约束 */
.form-field {
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.form-row .form-field {
    flex: 1 1 0;
    margin-bottom: 0;
    min-width: 0;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background-color: #fafafa;
    transition: all 0.2s ease;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.form-field input[type="text"]:focus,
.form-field input[type="tel"]:focus,
.form-field textarea:focus {
    border-color: #0066cc;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #aaa;
}

.form-field textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* 按钮组 */
.button-group {
    margin-top: 18px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.submit-btn {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 13px 20px;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.3);
    box-sizing: border-box;
}

.submit-btn:hover {
    background: linear-gradient(90deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ============== 响应式 ============== */
@media (max-width: 768px) {
    .quote-modal-content {
        margin: 10% auto;
        width: 94%;
        max-width: 420px;
        padding: 0 20px 24px;
        border-radius: 10px;
    }

    .quote-modal-header {
        padding: 24px 0 8px;
    }

    .quote-modal-title {
        font-size: 19px;
    }

    .quote-modal-tip {
        font-size: 13px;
    }

    #modal-form {
        padding: 8px 0 0;
    }

    .form-row {
        flex-direction: column;
        gap: 14px;
    }

    .form-field input[type="text"],
    .form-field input[type="tel"],
    .form-field textarea {
        padding: 11px 14px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .quote-modal-close {
        right: 12px;
        top: 10px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .quote-modal-content {
        margin: 8% auto;
        width: 96%;
        padding: 0 16px 20px;
    }

    .quote-modal-header {
        padding: 22px 0 6px;
    }

    .quote-modal-title {
        font-size: 17px;
    }

    .quote-modal-tip {
        font-size: 12px;
    }

    #modal-form {
        padding: 6px 0 0;
    }

    .form-field {
        margin-bottom: 12px;
    }

    .form-row {
        margin-bottom: 12px;
        gap: 12px;
    }
}
