/*====================================================
 SMART HOSTEL ATTENDANCE SYSTEM
 attendance.css
====================================================*/

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:#edf2f7;
    color:#333;
}

/*-----------------------------
Container
------------------------------*/

.container{
    max-width:700px;
    margin:20px auto;
    padding:15px;
}

/*-----------------------------
Header
------------------------------*/

.header{
    background:linear-gradient(135deg,#1565c0,#1976d2);
    color:#fff;
    text-align:center;
    border-radius:12px;
    padding:20px;
    margin-bottom:18px;
    box-shadow:0 4px 12px rgba(0,0,0,.20);
}

.header h2{
    font-size:28px;
    letter-spacing:1px;
}

.version{
    margin-top:6px;
    font-size:14px;
    opacity:.9;
}

/*-----------------------------
Cards
------------------------------*/

.card{
    background:#fff;
    border-radius:12px;
    padding:18px;
    margin-bottom:18px;
    box-shadow:0 2px 8px rgba(0,0,0,.12);
}

/*-----------------------------
Search
------------------------------*/

.label{
    display:block;
    font-weight:bold;
    margin-bottom:8px;
}

.searchRow{
    display:flex;
    gap:10px;
}

.textbox{
    flex:1;
    height:52px;
    padding:0 15px;
    border:1px solid #cccccc;
    border-radius:8px;
    font-size:22px;
}

.textbox:focus{
    outline:none;
    border-color:#1976d2;
}

.btnSearch{
    min-width:120px;
    border:none;
    border-radius:8px;
    background:#1976d2;
    color:#ffffff;
    font-size:18px;
    cursor:pointer;
    padding:0 20px;
}

.btnSearch:hover{
    background:#1259a8;
}

@media (max-width:768px)
{
    .searchRow{
        flex-direction:column;
    }

    .textbox{
        width:100%;
        height:58px;
        font-size:24px;
    }

    .btnSearch{
        width:100%;
        height:55px;
        font-size:20px;
    }
}

/*-----------------------------
Student Details
------------------------------*/

.detailsTable{
    width:100%;
    border-collapse:collapse;
}

.detailsTable td{
    padding:10px;
    border-bottom:1px solid #eeeeee;
    font-size:17px;
}

.caption{
    width:140px;
    font-weight:bold;
    color:#444;
}

/*-----------------------------
Status
------------------------------*/

.statusTable{
    width:100%;
    border-collapse:collapse;
}

.statusTable td{
    padding:12px;
    border-bottom:1px solid #f2f2f2;
    font-size:17px;
}

#cameraStatus,
#gpsStatus,
#deviceStatus,
#studentStatus{
    font-weight:bold;
    color:#1565c0;
    text-align:right;
}

/*-----------------------------
Camera
------------------------------*/
@media(max-width:700px){

    #video{
        width:220px;
        height:220px;
    }

}

.cameraTitle{
    text-align:center;
    font-weight:bold;
    margin-bottom:12px;
    font-size:20px;
}

#video{
    display:block;
    width:250px;
    height:250px;
    margin:0 auto;
    border:3px solid #1565c0;
    border-radius:12px;
    background:#000;
    object-fit:cover;
}

#canvas{
    display:none;
}

/*-----------------------------
Buttons
------------------------------*/

.buttonsCard{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.btnOut,
.btnIn{
    height:60px;
    border:none;
    border-radius:10px;
    color:#fff;
    font-size:22px;
    font-weight:bold;
    cursor:pointer;
    transition:.20s;
}

.btnOut{
    background:#2e7d32;
}

.btnOut:hover:not(:disabled){
    background:#1b5e20;
}

.btnIn{
    background:#1565c0;
}

.btnIn:hover:not(:disabled){
    background:#0d47a1;
}

.btnOut:disabled,
.btnIn:disabled{
    background:#bdbdbd;
    cursor:not-allowed;
}

/*-----------------------------
Clock
------------------------------*/

.clock{
    text-align:center;
    font-size:26px;
    font-weight:bold;
    color:#1565c0;
}

/*-----------------------------
Progress
------------------------------*/

.progressMessage{
    text-align:center;
    font-size:18px;
    font-weight:bold;
    color:#2e7d32;
}

/*-----------------------------
Utility Classes
------------------------------*/

.ready{
    color:#2e7d32 !important;
}

.waiting{
    color:#ef6c00 !important;
}

.error{
    color:#d32f2f !important;
}

/*-----------------------------
Loading Spinner
------------------------------*/

.spinner{
    width:24px;
    height:24px;
    border:3px solid #dddddd;
    border-top:3px solid #1976d2;
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:auto;
}

@keyframes spin{

    from{
        transform:rotate(0deg);
    }

    to{
        transform:rotate(360deg);
    }

}

/*-----------------------------
Responsive
------------------------------*/

@media(max-width:700px){

    .container{
        width:100%;
        padding:10px;
    }

    .header h2{
        font-size:22px;
    }

    .searchRow{
        flex-direction:column;
    }

    .btnSearch{
        width:100%;
        height:48px;
    }

    .caption{
        width:100px;
    }

    .detailsTable td,
    .statusTable td{
        font-size:15px;
    }

    .btnOut,
    .btnIn{
        font-size:20px;
        height:56px;
    }

    .clock{
        font-size:22px;
    }

}