/* ==========================================================
   SEA STAR PRODUCT 360 VIEWER
   ========================================================== */

.hp3-product-360 {
    position: relative;
    overflow: hidden;
    user-select: none;
    touch-action: pan-y;
    cursor: ew-resize;
}

.hp3-product-360-frame {
    width: 100%;
    height: 100%;
    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;

    transition:
        opacity .18s ease;
}

.hp3-product-360.is-loading
.hp3-product-360-frame {
    opacity: .42;
}


/* 360 badge */

.hp3-product-360-badge {
    position: absolute;

    top: 14px;
    right: 14px;

    z-index: 8;

    min-width: 48px;
    height: 48px;

    padding: 0 9px;

    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(25,28,29,.88);

    color: #fff;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;

    box-shadow:
        0 8px 22px
        rgba(18,24,27,.18);

    pointer-events: none;
}


/* Drag-direction visual hint */

.hp3-product-360-hint {
    position: absolute;

    left: 50%;
    bottom: 16px;

    transform:
        translateX(-50%);

    z-index: 8;

    min-width: 50px;
    height: 30px;

    padding: 0 12px;

    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(255,255,255,.90);

    color:
        rgba(25,28,29,.82);

    border:
        1px solid
        rgba(25,28,29,.10);

    font-size: 18px;
    line-height: 1;

    box-shadow:
        0 7px 18px
        rgba(18,24,27,.10);

    pointer-events: none;

    transition:
        opacity .25s ease,
        transform .25s ease;
}

.hp3-product-360.has-interacted
.hp3-product-360-hint {
    opacity: 0;

    transform:
        translateX(-50%)
        translateY(6px);
}


/* Preload indicator */

.hp3-product-360-loader {
    position: absolute;

    inset: 0;

    z-index: 7;

    display: none;
    align-items: center;
    justify-content: center;

    pointer-events: none;
}

.hp3-product-360.is-loading
.hp3-product-360-loader {
    display: flex;
}

.hp3-product-360-loader span {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    border:
        3px solid
        rgba(25,28,29,.14);

    border-top-color:
        rgba(25,28,29,.72);

    animation:
        sea-star-360-loader
        .8s linear infinite;
}

@keyframes sea-star-360-loader {

    to {
        transform:
            rotate(360deg);
    }
}


/* While dragging */

.hp3-product-360.is-dragging {
    cursor: grabbing;
}

.hp3-product-360.is-dragging
.hp3-product-360-frame {
    transition: none;
}


/*
 * Prevent previous image-hover transforms
 * from interfering with actual 360 media.
 */

.hp3-product-card
.hp3-product-360
.hp3-product-360-frame {

    transform: none !important;
    filter: none !important;
}


/* Mobile */

@media (max-width: 600px) {

    .hp3-product-360-badge {
        top: 10px;
        right: 10px;

        min-width: 42px;
        height: 42px;

        font-size: 11px;
    }

    .hp3-product-360-hint {
        bottom: 10px;
    }
}


/* Accessibility */

@media (prefers-reduced-motion: reduce) {

    .hp3-product-360-loader span {
        animation: none;
    }

    .hp3-product-360-frame,
    .hp3-product-360-hint {
        transition: none;
    }
}
