/**
 * 右側懸浮 IM（對齊 HeyiTravel / travels8.com）
 */
.fixed-IM-right-container {
    position: fixed;
    right: 20px;
    top: 150px;
    z-index: 10001;
}

.fixed-IM-right-container.none-event {
    pointer-events: none;
}

.fixed-IM-right-container .IM-list._hide {
    opacity: 0;
    transform: translateY(50px);
}

.fixed-IM-right-container .IM-list {
    transition: all .1s linear;
}

.fixed-IM-right-container .r-flex {
    display: flex;
}

.fixed-IM-right-container .align-items-center {
    align-items: center;
}

.fixed-IM-right-container .justify-content-center {
    justify-content: center;
}

.fixed-IM-right-container a.fixed-right-item,
.fixed-IM-right-container .fixed-right-item > a.fixed-right-item {
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    text-decoration: none;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.fixed-IM-right-container a.fixed-right-item img,
.fixed-IM-right-container .fixed-right-item > a.fixed-right-item img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 折叠按钮仍保留圆形底，便于辨认 */
.fixed-IM-right-container a.IM-collapse-btn {
    background-color: #ffffff;
    box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.2);
    border-radius: 50%;
}

.fixed-IM-right-container a:focus {
    outline: none;
    text-decoration: none;
}

.fixed-IM-right-container .IM-collapse-btn {
    pointer-events: auto !important;
}

.fixed-IM-right-container .im-plus-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 24px;
    transform: rotate(0deg);
    transition: all .2s linear;
}

.fixed-IM-right-container .im-plus-icon::before,
.fixed-IM-right-container .im-plus-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #3c4543;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.fixed-IM-right-container .im-plus-icon::before {
    width: 18px;
    height: 2px;
}

.fixed-IM-right-container .im-plus-icon::after {
    width: 2px;
    height: 18px;
}

.fixed-IM-right-container .im-plus-icon.rotate {
    transform: rotate(135deg);
}

/* hover QR（對齊 Element UI el-popover / IM-popover） */
.fixed-IM-right-container .im-popover-item {
    position: relative;
    width: 54px;
    margin-bottom: 10px;
}

.fixed-IM-right-container .im-popover-item > a.fixed-right-item {
    margin-bottom: 0;
}

.fixed-IM-right-container .IM-popover {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    background: #fff;
    border: none;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 2;
    line-height: 0;
}

.fixed-IM-right-container .IM-popover::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-left-color: #fff;
    transform: translateY(-50%);
    filter: drop-shadow(2px 0 1px rgba(0, 0, 0, 0.06));
}

.fixed-IM-right-container .IM-popover img {
    width: 220px;
    max-width: 220px;
    height: auto;
    display: block;
}

.fixed-IM-right-container .im-popover-item:hover .IM-popover,
.fixed-IM-right-container .im-popover-item:focus-within .IM-popover {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .fixed-IM-right-container {
        right: 12px;
        top: auto;
        bottom: 96px;
    }

    .fixed-IM-right-container a.fixed-right-item,
    .fixed-IM-right-container .fixed-right-item > a.fixed-right-item {
        width: 48px;
        height: 48px;
    }

    .fixed-IM-right-container .im-popover-item {
        width: 48px;
    }

    .fixed-IM-right-container a.fixed-right-item img,
    .fixed-IM-right-container .fixed-right-item > a.fixed-right-item img {
        width: 48px;
        height: 48px;
    }

    .fixed-IM-right-container .IM-popover {
        display: none !important;
    }
}
