html.schwan-product-zoom-open {
    overflow: hidden;
}

.schwan-product-zoom {
    box-sizing: border-box;
    width: min(100%, 900px);
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    margin: auto;
    overflow: hidden;
    background: #fff;
    color: #fff;
}

.schwan-product-zoom[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.schwan-product-zoom::backdrop {
    background: rgba(0, 0, 0, .82);
}

.schwan-product-zoom__header,
.schwan-product-zoom__footer {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 56px;
    padding: 6px 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    background: #212121;
}

.schwan-product-zoom__header {
    padding-top: max(6px, env(safe-area-inset-top));
}

.schwan-product-zoom__footer {
    padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.schwan-product-zoom__position {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.schwan-product-zoom__scale {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.schwan-product-zoom__hint {
    flex: 1;
    text-align: center;
}

.schwan-product-zoom__button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #909090;
    border-radius: 5px;
    background: #343434;
    color: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.schwan-product-zoom__button[hidden] {
    display: none;
}

.schwan-product-zoom__button[aria-disabled='true'] {
    opacity: .55;
    cursor: default;
}

.schwan-product-zoom__button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.schwan-product-zoom .schwan-product-zoom__stage {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
}

.schwan-product-zoom .swiper-zoom-container {
    box-sizing: border-box;
    padding: 10px;
}

.schwan-product-zoom .swiper-zoom-container img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

@media (min-width: 768px) and (min-height: 560px) {
    .schwan-product-zoom {
        width: min(calc(100% - 32px), 900px);
        height: min(calc(100% - 32px), 900px);
        height: min(calc(100dvh - 32px), 900px);
        border-radius: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .schwan-product-zoom .swiper-zoom-container,
    .schwan-product-zoom .swiper-zoom-container img {
        transition-duration: 0s !important;
    }
}
