/* MoveCast — player เต็มจอใต้ header ทุกอุปกรณ์ */

html:has(.movecast-page),
body:has(.movecast-page) {
    overflow: hidden;
    height: 100%;
}

main:has(.movecast-page) {
    padding: 0;
    min-height: calc(100dvh - var(--main-offset-top));
    max-height: calc(100dvh - var(--main-offset-top));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

main:has(.movecast-page) > h1,
main:has(.movecast-page) > .site-intro-strip {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

main:has(.movecast-page) > .content-container {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 0;
    margin: 0;
    gap: 0;
}

main:has(.movecast-page) + footer {
    display: none;
}

.movecast-page {
    --movecast-player-h: calc(
        100dvh - var(--main-offset-top) - env(safe-area-inset-bottom, 0px)
    );
    flex: 1 1 auto;
    width: 100%;
    min-height: var(--movecast-player-h);
    height: var(--movecast-player-h);
    max-height: var(--movecast-player-h);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    position: relative;
}

.movecast-iframe {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    max-width: none;
    max-height: none;
    border: 0 !important;
    border-radius: 0;
    outline: 0;
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
    box-shadow: none;
    /* ตัดขอบ/scrollbar จากหน้า /tv ที่ฝังอยู่ภายใน (ชั้นนอก) */
    transform: scale(1.01);
    transform-origin: center center;
}

#movecast-main {
    border: 0;
    outline: 0;
    box-shadow: none;
}

@supports not (height: 100dvh) {
    .movecast-page {
        --movecast-player-h: calc(100vh - var(--main-offset-top));
    }
}

@media (max-width: 767px) {
    main:has(.movecast-page) {
        min-height: calc(100dvh - var(--main-offset-top));
    }
}
