@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;0,1000;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900;1,1000&display=swap');

* {
    font-family: 'Nunito', sans-serif;
}

.video-container {
    background: black;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    width: 100%;
}

#logs-header {
    margin-top: 20px;
}

.preserve-whitespace {
    white-space: pre-wrap;
}

video {
    width: 100%;
}

pre .error {
    color: red;
}

pre .warn {
    color: goldenrod;
}

#logs {
    height: 300px;
    overflow: auto;
}


/*** new ****/

video {
    transform: scaleX(-1);
}

div#masterRow .col:not(.master-video),
div#viewerRow .col:not(.master-video) {
    position: absolute;
    z-index: 999;
    display: block;
    right: 30px;
    width: 25%;
    top: 35px;
    cursor: pointer;
    transition: 400ms
}

div#masterRow .col:not(.master-video).active,
div#viewerRow .col:not(.master-video).active {
    width: 75%;
    transition: 400ms
}

div#masterRow,
div#viewerRow {
    position: relative;
    display: flex;
    align-items: end;
    justify-content: start;
    height: 85vh;
}

div#masterRow .video-container,
div#viewerRow .video-container {
    border-radius: 15px;
    overflow: hidden !important;
}

.col:not(.master-video) .video-container {
    border-radius: 10px !important;
    overflow: hidden !important;
}

.control-buttons {
    border-radius: 10px;
    position: absolute;
    margin-bottom: 25px;
    margin-left: 35px;
    background: #363636de;
    padding: 10px 30px;
    display: flex;
    align-items: center;
    opacity: .5;
    transition: 400ms;
    z-index: 99999;
}

.master-video:hover+.control-buttons {
    opacity: .8;
}

.control-buttons:hover {
    opacity: 1;
}

.control-buttons .btn-sm {
    background: #dfe3e6;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    font-size: 16px;
    color: #000;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.control-buttons .btn-md {
    background: #f92939;
    width: 50px;
    height: 50px;
    border-radius: 100%;
    font-size: 20px;
    color: #fff;
    transform: rotate(225deg);
    margin: 0 15px;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.chat-col {
    background: #edf0f5;
    height: 100%;
    padding: 15px;
    padding-top: 115px;
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    /* overflow: auto; */
}

.input-box {
    background: #fff;
    height: 60px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px 5px;
    border-radius: 10px;
}

.input-box .chat-input {
    background: none;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: 400ms;
}

.input-box .chat-input::placeholder {
    color: #adadad;
    font-size: 14px;
    font-weight: 500;
    transition: 400ms;
}

.input-box .chat-input:focus::placeholder {
    color: #7c7c7c;
}

button#send_message {
    background: #00a183;
    height: 50px;
    width: 50px;
    outline: none;
    border: none;
    border-radius: 10px;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.chat-col p.master-message {
    background: #eaeaea;
    color: #8b8b8b !important;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    max-width: 95%;
    width: 100%;
    float: left;
}

#messages-chat p {
    position: relative;
    line-break: anywhere;
}

#messages-chat p small {
    position: absolute;
    top: 3px;
    font-size: 11px;
}

.chat-col p:not(.master-message) {
    background: #d0d3e4;
    color: #43455a !important;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    max-width: 95%;
    width: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: 100px;
    background: linear-gradient(90deg, rgba(153, 153, 203, 1) 1%, #89d1f4 100%) !important;
    top: 0;
    left: 0;
    width: 100%;
}

.chat-header img {
    width: 100%;
    height: 50px;
    object-fit: contain;
}

#messages-chat {
    height: 100%;
    max-height: calc(86vh - 205px);
    overflow: auto !important;
}

#messages-chat::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#messages-chat::-webkit-scrollbar-button {
    width: 0px;
    height: 0px;
}

#messages-chat::-webkit-scrollbar-thumb {
    background: #dedede;
    border: 0px none #ffffff;
    border-radius: 50px;
}

#messages-chat::-webkit-scrollbar-thumb:hover {
    background: #cbcbcb;
}

#messages-chat::-webkit-scrollbar-thumb:active {
    background: #00000000;
}

#messages-chat::-webkit-scrollbar-track {
    background: #66666600;
    border: 0px none #ffffff;
    border-radius: 50px;
}

#messages-chat::-webkit-scrollbar-track:hover {
    background: #66666600;
}

#messages-chat::-webkit-scrollbar-track:active {
    background: #33333300;
}

