:root {
    --spinner-bg-color: #ffffff;
}

[hidden] { display:none !important;}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Mukta,sans-serif;
    color: #F7F7F7;
    background-color: #323643;
}

div#codeEntryScreen {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #323643;
    background-image: url(/img/bg.png);
    background-blend-mode: multiply;
}

div#codeAndStart {
    display: inline-block;
    position: absolute;
    width: fit-content;
    border: 3px solid #262626;
    border-radius: 34px;
    padding: 16px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

button#startButton {
    display: block;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 16px;
    text-align: center;
    font-size: 24px;
    padding: 10px;
    border: none;
    border-radius: 9999px;
    background: #f15922;
    font-weight: bold;
    color: #F7F7F7;
    text-transform: uppercase;
    font-variant: small-caps;
}

button#startButton:disabled {
    background: rgba(0, 0, 0, 0.7);
    color: rgba(128, 128, 128, 0.5);
}

button#startButton:hover:enabled {
    background: #f37a4f;
}

button#endButton {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
    border-radius: 32px;
    opacity: 0.5;
    background: #99999966;
    color: white;
    border: 0;
}

button#endButton:hover {
    background: #99999999;
}

button#endButton .material-symbols-outlined {
    font-size: 40px !important;
}

div#outboundStagingCanvasContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

div#outboundStagingCanvasContainer > canvas {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
}

div#outboundStagingCanvasContainer > canvas.blended {
    opacity: 1;
}

div#codeStateIconHolder {
    color: rgb(128, 128, 128);
    position: absolute;
    width: 23px;
    height: 32px;
    display: inline-block;
    z-index: 2;
}

div#codeEntryScreen img#logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 200px;
}

div#codeEntryField {
    position: relative;
}

div#codeEntryField #codeInput {
    position: relative;
    left: 0;
    top: 0;
    text-transform: uppercase;
    border: 1px solid;
    font-size: 30px;
    border-radius: 9999px;
    padding: 6px 16px 6px 64px;
    width: 270px;
    background: #F7F7F7;
    color: #323643;
    z-index: 1;
}

div#codeEntryField #codeInput::placeholder {
    text-transform: capitalize;
    font-size: 22px;
    transform: translateY(-3px);
}

div.codeStateIcon {
    position: relative;
    display: inline-block;
    width: 23px;
    height: 32px;
    left: 16px;
    top: 9px;
}

div.codeStateIcon .material-symbols-outlined {
    font-size: 30px !important;
}

tiltfive-spinner#codeStateChecking {
    position: absolute;
    width: 28px;
    height: 32px;
    filter: invert(0.5);
    top: 9px;
    left: 17px;
}

#connectingSpinnerBg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #6669;
    backdrop-filter: blur(1px);
    z-index: 1000;
}

tiltfive-spinner#connectingSpinner {
    width: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

div#noChannelMessageContainer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #323643;
    background-image: url(/img/bg.png);
    background-blend-mode: multiply;
}

div#noChannelMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-transform: capitalize;
    font-variant: small-caps;
    padding-right: 40px;
}

div#noChannelMessage > div {
    position: relative;
    left: 40px;
    font-size: 30px;
    display: inline-block;
    white-space: nowrap;
}

div#noChannelMessage tiltfive-spinner#noChannelsSpinner {
    width: 26px;
    position: absolute;
    top: 10px;
}

/* Begin:Spinner */
tiltfive-spinner {
    display: inline-block;
    width: 100px;
}

.spinner {
    display: inline-block;
    position: relative;
    width: 300px;
    height: auto;
    aspect-ratio: 1;
}

