/* 联系表单浮动样式 */
.contact-form-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
}

/* 浮动按钮 */
.contact-float-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    z-index: 9999;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.contact-float-btn:hover {
    background: #0f0f0f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.contact-float-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.contact-float-btn i {
    font-size: 18px;
    color: #fff;
}

.contact-float-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

/* 模态框遮罩层 */
.contact-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 9997;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contact-form-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 联系表单模态框 */
.contact-form-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 480px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 60px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.contact-form-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.contact-form-wrapper {
    padding: 24px 30px 30px;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.contact-form-modal-body {
    margin-top: 0;
}

.contact-form-header {
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.contact-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f0f0f;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.contact-form-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.contact-form-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: all 0.3s;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contact-form-close:hover {
    background: #f5f5f5;
    color: #000;
}

.contact-form-close:active {
    background: #eee;
    transform: scale(0.95);
}

.contact-form-close i {
    color: inherit;
}

.contact-form {
    width: 100%;
}

/* 模态框内表单样式优化 - 紧凑美观 */
.contact-form-modal-body .contact-form {
    margin-top: 0;
}

.contact-form-modal-body .form-group {
    margin-bottom: 14px;
}

.contact-form-modal-body .form-group:last-of-type {
    margin-bottom: 0;
}


.contact-form-modal-body .input-wrapper {
    padding: 0 42px;
    height: 42px;
}

.contact-form-modal-body .input-wrapper input {
    padding: 0;
    font-size: 14px;
    height: 100%;
}

.contact-form-modal-body .input-icon {
    font-size: 15px;
    left: 14px;
}

.contact-form-modal-body .textarea-wrapper {
    padding: 12px 14px;
    min-height: 90px;
}

.contact-form-modal-body .textarea-wrapper textarea {
    min-height: 90px;
    font-size: 14px;
    resize: vertical;
    line-height: 1.5;
}

.contact-form-modal-body .contact-submit-btn {
    width: 100%;
    margin-top: 10px;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 600;
}

.contact-form-modal-body .form-message {
    margin-top: 10px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    line-height: 1.4;
}

/* 保持contact页面的原有样式 - 确保不影响 */
.contact-form-section .contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form-section .contact-form .form-group label {
    display: block; /* contact页面显示label */
}

/* 保持contact页面的原有样式 */
.contact-form-section .contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0 20px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form .input-wrapper:focus-within {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.contact-form .input-icon {
    color: #666;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.contact-form .input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 0;
    font-size: 14px;
    color: #0f0f0f;
    background: transparent;
    line-height: 1.5;
}

.contact-form .input-wrapper input::placeholder {
    color: #999;
}

.contact-form .textarea-wrapper {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form .textarea-wrapper:focus-within {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.contact-form .textarea-wrapper textarea {
    width: 100%;
    border: none;
    outline: none;
    padding: 0;
    font-size: 14px;
    color: #0f0f0f;
    background: transparent;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    min-height: 120px;
}

.contact-form .textarea-wrapper textarea::placeholder {
    color: #999;
}

.contact-form .contact-submit-btn {
    width: 100%;
    padding: 14px 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-transform: none;
    letter-spacing: 0;
}

.contact-form .contact-submit-btn:hover {
    background: #0f0f0f;
    transform: translateY(-1px);
}

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

.contact-form .contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-form-float {
        bottom: 20px;
        right: 20px;
    }
    
    .contact-float-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .contact-float-text {
        font-size: 14px;
    }
    
    .contact-form-modal {
        bottom: 20px;
        right: 20px;
        width: calc(100vw - 40px);
        max-width: 480px;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .contact-form-title {
        font-size: 20px;
    }
    
    .contact-form-subtitle {
        font-size: 12px;
    }
    
    .contact-form .form-group {
        margin-bottom: 16px;
    }
    
    .contact-form .input-wrapper {
        padding: 0 50px;
    }
    
    .contact-form .input-wrapper input {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .contact-form .textarea-wrapper {
        padding: 12px;
    }
    
    .contact-form .textarea-wrapper textarea {
        min-height: 100px;
    }
    
    .contact-form .contact-submit-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .contact-form-float {
        bottom: 15px;
        right: 15px;
    }
    
    .contact-float-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        gap: 0;
    }
    
    .contact-float-text {
        display: none;
    }
    
    .contact-float-btn i {
        font-size: 20px;
    }
    
    .contact-form-modal {
        bottom: 15px;
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 30px);
        border-radius: 8px;
    }
    
    .contact-form-wrapper {
        padding: 20px;
        max-height: calc(100vh - 30px);
    }
    
    .contact-form-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .contact-form-title {
        font-size: 18px;
    }
    
    .contact-form-subtitle {
        font-size: 11px;
    }
    
    .contact-form .input-wrapper {
        padding: 0 12px;
    }
    
    .contact-form .input-wrapper input {
        padding: 12px 0;
        font-size: 14px;
    }
    
    .contact-form .textarea-wrapper {
        padding: 12px;
    }
    
    .contact-form .textarea-wrapper textarea {
        min-height: 100px;
        font-size: 14px;
    }
    
    .contact-form .contact-submit-btn {
        padding: 12px 20px;
        font-size: 15px;
        width: 100%;
    }
    
    .contact-form-close {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 20px;
    }
}
