/* 在线咨询按钮样式 */
.consultation-button {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom));
    right: 14px;
    height: 42px;
    padding: 0 16px 0 12px;
    background: linear-gradient(135deg, #3b6cff, #6b4dff);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(59, 108, 255, 0.35);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.consultation-button:before {
    content: "";
    width: 22px;
    height: 22px;
    background-image: url('../images/zxkf.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.consultation-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(59, 108, 255, 0.45);
}

.consultation-button:hover:before {
    transform: scale(1.12) rotate(-6deg);
}

.consultation-button:active {
    transform: scale(.96);
    box-shadow: 0 3px 10px rgba(59, 108, 255, 0.3);
}





/* 咨询弹窗样式 */
.consultation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow: auto;
}

.consultation-content {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 320px;
    height: 500px;
    background-color: white;
    border-radius: 10px 10px 0 0;
    box-shadow: -5px -5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.consultation-header {
    background-color: #2c7ad6;
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.consultation-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.consultation-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.consultation-footer {
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    outline: none;
}

.send-button {
    background-color: #2c7ad6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #1e62b9;
}

/* 消息样式 */
.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.user-message .message-content {
    background-color: #2c7ad6;
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .consultation-button {
        bottom: calc(68px + env(safe-area-inset-bottom));
        right: 12px;
        height: 40px;
        font-size: 12px;
    }
    
    .consultation-content {
        width: 100%;
        height: 80%;
    }
}

@media (max-width: 480px) {
    .consultation-button {
        bottom: calc(66px + env(safe-area-inset-bottom));
        right: 10px;
        height: 38px;
        padding: 0 14px 0 10px;
        font-size: 12px;
    }
    
    .consultation-content {
        width: 100%;
        height: 85%;
    }
}