/*
 * 侧边悬浮联系栏
 */

.gt-fc {
    position: fixed;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.gt-fc--right {
    right: 20px;
}

.gt-fc--left {
    left: 20px;
}

/* ---------- 按钮 ---------- */
.gt-fc-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #f3f4f6;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.gt-fc-btn:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ---------- 图标 ---------- */
.gt-fc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: color 0.2s ease;
    line-height: 0;
}

.gt-fc-icon svg,
.gt-fc-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

.gt-fc-btn:hover .gt-fc-icon {
    color: #000;
}

/* ---------- 悬停文字标签 ---------- */
.gt-fc-label {
    position: absolute;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #1f2937;
    background: #fff;
    border: 1px solid #f3f4f6;
    padding: 6px 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gt-fc--right .gt-fc-label {
    right: calc(100% + 10px);
    transform: translateX(6px);
}

.gt-fc--left .gt-fc-label {
    left: calc(100% + 10px);
    transform: translateX(-6px);
}

.gt-fc-btn:hover .gt-fc-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ---------- 弹出图片（如微信二维码） ---------- */
.gt-fc-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #f3f4f6;
    padding: 16px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 280px;
    min-width: 280px;
    z-index: 10;
}

.gt-fc--right .gt-fc-popup {
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
}

.gt-fc--left .gt-fc-popup {
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
}

.gt-fc-btn:hover .gt-fc-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gt-fc--right .gt-fc-btn:hover .gt-fc-popup {
    transform: translateY(-50%) translateX(0);
}

.gt-fc--left .gt-fc-btn:hover .gt-fc-popup {
    transform: translateY(-50%) translateX(0);
}

.gt-fc-popup img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gt-fc-popup-text {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 0.05em;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 767px) {
    .gt-fc {
        top: 50%;
    }

    .gt-fc--right {
        right: 12px;
    }

    .gt-fc--left {
        left: 12px;
    }

    .gt-fc-btn {
        width: 40px;
        height: 40px;
    }

    .gt-fc-icon svg,
    .gt-fc-icon img {
        width: 18px;
        height: 18px;
    }

    .gt-fc-label {
        display: none;
    }
}
