/* 右下角咨询组件样式 */
.consultation-widget {
    position: fixed;
    right: 30px;
    bottom: 150px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.consultation-item {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.consultation-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(180, 80, 80, 0.3);
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.consultation-icon:hover, .consultation-icon:focus {
    transform: scale(1.1);
}

.consultation-icon:active {
    transform: scale(0.95);
}

.consultation-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 180px;
    text-align: center;
    border: 1px solid #e8c8c8;
}

.consultation-item:hover .consultation-tooltip {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

.qrcode-tooltip img {
    width: 160px;
    height: 160px;
    display: block;
    margin-bottom: 10px;
    border-radius: 5px;
}

.phone-tooltip {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phone-number {
    font-size: 18px;
    font-weight: bold;
    color: #d45d5d;
    margin: 10px 0;
}

.phone-desc {
    font-size: 14px;
    color: #777;
}

.consult-chat {
    background: linear-gradient(135deg, #e69ac9, #d87a7e);
}

.consult-phone {
    background: linear-gradient(135deg, #d87a7e, #c14b4b);
}

.tooltip-title {
    font-weight: bold;
    color: #d45d5d;
    margin-bottom: 10px;
    font-size: 16px;
}

.tooltip-arrow {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid white;
}

/* 手机端样式优化 */
@media (max-width: 768px) {
    .consultation-widget {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        background: rgba(255, 255, 255, 0.95);
        padding: 10px 5px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        gap: 5px;
        z-index: 9999;
    }

    .consultation-item {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .consultation-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        box-shadow: 0 2px 8px rgba(180, 80, 80, 0.3);
    }

    /* 手机端隐藏tooltip */
    .consultation-tooltip {
        display: none !important;
    }

    .consultation-item:hover .consultation-tooltip {
        display: none !important;
    }

    /* 手机端电话图标样式 */
    .phone-link-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }
}

/* 微信号码弹窗样式 - 只在手机端显示 */
.wechat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.wechat-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #d45d5d;
}

.wechat-id {
    font-size: 22px;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px dashed #d45d5d;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
}

.wechat-id:hover {
    background: #e9e9e9;
}

.wechat-id.copied {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.copy-hint {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.wechat-id.copied .copy-hint {
    opacity: 1;
}

.modal-close {
    background: #d45d5d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 16px;
    transition: background 0.3s;
    width: 100%;
}

.modal-close:hover {
    background: #b84a4a;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
    transition: background 0.3s;
    width: 100%;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #6c757d;
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.copy-success.show {
    opacity: 1;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #d87a7e, #e69ac9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(180, 80, 80, 0.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(180, 80, 80, 0.4);
}

/* 手机端返回顶部按钮 - 上移到咨询栏上方 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}