﻿.home-qr-float,
.home-qr-float * {
    box-sizing: border-box;
}

.home-qr-float {
    position: fixed;
    z-index: 900;
    top: 58%;
    right: 5px;
    display: flex;
    flex-direction: column;
    width: 64px;
    padding: 5px 0;
    overflow: visible;
    border: 1px solid #d9eaf1;
    border-right: 0;
    border-radius: 13px 0 0 13px;
    background: linear-gradient(180deg, rgba(249, 252, 253, .98) 0%, rgba(239, 246, 249, .98) 100%);
    box-shadow: 0 8px 24px rgba(26, 78, 103, .16), inset 0 1px 0 rgba(255, 255, 255, .95);
    transform: translateY(-50%);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.home-qr-tool {
    position: relative;
    width: 63px;
}

.home-qr-tool-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 63px;
    min-height: 55px;
    padding: 5px 2px;
    border: 0;
    background: transparent;
    color: #356177;
    cursor: pointer;
    font: 10px/1.2 "Microsoft YaHei", "PingFang SC", sans-serif;
    transition: color .16s ease, background .16s ease;
}

.home-qr-tool + .home-qr-tool:before,
.home-qr-top-button:before {
    position: absolute;
    top: 0;
    right: 9px;
    left: 9px;
    height: 1px;
    background: rgba(139, 178, 196, .2);
    content: "";
}

.home-qr-tool-button svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-qr-tool-button:hover,
.home-qr-tool:focus-within > .home-qr-tool-button,
.home-qr-tool.is-open > .home-qr-tool-button {
    background: rgba(215, 237, 246, .62);
    color: #087da8;
}

.home-qr-tool-button:focus-visible {
    outline: 2px solid #71bfd5;
    outline-offset: -3px;
}

.home-qr-top-button {
    position: relative;
}

.home-qr-popover {
    position: absolute;
    top: 50%;
    right: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    width: 100px;
    padding: 8px;
    border: 1px solid #e0ebf0;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 58, 78, .16);
    opacity: 0;
    pointer-events: none;
    transform: translate(-4px, -50%);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    visibility: hidden;
}

    .home-qr-popover:after {
        position: absolute;
        top: 0;
        right: -8px;
        width: 8px;
        height: 100%;
        content: "";
    }

.home-qr-tool:hover > .home-qr-popover,
.home-qr-tool:focus-within > .home-qr-popover,
.home-qr-tool.is-open > .home-qr-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
    visibility: visible;
}

.home-qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.home-qr-code-name {
    color: #35566b;
    font-size: 9px;
    font-weight: 600;
    line-height: 12px;
    white-space: nowrap;
}

.home-qr-code-frame {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding: 2px;
    border: 1px solid #dce8ed;
    border-radius: 5px;
    background: #fff;
}

    .home-qr-code-frame img {
        display: block;
        width: 72px;
        height: 72px;
        object-fit: contain;
        background: #fff;
    }

.home-qr-code-type {
    color: #82949f;
    font-size: 8px;
    line-height: 11px;
    white-space: nowrap;
}

@media (hover: none) {
    .home-qr-tool.is-open > .home-qr-popover {
        opacity: 1;
        pointer-events: auto;
        transform: translate(0, -50%);
        visibility: visible;
    }
}

@media (max-height: 520px) {
    .home-qr-float {
        top: 50%;
    }

    .mini-program-popover {
        max-height: calc(100vh - 16px);
        overflow-y: auto;
    }

    .home-qr-code-frame {
        width: 68px;
        height: 68px;
    }

        .home-qr-code-frame img {
            width: 64px;
            height: 64px;
        }
}

@media (max-width: 640px) {
    .home-qr-float {
        right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-qr-tool-button, .home-qr-popover {
        transition: none;
    }
}
