@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

html {
    font-size: 100vh;
}

*{
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: rgb(36, 72, 85);
}

.poppins-bold {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
}

button {
    cursor: pointer;
}

body {
    display: grid;
    justify-content: center;
    padding: 2vh 1vw;
    margin-top: 29vh;
    margin-bottom: 15vh;
}

body,
header,
main,
footer {
    background-color: rgb(36, 72, 85);
}

header{
    display: grid;
    gap: 0.5vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 25vh;
    min-height: 25vh;
    max-height: 25vh;
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    padding: 2vh 3vw;
    border-bottom: 0.5vh solid rgb(251, 233, 208);
    z-index: 100;
}

header h1 {
    color: rgb(251, 233, 208);
    font-size: 0.18em;
}

header p {
    color: rgb(251, 233, 208);
    font-size: 0.1em;
}

header span {
    color: rgb(251, 233, 208);
}

form {
    font-size: 60vh;
}

.first-container {
    display: grid;
    gap: 0.03em;
    justify-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 48vh;
    max-height: 48vh;
    min-width: 75vw;
    max-width: 75vw;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution6.jpeg);
    background-repeat: no-repeat;
    background-position: center 60%;
    background-size: cover;
} 

.first {
    opacity: 0;  /* TODO original 1, change to 0 after finish UI editing */
    transition: opacity 2s;
    display: flex;
    color: rgb(251, 233, 208);
    align-items: center;
    justify-content: center;
    max-width: 60vw;
    padding: 0 10px;
    font-size: 0.07em;
}

.first.active {
    opacity: 1;
}

footer {
    display: flex;
    justify-content: center;
    min-height: 15vh;
    max-height: 15vh;
    position: fixed;
    bottom: 0px;
    left: 0px;
    right: 0px;
    z-index: 100;
    border-top: 0.5vh solid rgb(251, 233, 208);
}

footer .button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}

footer button {
    padding: 0.15em 1em;
    border: none;
    border-radius: 0.5em;
    margin: 0.5em;
}

/* TODO: bila click tooltip, show tooltip info with z-index 1. when out of focus, hide back */

h2 > span > svg > path{
    fill: rgb(251, 233, 208);
}

.tooltip-info{
    font-size: 0.015rem;
    position: absolute;
    top: 1vh;
    right: 2vw;
    left: 2vw;
    text-align: left;
    display: none;
    background-color: rgb(36, 72, 85);
    color: rgb(251, 233, 208);
    padding: 1vh 1vw;
    border-radius: 1vw;
    z-index: 10;
    transition: display 2s;
}

.tooltip-info span {
    color: rgb(251, 233, 208);
}

.tooltip-info.active{
    display: block;
}

.section.wrapper{
    display: none; /* TODO original grid, change to none after finish UI editing */
}

.section.wrapper.active{
    display: grid;
}

.section{
    position: relative;
    border: 1px solid rgb(251, 233, 208);
}

.general{
    display: grid;
    gap: 0.03em;
    align-items: center;
    justify-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 30vh;
    max-height: 30vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution4.jpeg);
    background-repeat: no-repeat;
    background-position: center 40%;
    background-size: cover;
}

.general h2,
.location h2,
.visual h2,
.types h2,
.sources h2,
.impacts h2 {
    font-size: 0.03rem;
    color: rgb(251, 233, 208);
    text-align: center;
}

.general label,
.visual input,
.types label,
.sources label,
.impacts label {
    font-size: 0.02rem;
    color: rgb(251, 233, 208);
}

.general .input-container-parent {
    display: grid;
    justify-content: center;
    gap: 0.1em;
    position: relative;
    width: 100%;
    max-width: 500px;
}

.general .input-container{
    display: grid;
    position: relative;
    width: 100%;
    max-width: 500px;
}

.general #invalid-nickname,
.general #invalid-email{
    position: absolute;
    top: 0px;
    right: 0px;
    color: rgb(251, 233, 208);
    background-color: rgb(230, 72, 51);
    padding: 0 0.01rem;
    border: none;
    border-radius: 0.01rem;
    font-size: 0.013rem;
    display: none;  /* TODO original grid, change to none after finish UI editing */
}

input {
    border: none;
    padding: 0.2em 1vw;
}

