@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200;300;400;500;600;700&display=swap');

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Lucida Console", "Courier New", monospace;
}

/* Elements */
canvas{
    position:absolute;
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(5, 12, 252, 0.5);
    top: 160px;
    left: 15%;
}

body{
    margin:0;
    padding:0;
}

/* Settings options */
select{
    float: right;
    margin-left: 25px;
    width: 110px;
    height: 20px;
    font-weight: bold;
}

option {
    display: inline-block;
    width: auto;
    text-align: center;
    padding: 7px 14px;
    max-width: 100px;
    font-weight: bold;
}

/* Classes */
.main_box{
    position: relative;
    background: url('../images/cluster.jpg') center no-repeat;
    background-size: cover;
    height: 100vh;
    width: 100%;
}

.main_box .side_panel{
    position: fixed;
    height: 100vh;
    width: 280px;
    left: -280px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.side_panel .logo{
    position: absolute;
    width: 100%;
    height: 60px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.side_panel .logo a{
    color: #fff;
    font-size: 25px;
    font-weight: 500;
    position: absolute;
    left: 50px;
    line-height: 60px;
    text-decoration: none;
}

.side_panel .menu{
    position: absolute;
    top: 80px;
    width: 100%;
}

.side_panel .menu li{
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    margin-top: 6px;
    padding: 14px 20px;
    transition: all 0.3s linear;
}

.side_panel .menu i{
    color: #fff;
    font-size: 20px;
    padding-right: 8px;
}

.chkbox {
    float: right;
    margin-right: 80px;
    width: 20px;
    height: 20px;
}

/* Social media logos. */
.side_panel .social_media{
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    cursor: pointer;
}

.social_media i{
    padding: 0 3px;
    color: #fff;
    opacity: 0.6;
    font-size: 20px;
    transition: all 0.2s linear;
}

.social_media i:hover{
    opacity: 1;
}
/*******************************************/  

/* About and contacts hidden text feature. */
.hidden_text {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
  }
  
.hidden_text .show_text {
    visibility: hidden;
    width: 400px;
    max-width: 1000px;
    background-color: black;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 5px 0;
    margin-left: 20%;

    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    font-size: 10px;
}

.hidden_text:hover .show_text {
    visibility: visible;
}
/*******************************************/  

/* Buttons to open and close settings. */
#check{
    display: none;
}

.main_box .btn_open_settings i{
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    position: absolute;
    left: 16px;
    line-height: 60px;
    cursor: pointer;
    opacity: 1;
    transition: all 0.3s linear;
}

.side_panel .btn_close_settings i{
    color: #fff;
    font-size: 25px;
    line-height: 60px;
    position: absolute;
    left: 240px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s linear;
}

.btn_open_settings i:hover{
    font-size: 29px;
}

.btn_open_settings i:hover{
    font-size: 24px;
}

#check:checked ~ .side_panel{
    left: 0;
}

#check:checked ~ .btn_open_settings i{
    opacity: 0;
}

#check:checked ~ .side_panel .btn_close_settings i{
    opacity: 1;
}
/*******************************************/  

/* Lock Screen Button */
.lock_screen i{
    color: #fff;
}

.lock_screen{
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.close-app{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border: 1px solid rgba(143,208,255,0.8);
    border-radius: 4px;
    color: #fff;
    background: rgba(19, 48, 64, 0.8);
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s linear, border-color 0.2s linear;
}

.close-app:hover,
.close-app:focus-visible{
    border-color: #fff;
    background: rgba(43, 101, 130, 0.9);
}

/* Toggle Camera Switch */
.switch {
    position: absolute;
    top: 1%;
    right: 20%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
  }
  
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    display: block;
    order: 2;
    flex: 0 0 56px;
    width: 56px;
    height: 28px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background-color: rgba(0, 0, 0, 0.45);
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: rgba(19, 93, 119, 0.8);
}

input:focus + .slider {
    box-shadow: 0 0 1px #0d3d63;
}

input:checked + .slider:before {
    -webkit-transform: translateX(30px);
    -ms-transform: translateX(30px);
    transform: translateX(30px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 23px;
}

.toggle-label{
    order: 1;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
}

.slider.round:before {
    border-radius: 50%;
}
/*******************************************/  

/* Input Increase and Decrease */
.quantity-field {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px; 
    height: 20px;
    margin: 0 auto;    
    margin-left: 127px;
    margin-top: -20px;
  }
  
  .quantity-field .value-button{ 
    border: 1px solid #ddd;
    margin: 0px;
    width: 30px;
    height: 100%;   
    padding: 0;
    background: #eee; 
    outline: none;
    cursor: pointer;
  }
  
  .quantity-field .value-button:hover {
    background: rgb(230, 230, 230);
  }
  
  .quantity-field .value-button:active{
    background: rgb(210, 210, 210);
  }
  
  .quantity-field .decrease-button {
    margin-right: -2px;
    border-radius: 8px 0 0 8px;
  }
  
  .quantity-field .increase-button {
    margin-left: -2px;
    border-radius: 0 8px 8px 0;
  }
   
  .quantity-field .number{
    display: inline-block;
    text-align: center;
    border: none;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin: 1px;
    width: 50px;
    height: 100%;
    line-height: 20px;
    font-size: 10pt;
    box-sizing: border-box; 
    background: black;
  }
  
  .quantity-field .number::selection{
    background: none;
  }
/*******************************************/  

#cameraOutput{
    display: none;
    position: absolute;
    top: 1%;
    left: 88%;
}

#cameraOutput canvas{
    position: absolute;
    max-width: 170px;
    max-height: 130px;
    top: 0;
    left: 0;
}

#calibrateBtn{
    display:none;
    background: lightgreen;
    margin: green;

    margin-top: 0px;
    top: 80px;
    width: 100%;
    
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    
    padding: 14px 20px;
    transition: all 0.3s linear;
}

#calibrateBtn:hover{
    border-left: 1px solid #fff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

#sliders{
    display:none;
    font-size: 15px;
}

@media (max-width: 600px){
    .main_box{
        min-height: 100svh;
        overflow: hidden;
    }

    canvas#myCanvas{
        top: 150px;
        left: 50%;
        width: min(400px, calc(100vw - 24px));
        height: auto;
        transform: translateX(-50%);
    }

    .close-app{
        padding: 10px 16px;
        font-size: 14px;
    }

    .switch{
        top: 18%;
        right: auto;
        left: 50%;
        height: 36px;
        transform: translateX(-50%);
    }

    .slider{
        flex-basis: 56px;
        width: 56px;
        height: 28px;
    }

    input:checked + .slider:before {
        -webkit-transform: translateX(30px);
        -ms-transform: translateX(30px);
        transform: translateX(30px);
    }

    .hidden_text .show_text{
        position: fixed;
        top: 96px;
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        max-height: none;
        margin-left: 0;
        padding: 10px;
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, 0.35);
        z-index: 10003;
        line-height: 1.4;
    }

    #cameraOutput{
        top: 150px;
        left: 50%;
        transform: translateX(-50%);
    }

    .main_box .side_panel{
        width: min(280px, calc(100vw - 24px));
    }

    .side_panel .menu li{
        font-size: 16px;
    }

    .quantity-field{
        margin-left: auto;
        margin-right: 0;
    }
}
