/* ==========================================
   手機長圖展示
   所有名稱使用 ons-phone-，避免影響原網站
   ========================================== */

.ons-full-image {
    width: 100%;
    margin-top: 20px;
    clear: both;
}

.ons-full-image img {
    width: 100%;
    height: auto;
    display: block;
}


/* 整個手機展示區 */
.ons-phone-demo {
    position: relative;
    clear: both;
    float: left;

    width: 100%;
    margin: 55px 0 45px;
    padding: 0 15px;

    display: flex;
    flex-direction: column;
    align-items: center;

    overflow: visible;
    box-sizing: border-box;
}


/* 手機上方提示 */
.ons-phone-tip {
    display: block;
    width: fit-content;
    max-width: calc(100% - 30px);

    margin: 0 auto 24px;
    padding: 12px 25px;

    background: #fdfdfd;
    color: #666666;

    border: 1px solid #dedede;
    border-radius: 999px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.04),
        0 8px 20px rgba(0, 0, 0, 0.09);

    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-align: center;

    box-sizing: border-box;
}


/* 手機本體 */
.ons-phone-shell {
    position: relative;

    width: 420px;
    max-width: 100%;
    aspect-ratio: 704 / 1465;

    margin: 0 auto;

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

    filter: drop-shadow(
        0 18px 28px rgba(0, 0, 0, 0.16)
    );
}


/* 手機內部實際顯示範圍 */
.ons-phone-screen {
    position: absolute;
    z-index: 1;

    left: 7.67%;
    top: 3.55%;

    width: 84.38%;
    height: 92.01%;

    overflow: hidden;

    background: #000000;
    border-radius: 44px;
}


/* 長條詳情頁 */
.ons-phone-long {
    --ons-phone-move-y: 0px;

    position: absolute;
    top: 0;
    left: 0;

    width: 100% !important;
    max-width: none !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block;

    will-change: transform;

    animation-name: onsPhoneAutoScroll;
    animation-duration: 10s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}


/* 滑鼠移入手機後暫停 */
.ons-phone-shell:hover .ons-phone-long {
    animation-play-state: paused;
}


/* 透明手機外框 */
.ons-phone-frame {
    position: absolute;
    z-index: 2;

    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    width: 100% !important;
    max-width: none !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block;
    object-fit: contain;

    pointer-events: none;
}


/* 長圖自動滑動 */
@keyframes onsPhoneAutoScroll {
    0%,
    6% {
        transform: translate3d(0, 0, 0);
    }

    94%,
    100% {
        transform: translate3d(
            0,
            var(--ons-phone-move-y),
            0
        );
    }
}


/* 四張長圖維持正常置中 */
.ons-detail-images {
    clear: both;
    width: 100%;
    text-align: center;
}

.ons-detail-images > img {
    width: 90%;
    max-width: 100%;
    height: auto;

    margin: 0 auto 25px;
    display: block;
}


/* 平板、手機 */
@media only screen and (max-width: 768px) {

    .ons-phone-demo {
        margin-top: 38px;
        margin-bottom: 35px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .ons-phone-tip {
        max-width: calc(100% - 20px);

        margin-bottom: 18px;
        padding: 10px 18px;

        font-size: 14px;
        line-height: 1.55;
        border-radius: 28px;
    }

    .ons-phone-shell {
        width: 390px;
        max-width: 95vw;
    }

    .ons-phone-screen {
        border-radius: 38px;
    }
}


/* 小尺寸手機 */
@media only screen and (max-width: 420px) {

    .ons-phone-tip {
        width: 100%;
        max-width: 100%;

        padding: 10px 14px;

        font-size: 13px;
    }

    .ons-phone-shell {
        width: 100%;
        max-width: 360px;
    }

    .ons-phone-screen {
        border-radius: 34px;
    }
}


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

    .ons-phone-long {
        animation: none;
        transform: translate3d(0, 0, 0);
    }

}