/* ============================================================
   浮动联系方式样式 - float-contact.css
   使用方式: <link rel="stylesheet" href="css/float-contact.css">
   ============================================================ */

/* ===== 右侧浮动按钮容器 ===== */
.float-contact-wrap {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* ===== 每个联系按钮 ===== */
.float-contact-wrap .contact-item {
    position: relative;
    width: 54px;
    height: 54px;
    background: #01439b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 3px 12px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    border: none;
    color: #fff;
    overflow: visible;
}

.float-contact-wrap .contact-item:hover {
    background: #0a5cb5;
    width: 64px;
    border-radius: 10px 0 0 10px;
}

.float-contact-wrap .contact-item .fc-icon {
    font-size: 20px;
    line-height: 1;
    display: block;
    font-style: normal;
}

.float-contact-wrap .contact-item .fc-label {
    font-size: 10px;
    margin-top: 2px;
    line-height: 1.2;
    text-align: center;
    display: block;
    font-weight: 400;
}

/* ===== 回到顶部按钮 ===== */
.float-contact-wrap .contact-item.go-top {
    background: #555;
    margin-top: 4px;
}
.float-contact-wrap .contact-item.go-top:hover {
    background: #222;
}

/* ============================================================
   微信悬浮弹窗
   ============================================================ */
.float-contact-wrap .contact-item .fc-popup-wechat {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 22px 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    min-width: 170px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.float-contact-wrap .contact-item .fc-popup-wechat::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: #ffffff;
}

.float-contact-wrap .contact-item .fc-popup-wechat img {
    width: 130px;
    height: 130px;
    display: block;
    margin: 0 auto 6px;
    border-radius: 4px;
    background: #f5f5f5;
}

.float-contact-wrap .contact-item .fc-popup-wechat .fc-popup-title {
    font-size: 14px;
    color: #222;
    font-weight: 600;
}

.float-contact-wrap .contact-item .fc-popup-wechat .fc-popup-sub {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.float-contact-wrap .contact-item:hover .fc-popup-wechat {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

/* ============================================================
   电话悬浮提示
   ============================================================ */
.float-contact-wrap .contact-item .fc-popup-phone {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 24px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid #f0f0f0;
}

.float-contact-wrap .contact-item .fc-popup-phone::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    border: 7px solid transparent;
    border-left-color: #ffffff;
}

.float-contact-wrap .contact-item .fc-popup-phone .fc-phone-number {
    font-size: 18px;
    color: #01439b;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.float-contact-wrap .contact-item .fc-popup-phone .fc-phone-label {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.float-contact-wrap .contact-item:hover .fc-popup-phone {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

/* ============================================================
   移动端底部联系方式栏
   ============================================================ */
.float-contact-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #ffffff;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.10);
    padding: 6px 8px 8px;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
}

.float-contact-mobile .fc-m-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 10px;
    gap: 1px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    min-width: 48px;
}

.float-contact-mobile .fc-m-item .fc-icon {
    font-size: 20px;
    color: #01439b;
    font-style: normal;
    line-height: 1;
}

.float-contact-mobile .fc-m-item .fc-label {
    font-size: 9px;
    color: #666;
}

.float-contact-mobile .fc-m-item.fc-primary {
    background: #01439b;
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
}
.float-contact-mobile .fc-m-item.fc-primary .fc-icon {
    color: #fff;
}
.float-contact-mobile .fc-m-item.fc-primary .fc-label {
    color: #fff;
}

/* ============================================================
   移动端微信弹窗 (Modal)
   ============================================================ */
.fc-wechat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.fc-wechat-modal.fc-active {
    display: flex;
}

.fc-wechat-modal .fc-modal-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px 22px;
    max-width: 320px;
    width: 85%;
    text-align: center;
    position: relative;
    animation: fcModalIn 0.3s ease;
}

.fc-wechat-modal .fc-modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 26px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 4px 8px;
    font-weight: 300;
}

.fc-wechat-modal .fc-modal-close:hover {
    color: #333;
}

.fc-wechat-modal .fc-modal-box img {
    width: 170px;
    height: 170px;
    display: block;
    margin: 0 auto 10px;
    border-radius: 6px;
    background: #f5f5f5;
}

.fc-wechat-modal .fc-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.fc-wechat-modal .fc-modal-sub {
    font-size: 13px;
    color: #999;
    margin-top: 3px;
}

/* ===== 弹窗入场动画 ===== */
@keyframes fcModalIn {
    from {
        transform: scale(0.88) translateY(10px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   响应式 - 移动端显示底部栏，隐藏右侧浮动按钮
   ============================================================ */
@media (max-width: 768px) {
    .float-contact-wrap {
        display: none;
    }
    .float-contact-mobile {
        display: flex;
    }
    /* 底部安全区适配（iPhone等） */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        .float-contact-mobile {
            padding-bottom: calc(8px + env(safe-area-inset-bottom));
        }
    }
}

/* ============================================================
   可选：小屏幕平板显示优化
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .float-contact-wrap .contact-item {
        width: 48px;
        height: 48px;
    }
    .float-contact-wrap .contact-item .fc-icon {
        font-size: 17px;
    }
    .float-contact-wrap .contact-item .fc-label {
        font-size: 9px;
    }
}

/* ============================================================
   页面滚动时半透明效果（由JS控制，此处为样式定义）
   ============================================================ */
.float-contact-wrap.fc-scrolled {
    opacity: 0.7;
    transition: opacity 0.4s ease;
}
.float-contact-wrap.fc-scrolled:hover {
    opacity: 1;
}