@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');

/*---------------------------------------------------BIG COMPONENTS START-------------------------------------------*/
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Roboto;
    transition: all .1s;
}

body {
    height: 100vh;
    display: grid;
    place-items: center;
    background-color: #e4e4e4;
    overflow-y: auto;
}

.container {
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header,
.content,
.footer,
.section {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 15px;
}

.header,
.content {
    padding: 20px;
    display: flex;
    gap: 10px;
}

.header {
    height: 15%;
    justify-content: space-between;
    align-items: center;
}

.content {
    height: 70%;
}

.footer {
    height: 15%;
    display: flex;
}

/*------------------------------------------------MID COMPONENTS START--------------------------------------------*/

/* GENERAL SECTIONS */
.section {
    height: 100%;
}

.section h2,
.contact h2 {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #272727;
    padding: 15px;
    height: 15%;
    border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.section h2 i {
    font-size: 1.2em;
}

/* HEADER COMPONENTS */
.title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.title h2 {
    font-size: 1em;
    color: #525151;
    font-weight: normal;
}

.header a img {
    width: 225px;
}

.mode-select button,
.startButton, #startMappingTestBtn, #finishMappingBtn {
    width: 175px;
    border: none;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border-radius: 10px;
    font-size: 1em;
    margin: 10px;
    font-weight: 500;
    transition: background-color .1s, transform .1s;
}

.mode-select button:hover,
.startButton:hover {
    background-color: #459cfa;
}

.mode-select button:active,
.startButton:active {
    transform: scale(1.01);
}

/* CONTENT COMPONENTS */
#controls {
    width: 25%;
}

#controls .options,
#results .results {
    height: 85%;
    width: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

#controls .options .startButton, #startMappingTestBtn {
    position: absolute;
    bottom: -10px;
    left: -10px;
    align-self: center;
    width: 100%;
    height: 15%;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

#controls .options select, #currentRoom {
    padding: 10px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .15);
    margin-top: 10px;
    margin-bottom: 10px;
}

#controls .options label,
#results .results label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.graphs-container {
    height: 85%;
    width: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.graph {
    flex: none;
    width: 100% !important;
    height: 100%;
    padding: 15px;
    display: flex;
}

.graph .graph-item {
    width: 100% !important;
    height: 100%;
    border-radius: 15px;
    border: 2px dashed rgba(0, 0, 0, .2);
    padding: 15px;
    box-sizing: border-box;
}

.graph-item canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.graph a {
    width: 10%;
    display: grid;
    place-items: center;
    text-decoration: none;
    background-color: #f8f8f8;
}

#graphs {
    width: 50% !important;
    overflow-y: auto;
}

#graphs h2,
#results h2 {
    justify-content: space-between;
}

#graphs h2 .graphTitle,
.resultsTitle {
    display: flex;
    gap: 10px;
}

.graphTitle i {
    margin-top: 2px;
}

.testLog {
    font-size: .6em;
    font-weight: lighter;
    display: flex;
    align-items: center;
    gap: 10px;
}

#results {
    width: 25%;
}

.reportDownload {
    padding: 10px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 50%;
    transition: background-color .1s, transform .1s;
}

.reportDownload:hover {
    background-color: #007bff;
    color: white;
}

.reportDownload:active {
    transform: scale(1.05);
}

#results .results .general-average {
    font-size: 3em;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: white;
    padding: 10px;
    border-radius: 15px;
    background-color: #007bff;
}

#results .results .general-average span {
    font-size: .5em;
    color: #f7f6f6;
}

.worst-result,
.best-result {
    width: 100%;
    padding: 10px;
    text-align: center;
    border: 2px dashed;
    border-radius: 15px;
}

.worst-result {
    border-color: #DC3C22;
}

.best-result {
    border-color: #86D293;
}

.results label i {
    margin-bottom: 2px;
}

/* FOOTER COMPONENTS */
.about,
.contact,
.copyright {
    width: calc(100% / 3) !important;
    height: 100%;
}

.copyright {
    border: none;
    justify-content: center;
    align-items: center;
    display: flex;
    text-align: center;
}

.contact h2 {
    font-size: 1em;
    height: 30%;
    justify-content: center;
}

.about {
    display: flex;
}

.about h2 {
    width: 13%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px dashed rgba(0, 0, 0, .15);
}

.about h2 i {
    font-size: 1.5em;
}

.about p {
    font-size: .7em;
    width: 87%;
    padding: 7.5px;
    text-align: justify;
    display: grid;
    place-items: center;
}

.contact .socialButtons {
    display: flex;
    height: 70%;
    align-items: center;
    justify-content: space-around;
    padding: 15px;
}

.contact .socialButtons a img {
    width: 35px;
    height: 35px;
}


#mappingControls {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 85%;
    width: 100%;
    text-align: center;
    position: relative;
}

#roomInputGroup {
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

#mappingProgress {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 10px;
}
#finishMappingBtn{
    position:absolute;
    left: 0;
    width: 100%;
    margin: 0;
    bottom: 15%;
    border-radius: 0px;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.active {
    background-color: #007bff;
}

/* ----------------------------------------------------MID COMPONENTS END---------------------------------------- */

@media (max-width:768px) {
    .container {
        height: auto;
        width: 100%;
        padding: 5px;
    }

    .header,
    .content,
    .footer,
    .about,
    .contact,
    .copyright {
        width: 100% !important;
        height: auto;
        flex-direction: column;
        padding: 10px;
        align-items: center;
    }

    #controls,
    #graphs {
        height: 380px;
    }

    .section {
        width: 100% !important;
        height: auto;
    }

    #graphs {
        width: 100% !important;
    }

    .title {
        flex-direction: column;
    }

    .mode-select {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        flex-direction: column;
    }

    #graphs h2 .graphTitle,
    .resultsTitle {
        font-size: .8em;
    }  
    .controlsTitle{
        font-size: 1.1em;
    } 
}
