/* Custom layout editor broadcasts. Shared by the v1 and v2 players. */

/* v1 pages do not load generic-narrowcasting-v2.css, so Inter is not registered
   there. Without these faces the layout font falls back to the tenant body
   font (Arial on v1), which is wider and clips tight caption boxes. */
@font-face {
    font-family: 'Inter-Black';
    src: url('../fonts/generic/Inter-Black.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Bold';
    src: url('../fonts/generic/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-ExtraLight';
    src: url('../fonts/generic/Inter-ExtraLight.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Light';
    src: url('../fonts/generic/Inter-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Medium';
    src: url('../fonts/generic/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Regular';
    src: url('../fonts/generic/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-SemiBold';
    src: url('../fonts/generic/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Thin';
    src: url('../fonts/generic/Inter-Thin.woff2') format('woff2');
}

.broadcast.custom-template,
#customTemplateContainer .custom-template-broadcast,
#customTemplateContainerOutgoing .custom-template-broadcast,
#customTemplateLeaveUnderlay .custom-template-broadcast {
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    background-color: #ffffff;
}

.broadcast.custom-template > .custom-template-canvas,
#customTemplateContainer .custom-template-broadcast > .custom-template-canvas,
#customTemplateContainerOutgoing .custom-template-broadcast > .custom-template-canvas,
#customTemplateLeaveUnderlay .custom-template-broadcast > .custom-template-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    overflow: hidden;
    transform-origin: 0 0;
}

/* V1 wrapper: sized to the viewport, since tenant CSS does not size the body.
   Stays under the screen level RSS bar and debug overlays (z-index 999). */
#customTemplateContainer,
#customTemplateContainerOutgoing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Next custom layout, drawn only while this one is leaving. Behind the current layout. */
#customTemplateLeaveUnderlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

#customTemplateContainer.custom-template-leave-front {
    z-index: 2;
}

#customTemplateContainer .custom-template-broadcast,
#customTemplateContainerOutgoing .custom-template-broadcast,
#customTemplateLeaveUnderlay .custom-template-broadcast {
    position: absolute;
}

.custom-template-canvas {
    overflow: hidden;
}

.custom-template-image-container img {
    display: block;
}

.custom-template-svg-container svg {
    display: block;
}

.custom-template-video-container video {
    display: block;
}

.custom-template-video-container .custom-template-video-player {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
}

.custom-template-text {
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
    line-height: normal;
    padding: 10px;
    border: 1px solid transparent;
    font-family: "Inter-Regular", sans-serif;
}

.custom-template-text p,
.custom-template-text div {
    margin: 0;
    width: 100%;
}

/* v1 generic-narrowcasting.css gives headings and paragraphs a 0.4em vertical
   margin. That eats space inside a text box sized to the editor. */
#customTemplateContainer h1,
#customTemplateContainer h2,
#customTemplateContainer h3,
#customTemplateContainer h4,
#customTemplateContainer h5,
#customTemplateContainer h6,
#customTemplateContainer p,
.broadcast.custom-template h1,
.broadcast.custom-template h2,
.broadcast.custom-template h3,
.broadcast.custom-template h4,
.broadcast.custom-template h5,
.broadcast.custom-template h6,
.broadcast.custom-template p {
    margin: 0;
    padding: 0;
}

.custom-template-app-container {
    overflow: hidden;
    background: #000;
}

.custom-template-app-container .custom-template-app-iframe,
.custom-template-app-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.custom-template-app-container .youtube-container {
    overflow: hidden;
    width: 100%;
    height: 100%;
    pointer-events: none;
    position: relative;
}

.custom-template-app-container .youtube-container iframe {
    width: 300% !important;
    height: 100% !important;
    margin-left: -100%;
    position: absolute;
    top: 0 !important;
    border: 0;
}

.custom-template-screen-container {
    overflow: hidden;
    background: transparent;
}

.custom-template-screen-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}
