@media (max-width: 960px) {
	
	#navbar
	{
		display: none;
	}

    #navbar.opened
    {
        display: block;
        width: 100%;
        z-index: 99999;
        top: 0px;
    }


    #container {
        margin: 0 !important;
        flex-direction: column;
        height: 100dvh !important;
    }

    body.settings-open
    {
        overflow: hidden;
    }

    #sidebar, #chat {
        width:      100% !important;
        height:     auto;
        margin: 0 !important;
        overflow-y: auto;
        flex-grow:  0;
    }


    #chat {
        flex:  1;
		display: flex !important;
	}

    #chat #chatinput input[name="msg"]
    {
        width: 100%;
    }

    #chat #chatinput button.settings-button,
    #chat #chatinput input[type="submit"]
    {
        flex-shrink: 0;
    }

    #sidebar .header {
        display: none;
    }

    #main {
        flex-grow: 0;
        #height:   100%;
    }

    #sidebar.opened {
        position:   absolute;
        top:        0;
        bottom:     0;
        left:       0;
        right:      0;
        padding:    50px 10px 0 10px;
        min-height: 100%;
        z-index:    99998;
    }

    .camera-item, .camera-panel {
        display:       none;
        margin-bottom: 0;
    }

    .camera-item.active {
        display: block;
		background-color: #dddddd !important;
		color: black !important;
		padding: 8px;
    }

    #sidebar.opened .camera-item,#sidebar.opened .camera-panel {
        display:       block !important;
        margin-bottom: 5px;
    }
	
	
	#sidebar h4
	{
		display: none;
		text-align: center;
		text-decoration: underline;
	}
	
	#sidebar.opened h4
	{
		display: block;
	}
	
    #sidebar.opened .header {
        display: block !important;
    }

	#leftSlider, #rightSlider
	{
		display: none;
	}
	
        .videopreview, #previewInterval
        {
                opacity: 0;
                height: 0;
                width: 0;
                margin: 0;
                padding: 0;
                overflow: hidden;
        }
	
	#layoutSwitch
	{
		display: none;
	}
	
	#videoGrid { display: block !important;}
	
	#videoGrid .video-slot { display: none;}
	
	#videoGrid .video-slot:first-child { display: block !important; width: 100%; height: 100%;}

	.settings-overlay.open
	{
		align-items: flex-end;
	}

	.settings-dialog
	{
		width: 100%;
		border-radius: 16px 16px 0 0;
	}

}
