@font-face {
	/* OpenSans[wdth,wght].ttf: Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) */
    font-family: 'open-sans';
    src: url("./OpenSans-VariableFont_wdth\,wght.ttf") format('truetype');
}

* {
    box-sizing: border-box;
  }

body,
html {
    margin: 0;
    padding: 0;
}


.titleHeader{
    font-size:1.6rem;
    font-family:  'open-sans', Arial, Helvetica, sans-serif;
    font-weight:500;
    display: inline-block;
    padding: 0.4rem;
    padding-left: 1rem;
    color:white;
}
.topBar{
    min-height:2.2rem;
    background-color: #164c5a;
    height:fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.buttonsBar {
    display: flex; /* Display buttons in a row */
    gap: 1rem; /* Adds space between buttons */
    margin-right:1em;
}

.topButton{
    order: 2;
    margin:0.1em;
    font-size: 2em;
    width:2.5rem;
    height:2.5rem;
    border-radius: 50%;
    margin-bottom: auto;
    background-color: #ffffff;
    color:#164c5a;
    font-weight:bolder;
    padding:0;

    font-family:'Courier New', Courier, monospace;
    transition-duration: 500ms;
    border-style: solid;
    outline:black;
    right:15px;
}

.topButton:hover{
    background-color: #b7e6ec;
    color:rgb(58, 58, 58);
}
.topButton:active{
    transition-duration: 250ms;
    background-color: #90e6f1;
    color:rgb(0, 0, 0);
    scale:0.9;
}
.topButton:focus-visible{
    background-color: #b7e6ec;
    color:black;
}


.main-container {
    max-width: 100%;
    position: relative;
    margin: auto;

    min-height:80%;
    margin-top:1rem;
    margin-left:0.5rem;
    margin-right:0.5rem;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.swal2-html-container{
    font-family:  'open-sans', Arial, Helvetica, sans-serif;
}

.swal2-title{
    font-family:  'open-sans', Arial, Helvetica, sans-serif;
}


.container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.image-container {
    position: relative;
    
    width:50%;
}

canvas{
    width:100%;
    

}
.legend {
    height: fit-content;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 5px;
    margin: 20px;
    width: 22rem;
}
.result {
    font-family: 'open-sans', Arial, sans-serif;
    font-size: 1.3rem;
}

.legend-title{
    grid-column: span 2;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.3rem;
    font-family: 'open-sans', Arial, sans-serif;
}

.legend-item{
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 5px;
    padding: 5px;
}

.textLegend{
    grid-column: 2;
    font-family: 'open-sans', Arial, sans-serif;
    font-weight: 500;
    font-size: 1rem;
}

.colorBox{
    width:30px;
    height:20px;
}

h1{
    font-family: 'open-sans', Arial, sans-serif;
    font-weight: bold;
    font-size: 1.5rem;
    color:#164c5a
}

.question{
    font-family: 'open-sans', Arial, sans-serif;
    font-weight: 500;
    font-size: 1.3rem;
    border-bottom: #164c5a 2px solid;
}

.extra-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: inherit;
    

}
.bottom-container{
    display: flex;
    gap:1rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
    padding: 1rem 1rem;

}

#showColors{
    padding: 1rem 1rem;
    background-color: #164c5a;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    justify-self: center;
}

#showColors:hover{
    background-color: #303030;
}

#colors{
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin: 1rem 2rem;
    visibility: hidden;
    
}

.botColors{
    flex:1;
    height:35px;
    transition-duration: 200ms;
    cursor: pointer;
}

.botColors:hover{
    scale:1.1;
}

@media screen and (max-width: 768px) {
    .image-container{
        width:90%;
    }
    .container{
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}