#messages-chat::-webkit-scrollbar-corner {
    background: transparent;
}

.session-header {
    position: absolute;
    z-index: 9;
    left: 36px;
    top: 15px;
    color: #fff;
    border-radius: 15px;
    background: #363636a1;
    padding: 10px 15px;
    z-index: 99999;
    opacity: .5;
    transition: 400ms;
}

#masterRow:hover .session-header,
#viewerRow:hover .session-header {
    opacity: 1;
    transition: 400ms;
}

.session-header:hover {
    background: #363636de;
}

.session-header p {
    margin: 0 5px;
    font-weight: 800;
}

.page-header {
    height: 11vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 15px 15px;
    background: #edf0f5;
}

.page-header .header-logo img {
    height: 65px;
    object-fit: contain;
}

.header-right {
    color: #8d9ca3;
    display: flex;
    align-items: center;
}

.header-right i {
    font-size: 35px;
    margin-right: 10px;
}

.header-right span {
    font-size: 17px;
}

.header-right span b {
    font-weight: 900;
}

.d-flex.session-header span {
    white-space: nowrap;
    display: flex;
}

.control-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
}

form#form button {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 15px;
    border: 1px solid #989ccd;
    background: #94a7d394;
    color: #000;
}

span.seperator {
    margin-right: 5px;
}

.master-video .video-container video {
    max-height: 85vh;
    aspect-ratio: 10/8;
    /* object-fit: cover; */
}