.spinner > div {
    position: absolute;
    margin: 0 auto;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner div:nth-child(1) {
    width: 100%;
}

.spinner div:nth-child(1) > div {
    animation-duration: 2200ms;
}

.spinner div:nth-child(2) {
    width: 80%;
}

.spinner div:nth-child(2) > div {
    animation-duration: 1000ms;
}

.spinner > div > div {
    aspect-ratio: 1;
    padding: 10%;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--spinner-bg-color);
    mask:
            linear-gradient(#0000 0, #0000 0) content-box intersect,
            conic-gradient(#000 270deg, #0000 0);

    animation-name: spin;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes spin {
    from {transform:rotate(0deg);}
    to {transform:rotate(360deg);}
}
/* End:Spinner */

#channelContainer {
    position: absolute;
    top: 0;
    display: grid;
    transition: all 1s ease;
    width: calc(100vw - 8px);
    height: calc(100vh - 8px);
    margin: 4px;
    gap: 4px;
    pointer-events: none;
}

.channelRoot {
    position: relative;
    width: 100%;
    height: 100%;
    background: #666666;

    border: 1px solid black;
    box-sizing: border-box;
    border-radius: 16px;
}

.channelRoot video {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.channelRoot video#inboundVideo {
    pointer-events: auto;
    touch-action: none;
}

.channelRoot.blended {
    background: transparent;
}

.channelRoot.blended video#inboundVideo {
    mix-blend-mode: plus-lighter;
}

.channelRoot div#title {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    z-index: 100;
    text-shadow: 0 0 black;
}

.channelRoot tiltfive-spinner#channelSpinner {
    width: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.channelRoot div#warningHolder {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333333AA;
    padding: 12px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.channelRoot div#warningText {

}

/* Pose Mode Picker */
div#posePickerContainer {
    margin-top: 16px;
    display: flex;
    width: 100%;
}

div#posePickerContainer > span {
    margin-right: 12px;
    position: relative;
    top: 3px;
}

div#posePicker {
    flex: 1;
    position: relative;
    height: 32px;
}

div#posePicker button#posePickerCurrent {
    width: 100%;
    height: 32px;
    border-radius: 16px;
}

div#posePicker button#posePickerCurrent > div {
    position: relative;
    top: -7px;
}

div#posePickerModal {
    position: fixed;
    top: -2000px;
    left: -2000px;
    width: 4000px;
    height: 4000px;
    background: #2226;
    backdrop-filter: blur(3px);
    z-index: 100;
}

div#posePickerOptions {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    z-index: 101;
}

div#posePickerOptions button {
    border: none;
    flex: 1;
    color: #323643;
    background: #F7F7F7;
}

div#posePickerOptions button.disabled {
    border: none;
    flex: 1;
    color: #c2c5cf;
    background: #F7F7F7;
}

div#posePickerOptions button:hover {
    color: #F7F7F7;
    background: #606470;
}

div#posePickerOptions button.disabled:hover {
    color: #c2c5cf;
    background: #F7F7F7;
}

div#posePickerOptions button.selected {
    color: #F7F7F7;
    background: #f15922;
}

div#posePickerOptions button.selected:hover {
    color: #F7F7F7;
    background: #606470;
}

button.posePickerButton > div {
    width: 100%;
    margin-left: 8px;
    text-align: left;
    white-space: nowrap;
    display: inline-block;
    padding: 8px;
}

button.posePickerButton > div > span.material-symbols-outlined {
    position: relative;
    top: 3px;
}

button.posePickerButton > div > span.option-label {
    position: relative;
    top: -3px;
    font-size: 20px;
    margin-left: 12px;
}

button.posePickerButton:first-child {
    border: none;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

button.posePickerButton:last-child {
    border: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

div#posePickerWarning {
    color: #323643;
    background: #F7F7F7;
    width: fit-content;
    white-space: nowrap;
    height: 50px;
    position: absolute;
    z-index: 1002;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 20px 20px 0 20px;
    transition: all 0.7s ease-in-out;
}

div#posePickerWarning.hide {
    bottom: -100px;
}

div#posePickerWarning div {
    display: inline-block;
    position: relative;
    top: -5px;
    font-size: 20px;
    padding-left: 12px;
}

canvas.threeJsCanvas{
    position: absolute;
    z-index: -1;
}