.general input[type="text"]:focus,
.general input[type="email"]:focus {
    box-shadow: 0px 0px 1em rgb(251, 233, 208);
    outline: none;
}

.location{
    display: grid;
    gap: 0.03em;
    align-items: center;
    padding: 0.03em 9vw;
    font-size: 45vh;
    min-height: 45vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution7.jpeg);
    background-repeat: no-repeat;
    background-position: center 80%;
    background-size: cover;
}

.location .button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45vh;
}

.button-container button {
    font-size: 0.035em;
    padding: 0.15em 1em;
    border: none;
    border-radius: 0.5em;
    background-color: rgb(251, 233, 208);
}

/* #next-btn {
    display: none;
} */

.error-message-container {
    display: flex; /* TODO original flex, change to none after finish UI editing */
    align-items: center;
    justify-content: center;
}

#location-error-message{
    color: rgb(251, 233, 208);
    background-color: rgb(230, 72, 51);
    font-size: 0.015rem;
    padding: 0 0.01rem;
    border: none;
    width: fit-content;
    text-align: center;
}

.map-container{
    display: flex;
    justify-content: center;
}

#map{
    border: 0.5vh solid rgb(251, 233, 208);
    height: 28vh;
    width: 100%;
    max-width: 500px;
}

.visual{
    display: grid;
    gap: 0.03em;
    align-items: center;
    justify-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 30vh;
    max-height: 30vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution8.jpeg);
    background-repeat: no-repeat;
    background-position: center 25%;
    background-size: cover;
}

.visual .button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30vh;
}

.visual input {
    font-size: 0.05em;
    border: 0.2vh solid rgb(251, 233, 208);
    border-radius: 0.5vh;
    padding: 1em 2em;
    max-width: 500px;
}

input[type="checkbox"] {
    width: 2.5vw;
    height: 2.5vw;
    accent-color: rgb(251, 233, 208);
}

.section-title {
    display: grid;
    grid-template-rows: 70% 30%;
}

.section-title {
    display: grid;
    justify-items: center;
}

#types-checkbox-warning,
#sources-checkbox-warning,
#impacts-checkbox-warning {
    display: block;
    text-align: center;
    color: rgb(251, 233, 208);
    background-color: rgb(230, 72, 51);
    font-size: 0.015rem;
    padding: 0 0.01rem;
    border: none;
    width: fit-content;
    text-align: center;
}

.types {
    display: grid;
    gap: 0.03em;
    align-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 30vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution9.jpeg);
    background-repeat: no-repeat;
    background-position: 65% 45%;
    background-size: cover;
}

.types .checkbox-container { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.types label {
    display: flex;
    align-items: baseline;
    font-size: 0.06em;
}

.types input[type="checkbox"] {
    margin-right: 1em;
}

.sources {
    display: grid;
    gap: 0.03em;
    align-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 30vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution3.jpeg);
    background-repeat: no-repeat;
    background-position: center 65%;
    background-size: cover;
}

/* TODO: change columns and fonts for bigger displays */
.sources .checkbox-container { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.sources label {
    display: flex;
    align-items: baseline;
    font-size: 0.06em;
}

.sources input[type="checkbox"] {
    margin-right: 1em;
}

.impacts {
    display: grid;
    gap: 0.03em;
    align-items: center;
    padding: 0.03em 9vw;
    font-size: 30vh;
    min-height: 30vh;
    min-width: 75vw;
    max-width: 75vw;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../assets/img/pollution6.jpeg);
    background-repeat: no-repeat;
    background-position: center 50%;
    background-size: cover;
}

.impacts .checkbox-container { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.impacts label {
    display: flex;
    align-items: baseline;
    font-size: 0.06em;
}

.impacts input[type="checkbox"] {
    margin-right: 1em;
}

.checkbox-container div {
    padding: 5px 5px 5px 0;
}

.types .textarea-container,
.sources .textarea-container,
.impacts .textarea-container {
    display: flex;
    justify-content: center;
}

.types textarea,
.sources textarea,
.impacts textarea{
    display: none;  /* TODO original grid, change to none after finish UI editing */
    width: 100%;
    max-width: 65vw;
    height: 30vh;
    max-height: 260px;
    resize: none;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 0.015rem;
}

@media screen and (orientation: portrait) {
    .types textarea,
    .sources textarea,
    .impacts textarea {
        font-size: 0.02rem;
    }
}