.a365-iv-host {
    position: relative;
}

.a365-iv-target {
    cursor: zoom-in;
}

.a365-iv-open {
    overflow: hidden;
}

.a365-iv-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 9px;
    border: 0;
    border-radius: 6px;
    background: #0f172ad9;
    color: #fff;
    font: inherit;
    font-size: .78em;
    line-height: 1;
    cursor: zoom-in;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity .16s ease, transform .16s ease;
}

.a365-iv-host:hover .a365-iv-btn,
.a365-iv-btn:focus-visible {
    opacity: 1;
    transform: none;
}

.a365-iv-btn:hover {
    background: #0f172a;
}

.a365-iv-btn svg {
    display: block;
    flex: none;
}

.a365-iv {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    background: #0b1220fa;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .18s ease;
}

.a365-iv[hidden] {
    display: none;
}

.a365-iv.is-visible {
    opacity: 1;
}

.a365-iv-scrim {
    position: absolute;
    inset: 0;
}

.a365-iv-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: none;
    padding: 12px 16px;
    color: #cbd5e1;
    font-size: .85em;
}

.a365-iv-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #ffffff14;
    color: #e2e8f0;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.a365-iv-ctrl:hover {
    background: #ffffff26;
    color: #fff;
}

.a365-iv-ctrl[hidden] {
    display: none;
}

.a365-iv-ctrl svg {
    display: block;
}

.a365-iv-canvas {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
}

.a365-iv-img {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    max-height: none;
    transform-origin: 0 0;
    border-radius: 6px;
    background: #fff;
    user-select: none;
    -webkit-user-drag: none;
}

.a365-iv.is-loading .a365-iv-img {
    opacity: .35;
}

.a365-iv.can-zoom .a365-iv-img {
    cursor: zoom-in;
}

.a365-iv.is-zoomed .a365-iv-img {
    cursor: zoom-out;
}

.a365-iv.can-pan .a365-iv-img {
    cursor: grab;
}

.a365-iv.can-pan.is-panning .a365-iv-img {
    cursor: grabbing;
}

.a365-iv-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #0f172ad9;
    color: #e2e8f0;
}

.a365-iv-nav:hover {
    background: #0f172a;
    color: #fff;
}

.a365-iv-prev {
    left: 12px;
}

.a365-iv-next {
    right: 12px;
}

.a365-iv-cap {
    position: relative;
    z-index: 2;
    flex: none;
    margin: 0;
    padding: 12px 56px 18px;
    color: #cbd5e1;
    font-size: .85em;
    line-height: 1.5;
    text-align: center;
}

.a365-iv-cap[hidden] {
    display: none;
}

.a365-iv :focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .a365-iv-btn {
        opacity: 1;
        transform: none;
    }

    .a365-iv-nav {
        top: auto;
        bottom: 14px;
        transform: none;
    }

    .a365-iv-cap {
        padding: 10px 16px 62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .a365-iv,
    .a365-iv-btn,
    .a365-iv-ctrl {
        transition: none;
    }
}