.fullScreen .master-video {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 992px) {
    .page-header {
        height: 80px;
        flex-direction: column;
        padding: 10px !important;
    }

    .page-header .header-logo img {
        height: 35px;
    }

    .session-header {
        flex-direction: column;
        font-size: 14px;
        left: 25px;
        top: 10px;
        border-radius: 10px;
        padding: 5px 10px;
    }

    .d-flex.session-header span {
        font-size: 13px;
        font-weight: 200;
    }

    .session-header p {
        font-weight: 600;
        font-size: 13px;
    }

    .seperator {
        display: none !important;
    }

    div#masterRow .col:not(.master-video),
    div#viewerRow .col:not(.master-video) {
        position: absolute;
        z-index: 999;
        display: block;
        right: 10px;
        width: 25%;
        top: 10px;
        transition: 400ms
    }

    div#masterRow .col:not(.master-video).active,
    div#viewerRow .col:not(.master-video).active {
        width: 35%;
        transition: 400ms
    }

    div#masterRow .col:not(.master-video).active.landscape,
    div#viewerRow .col:not(.master-video).active.landscape {
        width: 75% !important;
        transition: 400ms
    }

    /* div#masterRow .col:not(.master-video),
    div#viewerRow .col:not(.master-video) {
        position: relative;
        z-index: 999;
        display: block;
        right: unset;
        width: 100%;
        top: unset !important;
    } */
    .video-container video {
        max-height: unset !important;
        border-radius: 10px;
        aspect-ratio: unset !important;
    }

    /* .master-video .video-container video {
        max-height: 75vh !important;
    } */
    .master-video .video-container video {
        /* max-height: calc(100vh - 172px) !important; */
        /* max-height: calc(100vh - 172px); */
        /* max-height: calc((var(--vh, 1vh) * 100) - 222px) !important; */
    }

    body:not(.fullScreen) .page-header+.page-content .master-video .video-container video {
        max-height: calc((var(--vh, 1vh) * 100) - 222px) !important;
    }

    body:not(.fullScreen) .page-header:has(.header-center.d-none)+.page-content .master-video .video-container video {
        max-height: calc((var(--vh, 1vh) * 100) - 172px) !important;
    }

    div#masterRow,
    div#viewerRow {
        flex-direction: column !important;
        height: unset !important;
        min-height: 22vh !important;
    }

    .control-buttons {
        border-radius: 15px;
        position: absolute;
        margin-bottom: 25px;
        margin-left: 35px;
        background: #363636de;
        padding: 0px 15px;
        display: flex;
        align-items: center;
        opacity: 0.4;
        transition: 400ms;
        z-index: 99999;
        bottom: 0;
        left: 0;
    }

    .fullScreen .control-buttons,
    .fullScreen .fullscreen-btn6 {
        position: fixed;
    }

    .control-buttons .btn-md {
        width: 35px;
        height: 35px;
        font-size: 18px;
        margin: 5px;
    }

    .control-buttons .btn-sm {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .header-right span {
        font-size: 14px;
    }

    .header-right i {
        font-size: 18px;
    }

    .chat-header {
        height: 60px;
    }

    .chat-header img {
        height: 40px;
    }

    .chat-col {
        padding-top: 75px;
    }

    div#master {
        min-height: 22vh;
        border-radius: 15px;
    }

    #messages-chat {
        height: 280px !important;
    }

    /* .chat-col {
        padding: 60px 0 0 0 !important;
        height: 0;
        margin-top: 10px;
        transition: 400ms;
    }

    .chat-col.active {
        padding: 75px 15px 15px 15px !important;
        height: 100%;
        transition: 400ms;
    } */
    .chat-content {
        position: fixed;
        bottom: -378px;
        z-index: 99999999;
        transition: 400ms;
    }

    .chat-content.active {
        bottom: 0;
        transition: 400ms;
    }

    .chat-col p.master-message {
        padding: 15px 10px 5px 10px;
        font-size: 14px;
    }

    button.fullscreen-btn {
        font-size: 14px !important;
        height: 30px !important;
        width: 30px !important;
        transition: 400ms;
    }

    .fullScreen div#main {
        display: flex;
        align-items: center;
        background: #000;
    }

    .fullScreen .video-container video {
        border-radius: 0;
    }

    .chat-header .icon {
        position: absolute;
        right: 20px;
        color: #fff;
        transform: rotate(180deg);
        transition: 400ms;
    }

    .active.chat-content .chat-header .icon {
        transform: rotate(0deg);
        transition: 400ms;
    }

    .no-desktop {
        display: block !important;
    }

    .no-mobile {
        display: none !important;
    }

    #master-operations button {
        margin: 0 2px;
        font-size: 12px;
        border-radius: 10px;
    }

    div#master-operations {
        width: 100%;
        order: 2;
    }

    .page-header {
        height: 130px;
    }

    .page-header:has(.header-center.d-none) {
        height: 80px;
    }

    #master:not(.hovered) .control-buttons,
    #master:not(.hovered) .session-header,
    #master:not(.hovered) .fullscreen-btn,
    #viewer:not(.hovered) .control-buttons,
    #viewer:not(.hovered) .session-header,
    #viewer:not(.hovered) .fullscreen-btn {
        opacity: 0 !important;
    }

    #master.hovered .control-buttons,
    #master.hovered .session-header,
    #master.hovered .fullscreen-btn,
    #viewer.hovered .control-buttons,
    #viewer.hovered .session-header,
    #viewer.hovered .fullscreen-btn {
        opacity: .5;
    }

    #main:hover .control-buttons:hover,
    #main:hover .session-header:hover,
    #main:hover .fullscreen-btn:hover {
        opacity: 1;
    }

    .fullScreen div#main {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .fullScreen .video-container video.local-view {
        border-radius: 10px;
    }

    .fullScreen video.remote-view {
        width: 100vw !important;
        height: 100vh !important;
    }

    .fullScreen .master-video .video-container {
        height: 100vh !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fullScreen .master-video .video-container .remote-view {
        height: 100vh !important;
        max-height: 100vh !important;
    }

}


.no-desktop {
    display: none;
}

div#main {
    transition: 400ms;
}

.fullScreen div#main {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999;
}

.fullScreen .page-header,
.fullScreen .chat-content {
    display: none;
}

.fullScreen .row,
.fullScreen .col,
.fullScreen .px-3,
.fullScreen .mt-3,
.fullScreen .col-lg-8 {
    padding: 0 !important;
    margin: 0 !important
}

html:has(.fullScreen) {
    overflow: hidden;
}

.fullScreen .video-container {
    border-radius: 0 !important;
}

.fullScreen .video-container video {
    max-height: 100vh !important;
}

.fullScreen div#masterRow,
.fullScreen div#viewerRow {
    height: 100vh !important;
    width: 100vw !important;
}

button.fullscreen-btn {
    position: absolute;
    right: 35px;
    bottom: 25px;
    border: none;
    background: none;
    color: #fff;
    font-size: 20px;
    background: #363636de;
    border-radius: 100%;
    height: 45px;
    width: 45px;
    outline: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
}

.fullScreen div#main {
    background: #000;
}

div#master-operations button {
    border-radius: 10px;
    margin: 0 3px;
    border: none;
    display: flex;
    align-items: center;
}

div#master-operations button i {
    margin-right: 2px;
}

div#master-operations {
    display: flex;
    justify-content: center;
}