﻿/* 右侧悬浮栏主容器 */
.float-contact-bar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 单个图标容器 */
.contact-item {
    position: relative;
    width: 50px;
    height: 50px;
    display: block;
}

.icon-box {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #333;
}

.icon-box:hover {
    background: #1677ff;
    color: #fff;
}

/* 电话悬浮提示 */
.phone-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.contact-phone:hover .phone-tooltip {
    opacity: 1;
    visibility: visible;
}
.tooltip-arrow {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}
.tooltip-content p {
    margin: 5px 0;
    font-size: 14px;
}
.tooltip-content .big-number {
    font-size: 16px;
    font-weight: bold;
    color: #1677ff;
}

/* 微信二维码弹窗 */
.wx-qrcode {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-align: center;
    z-index: 9999;
}
.contact-wechat:hover .wx-qrcode {
    opacity: 1;
    visibility: visible;
}
.qrcode-arrow {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}
.qrcode-title {
    margin: 0 0 15px;
    font-size: 18px;
    color: #333;
}
.qrcode-img {
    max-width: 220px;
    margin: 0 auto 10px;
}
.qrcode-tip {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 留言弹窗全局遮罩 */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
}
.message-box {
    width: 420px;
    max-width: 90%;
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}
.message-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}
.message-close:hover {
    color: #333;
}
.message-title {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}
.msg-item {
    margin-bottom: 15px;
}
.msg-item label {
    display: inline-block;
    width: 70px;
    font-size: 14px;
    color: #666;
}
.msg-item input,
.msg-item textarea {
    width: calc(100% - 75px);
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}
.msg-item input:focus,
.msg-item textarea:focus {
    outline: none;
    border-color: #1677ff;
}
.msg-item textarea {
    height: 100px;
    resize: none;
    vertical-align: top;
}
.msg-btn {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}
.msg-btn:hover {
    background: #4096ff;
}
.msg-btn:disabled {
    background: #94bfff;
    cursor: not-allowed;
}

/* 移动端适配：底部悬浮联系栏替代右侧悬浮 */
@media (max-width: 768px) {
    .float-contact-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        top: auto;
        transform: none;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        padding: 8px 10px;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        gap: 0;
    }
    .contact-item {
        width: 44px;
        height: 44px;
    }
    .phone-tooltip, .wx-qrcode {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 60px;
        transform: translateX(-50%);
    }
    .tooltip-arrow, .qrcode-arrow {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -8px;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #fff;
        border-bottom: none;
    }
}