﻿/* -- IMPORTS -- */


/* -- CSS Mini Reset -- */

html,body
{
    width:100%;
    height:100%;
}

html, body, div, form, fieldset, legend, label
{
    margin: 0;
    padding: 0; 
}

table
{
    border-collapse: collapse;
    border-spacing: 0;
}

th, td
{
    text-align: left;
    vertical-align: top;
}

h1, h2, h3, h4, h5, h6, th, td, caption { font-weight:normal; }

img { border: 0; }

/* -- End Mini Reset -- */

body
{
    overflow:hidden;
    display:flex;
}

#app-container {
    flex: 1;
    display: flex;
    /*background-color:#1b191b;*/
    background-color: black;
    align-items: center;
    justify-content: center;
}

#pushtostart
{
    display:none;
}

.player
{
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.player > .media-container
{
    flex: 1;
    display:flex;
}

.player > .media-container .media
{
    flex:1;
    display:none;
}
.player > .media-container .media.playing
{
    display:flex;
}

.player > .media-container .media video
{
    flex:1;
}

.player > .widgets
{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;
}

#app-container .network-scan
{
    display:none;
    position:absolute;
    z-index:5;
    top:0;
    right:0;
    bottom:0;
    left:0;


}
#app-container .network-scan.show
{
    display:flex;
}

#app-container .network-scan .veil
{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;
    background-color:rgba(0,0,0,.85);
}

#app-container .network-scan .content
{
    flex: 1;
    color: #fff;
    position: relative;
    text-shadow: 1px 1px #000;
    padding: 20px;
    font-size: 1.5em;
    display: flex;
    flex-direction: column;
}

#app-container .network-scan .content > header
{
    font-size:2em;
    font-weight:bold;
}

#app-container .network-scan .content > .results
{
    list-style:none;
    margin:0;
    padding:0 0 0 10px;
    overflow:auto;
}

#app-container .diagnostics
{
    display:none;
    position:absolute;
    z-index:5;
    top:0;
    right:0;
    bottom:0;
    left:0;


}
#app-container .diagnostics.show
{
    display:flex;
}

#app-container .diagnostics .veil
{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;
    background-color:rgba(0,0,0,.85);
}

#app-container .diagnostics .content
{
    flex: 1;
    color: #fff;
    position: relative;
    text-shadow: 1px 1px #000;
    padding: 20px;
    font-size: 1.5em;
}

.schedules
{
    display:none;
}

.app-loading 
{
    position:absolute;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    border: 0.25rem solid rgba(109, 3, 11, 0.2);
    border-top-color: #a80d0d;
    -webkit-animation: spin 1s infinite linear;
    animation: spin 1s infinite linear;
    border-style: double;
    border-width: .5rem;
}

.app-error-msg
{
    font-size: 3em;
    color: white;
    position: absolute;
    bottom: 30px;
}

.app-debug-deviceid
{
    font-size: 12px;
    color: rgb(255, 0, 0);
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 100;
}

@keyframes spin {
    0% {
      -webkit-transform: rotate(0deg);
              transform: rotate(0deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
              transform: rotate(360deg);
    }
  }


/* Fixes added for Image Scaling issue */
img.fit,
video.fit {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


img.fill,
video.fill {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


/* Overlay centers the poster box */
#contact-us-poster.contact-us-poster {
    position: absolute;
    inset: 0;
    display: none; /* shown via JS */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    z-index: 99;
    pointer-events: none;
}

/* Poster box is the positioning context */
.contact-us-poster-box {
    position: relative;
    width: 50vw;
    height: 50vh;
    pointer-events: none;
}

/* Poster image fills the box */
#contact-us-img.contact-us-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Device ID pinned to an exact spot on the poster and scales with size */
#contact-us-deviceid.contact-us-deviceid {
    position: absolute;
    bottom: 34%; /* ← keep your exact anchor */
    right: 31%; /* tweak as needed */
    /* IMPORTANT: no transform; keeps the anchor exact */
    white-space: nowrap; /* keep on one line */
    line-height: 1;
    font-family: sans-serif;
    font-weight: 700;
    font-size: clamp(12px, 1.6vmin, 30px); /* scales with poster size */
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
    letter-spacing: 0.5px;
    z-index: 1; /* above the image */
    pointer-events: none;
    /* Background box */
    /* Gradient background */
    background: linear-gradient( 135deg, /* diagonal angle */
    #1cbcd7 30%,#0a6588 100% );
    padding: 0.8em 1.2em;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

@media screen and (max-width: 960px), screen and (max-height: 540px) {
    #contact-us-deviceid.contact-us-deviceid {
        bottom: 35%; /* tweak these values */
        right: 21%; /* so it lines up at half resolution */
        font-size: clamp(10px, 2vmin, 24px); /* slightly smaller */

        padding: 0.3em 0.6em;
        border-radius: 6px;
    }
}