/* Responsive Bunny Stream frame. All rules are scoped to this plugin. */
.tkwcl-bunny-video {
    position: relative !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #001b2e;
    border-radius: 6px;
    line-height: 0 !important;
}

.tkwcl-bunny-video > iframe,
.tkwcl-bunny-iframe {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.tkwcl-rotate-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    z-index: 9999;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, .72);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .24);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    line-height: 1;
}

.tkwcl-rotate-hint.is-visible {
    display: flex;
    animation: tkwclHintFade 5s ease forwards;
}

.tkwcl-phone-icon {
    width: 11px;
    height: 19px;
    border: 2px solid #efba42;
    border-radius: 3px;
    position: relative;
    box-sizing: content-box;
    animation: tkwclPhoneRotate 1.35s ease-in-out infinite;
}

.tkwcl-phone-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
}

.tkwcl-phone-icon::before {
    content: '↻';
    position: absolute;
    right: -12px;
    top: -9px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

@keyframes tkwclPhoneRotate {
    0%, 22% { transform: rotate(0deg); }
    48%, 72% { transform: rotate(90deg); }
    100% { transform: rotate(0deg); }
}

@keyframes tkwclHintFade {
    0% { opacity: 0; transform: translateY(-50%) scale(.9); }
    12%, 82% { opacity: 1; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(.92); }
}

@media (max-width: 900px) {
    .tkwcl-bunny-video {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 4px;
    }

    .tkwcl-rotate-hint {
        right: 7px;
        width: 36px;
        height: 36px;
    }

    /* When the phone itself turns to landscape, make the lesson video follow
       the new orientation and occupy the visible screen. */
    .tkwcl-bunny-video.tkwcl-landscape-mobile {
        position: fixed !important;
        inset: 0 !important;
        z-index: 2147483000 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        aspect-ratio: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: #000 !important;
    }

    html.tkwcl-video-landscape-active,
    body.tkwcl-video-landscape-active {
        overflow: hidden !important;
    }
}

@media (min-width: 901px) {
    .tkwcl-rotate-hint { display: none !important; }
}


/* Keep the player large enough to be comfortable on phones while retaining
   the video's natural landscape shape. */
@media (max-width: 600px) and (orientation: portrait) {
    .tkwcl-bunny-video {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        aspect-ratio: 16 / 9 !important;
        min-height: 210px !important;
    }
}
