*
{
	outline: none !important;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}

body
{
    margin:         0;
        height: 100vh;
        overflow-y: hidden;
}

body.settings-open
{
        overflow: hidden;
}

#navbar
{
	position: absolute;
    background-color: aliceblue;
	height: 40px;
	width: 100%;
    left: 0;
    top: 0;
}

.login
{
	float: right;
	display: inline-block;
	padding: 7.5px 17.5px;
	margin: 5px;
	background-color: #007bff;
	color: white;
	text-decoration: none;
	border: none;
	border-radius: 7.5px;
	cursor: pointer;
	text-align: center;
}

#container {
    margin:         40px 0 0 0;
    display:        flex;
    flex-direction: row;
    font-family:    sans-serif;
	height: calc(100vh - 40px);
	overflow-y: hidden;
}

#sidebar, #chat {
    width:            250px;
    min-width:        200px !important;
    background-color: aliceblue;
    padding:          10px;
    box-sizing:       border-box;
    overflow-y:       auto;
}

#main {
    flex:        1;
    background-color: #000000;
    /*display:          flex;
    align-items:      center;
    justify-content:  center;*/
}

video {
    flex:      1;
    max-height: 100%;
    cursor:     pointer;
    width: 100px;
}

#previewInterval
{
    width: 100%;
    margin-bottom: 7px;
}

.videopreview
{
	width: 100%;
}

.camera-item,.camera-panel {
    padding:          3px 8px 8px 8px;
    margin-bottom:    5px;
    background-color: lightgreen;
    cursor:           pointer;
    border-radius:    4px;
    text-align:       center;
}

.camera-panel
{
    background-color: indianred;
}

.camera-item.active {
    font-weight: bold;
	background-color: #007bff !important;
	color: white;
}

.camera-item:hover {
    background-color: #cccccc;
}


.camera-item .name,.camera-panel .name
{
	line-height: 30px;
}

#leftSlider, #rightSlider
{
	width: 3px;
    background-color: aliceblue;
	cursor: w-resize;
}


#chat
{
	display: flex;
	flex-direction: column;
}

#chat #messages
{
	flex: 1;
	overflow-y: scroll;
}

#chat #chatinput
{
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
}


#chat #chatinput label
{
    flex: 1;
    width: 100%;
    margin-right: 0;
    border: 2px solid #007bff;
    box-sizing: border-box;
    border-radius: 9px;
    display: flex;
    align-items: center;
}

#chat #chatinput input[name="msg"]
{
        padding: 8px;
        font-size: 16px;
        border: none;
    border-radius: 9px;
    width: 100%;
    flex: 1;
}

#chat #chatinput input[type="submit"]
{
        display: inline-flex;
    width: 38px;
    height: 38px;
    justify-content: center;
    align-items: center;
    background-color: #007bff;
	color: white;
	border-radius: 9px;
	font-size: 16px;
	cursor: pointer;
    border-color: #007bff;
}

#chat #chatinput button.settings-button
{
        display: inline-flex;
        width: 38px;
        height: 38px;
        justify-content: center;
        align-items: center;
        border-radius: 9px;
        border: 2px solid #007bff;
        background-color: #007bff;
        color: #ffffff;
        cursor: pointer;
        font-size: 18px;
        transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#chat #chatinput button.settings-button[data-autofollow="off"]
{
        background-color: #6c757d;
        border-color: #6c757d;
}

#chat #chatinput button.settings-button:focus-visible,
#chat #chatinput input[type="submit"]:focus-visible
{
        outline: 3px solid rgba(0, 123, 255, 0.4);
        outline-offset: 2px;
}

.settings-overlay
{
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.65);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 100000;
        padding: 20px;
        box-sizing: border-box;
}

.settings-overlay.open
{
        display: flex;
}

.settings-dialog
{
        background: #ffffff;
        border-radius: 16px;
        padding: 20px;
        box-sizing: border-box;
        width: 360px;
        max-width: 100%;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.settings-header
{
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
}

.settings-header h3
{
        margin: 0;
        font-size: 20px;
}

.settings-close
{
        border: none;
        background: transparent;
        font-size: 20px;
        cursor: pointer;
        line-height: 1;
        color: #333333;
}

.settings-body
{
        display: flex;
        flex-direction: column;
        gap: 16px;
}

.setting-row
{
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        font-size: 16px;
}

.toggle-switch
{
        position: relative;
        display: inline-block;
        width: 48px;
        height: 24px;
}

.toggle-switch input
{
        opacity: 0;
        width: 0;
        height: 0;
}

.toggle-slider
{
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #c6c6c6;
        transition: 0.2s;
        border-radius: 24px;
}

.toggle-slider:before
{
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: 0.2s;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider
{
        background-color: #007bff;
}

.toggle-switch input:checked + .toggle-slider:before
{
        transform: translateX(24px);
}

#chatinput .login
{
	width: 100%;
}

#messages .hr
{
	display: block;
	text-decoration: underline;
	font-size: 20px;
	margin-bottom: 8px;
	color: gray;
}


.msg
{
    margin: 0 0 10px 0;
}

.msg .name
{
    font-weight: bold;
	display: inline-block;
    min-width: 80px;
}


.msg .time
{
	display: inline-block;
    width: 50px;
}


#videoGrid
{
	 width: 100% !important;
	 height: 100% !important;
	display: block;
}

/*#videoGrid.layout-1x2 { display: flex;}
#videoGrid.layout-2x1 { display: flex; flex-direction: column; height: 100%}
#videoGrid.layout-2x2
{
	display: block;
}*/
#videoGrid .video-slot {float: left;}

#videoGrid.layout-1x1 .video-slot { width: 100%; height: 100%; }
#videoGrid.layout-1x2 .video-slot { width: 50%; height: 100%; }
#videoGrid.layout-2x1 .video-slot { height: 50%; width: 100%;}
#videoGrid.layout-2x2 .video-slot { width: 50%;	height: 50%;}

#videoGrid video {
	object-fit: contain;
	background: #000;
	width: 100%;
    height: 100%;
}


.video-slot.slot-selectable {
    background: #1f9cff !important;
    cursor: pointer;
}

.video-slot.slot-selectable video
{
	padding: 10px !important;
	width: calc(100% - 20px) !important;
	height: calc(100% - 20px) !important;
	background-color: #1f9cff !important;
}

#videoGrid.choosing-slot {
    background: rgba(30,150,255,0.06);
}

.msg .failed
{
	color: gray;
	font-style: italic;
}


#popup
{
    position: absolute;
    left: 50%;
    top: 50%;
    background-color: white;
    padding: 0 20px 20px 20px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    border-radius: 10px;
	box-shadow: 10px 10px 10px gray;
}

#closePopup
{
	position: absolute;
	top: 10px;
	right: 10px;
	cursor: pointer;
}