/* ===========================================
   Modal Base Styles - 模态框基础样式
   =========================================== */

/* 模态框遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 模态框容器 */
.modal-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateX(-100%) scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-overlay.active .modal-container {
    transform: translateX(0) scale(1);
}

/* 模态框关闭时的滑出动画 */
.modal-overlay.closing .modal-container {
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

/* ===========================================
   Modal Header - 模态框头部
   =========================================== */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid #eeeeee;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #666666;
}

/* ===========================================
   Modal Body - 模态框主体
   =========================================== */

.modal-body {
    padding: 0;
}

/* ===========================================
   Inquiry Form Container - 询盘表单容器
   =========================================== */

.inquiry-form-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
    background: #ffffff;
}

.inquiry-form-wrapper {
    max-width: 100%;
}

/* ===========================================
   Inquiry Form Header - 询盘表单头部
   =========================================== */

.inquiry-form-header {
    text-align: center;
    margin-bottom: 25px;
}

.inquiry-form-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.inquiry-form-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* ===========================================
   Inquiry Form Layout - 询盘表单布局
   =========================================== */

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inquiry-form-group {
    display: flex;
    flex-direction: column;
}

.inquiry-form-group label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* ===========================================
   Inquiry Form Input Elements - 询盘表单输入元素
   =========================================== */

.inquiry-form-group input,
.inquiry-form-group select,
.inquiry-form-group textarea {
    padding: 10px 14px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.inquiry-form-group input:focus,
.inquiry-form-group select:focus,
.inquiry-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Select 下拉框样式 */
.inquiry-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Textarea 文本域样式 */
.inquiry-form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ===========================================
   Inquiry Form Checkbox - 询盘表单复选框
   =========================================== */

.inquiry-checkbox-group {
    position: relative;
    margin-top: 4px;
}

.inquiry-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #2c3e50;
    gap: 10px;
    padding: 2px 0;
}

.inquiry-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.inquiry-checkmark {
    position: relative;
    height: 16px;
    width: 16px;
    background-color: #ffffff;
    border: 2px solid #e1e8ed;
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.inquiry-checkbox-label:hover .inquiry-checkmark {
    border-color: #3498db;
}

.inquiry-checkbox-label input:checked ~ .inquiry-checkmark {
    background-color: #3498db;
    border-color: #3498db;
}

.inquiry-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.inquiry-checkbox-label input:checked ~ .inquiry-checkmark:after {
    display: block;
}

.inquiry-checkbox-text {
    flex: 1;
}

.inquiry-privacy-link {
    color: #3498db;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.inquiry-privacy-link:hover {
    text-decoration: underline;
}

/* ===========================================
   Inquiry Form Error Messages - 询盘表单错误信息
   =========================================== */

.inquiry-error-message {
    color: #e74c3c;
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.inquiry-error-message.show {
    display: block;
}

/* Error field styles */
.inquiry-form-group input.error,
.inquiry-form-group select.error,
.inquiry-form-group textarea.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
    background-color: #fdf2f2 !important;
}

.inquiry-form-group input.error:focus,
.inquiry-form-group select.error:focus,
.inquiry-form-group textarea.error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
    outline: none !important;
}

/* Error message styles */
.error-message {
    animation: slideInError 0.3s ease-out;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General error message at form top */
.error-message.general-error {
    animation: slideInError 0.4s ease-out;
    border-left: 4px solid #e74c3c;
}

/* Privacy error specific styles */
.privacy-error-message {
    border-left: 4px solid #e74c3c;
    animation: slideInError 0.3s ease-out;
}

/* ===========================================
   Inquiry Form Buttons - 询盘表单按钮组
   =========================================== */

.inquiry-form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    justify-content: flex-end;
    align-items: center;
}

.inquiry-cancel-btn {
    background: #95a5a6;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.inquiry-cancel-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.3);
}

.inquiry-cancel-btn:active {
    transform: translateY(0);
}

.inquiry-cancel-btn i {
    font-size: 0.85rem;
}

.inquiry-submit-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.inquiry-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.inquiry-submit-btn:active {
    transform: translateY(0);
}

.inquiry-submit-btn i {
    font-size: 0.85rem;
}

/* ===========================================
   Inquiry Form Footer Text - 询盘表单底部文本
   =========================================== */

.inquiry-email-consent {
    font-size: 0.7rem;
    color: #7f8c8d;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1.3;
}

/* ===========================================
   Responsive Design - 响应式设计
   =========================================== */

/* 平板设备 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .inquiry-form-section {
        padding: 20px;
    }
    
    .inquiry-form-header {
        margin-bottom: 20px;
    }
    
    .inquiry-form-header h3 {
        font-size: 1.3rem;
    }
    
    .inquiry-form-header p {
        font-size: 0.85rem;
    }
    
    .inquiry-form {
        gap: 14px;
    }
    
    .inquiry-form-group input,
    .inquiry-form-group select,
    .inquiry-form-group textarea {
        padding: 9px 12px;
        font-size: 0.85rem;
    }
    
    .inquiry-form-group select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .inquiry-submit-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .inquiry-checkbox-label {
        font-size: 0.8rem;
    }
    
    .inquiry-email-consent {
        font-size: 0.65rem;
    }
}

/* 手机设备 */
@media (max-width: 480px) {
    .modal-container {
        width: 100%;
        margin: 10px;
        border-radius: 8px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header {
        padding: 15px 15px 10px;
    }
    
    .inquiry-form-section {
        padding: 15px;
    }
    
    .inquiry-form-header {
        margin-bottom: 18px;
    }
    
    .inquiry-form-header h3 {
        font-size: 1.2rem;
    }
    
    .inquiry-form {
        gap: 12px;
    }
    
    .inquiry-checkbox-label {
        font-size: 0.75rem;
    }
}