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

html{
    /* font */
    font-family: "Karla", sans-serif;
    --font-weight-regular: 400;
    --font-weight-bold: 700;
    --font-size-regular: 0.8rem;

    /* colors */
    --dark-green: hsl(187, 24%, 22%);
    --light-green: hsl(186, 15%, 59%);
    --very-light-green: hsl(145, 38%, 91%);
    --bright-green: hsl(169, 82%, 27%);
    --red: hsl(0, 66%, 54%);
}

fieldset{
    border: none;
}

legend{
    visibility: hidden;
    max-height: 0;
}

textarea{
    resize: none;
}

body{
    width: 100%;
    height: 100vh;
    display: grid;
    place-items: center;
    background-color: var(--very-light-green);
}

.contact-form{
    width: 450px;
    height: auto;
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    z-index: 1;
}

.contact-form h2{
    margin-bottom: 15px;
}

#form{
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: var(--font-size-regular);
    color: var(--dark-green);
}


.personal-info{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.name{
    display: flex;
    justify-content: space-between;
}

.name input{
    width: 200px;
    height: 35px;
}

.email input{
    width: 100%;
    height: 35px;
}

input{
    border-radius: 5px;
    border-style: none;
    border: 1px solid var(--dark-green);
    padding-left: 10px;
}

input:focus{
    outline: 1px solid var(--bright-green);
    border: none;
}

.query-type{
    display: flex;
    flex-direction: column;
    gap: 10px
}

.query{
    display: flex;
    justify-content: space-between;
}

.general-query{
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    height: 35px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid var(--dark-green);
}

.support-query{
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    height: 35px;
    width: 200px;
    border-radius: 5px;
    border: 1px solid var(--dark-green);
}

.query label{
    cursor: pointer;
}

.query div:has(input:checked){
   background-color: var(--very-light-green); 
   border: 1px solid var(--bright-green);
}

input[type='radio']{
    accent-color: var(--bright-green);
}

input[type='checkbox']{
    accent-color: var(--bright-green);
    outline: none;
}

.message{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message textarea{
    height: 70px;
    padding: 10px;
    border-radius: 5px;
    border-style: none;
    border: 1px solid var(--dark-green);
    margin-bottom: 10px;
}

.message textarea:focus{
    outline: none;
}

.consent{
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}


button{
    height: 40px;
    color: white;
    background-color: var(--bright-green);
    border-style: none;
    border-radius: 5px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
}

button:hover {
    background-color: hsl(171, 83%, 14%);
}

.error-msg{
    color: var(--red);
    visibility: hidden;
    font-size: 0.6rem;
}

.error-active{
    border: 1px solid var(--red);
}

.modal{
    z-index: 2;
    width: 350px;
    height: auto;
    background-color: hsl(185, 24%, 22%);
    margin: auto;
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: var(--font-size-regular);
    display: flex;
    flex-direction: column;
    gap: 10px;
    visibility: hidden;
    max-height: 0;
    transition: max-height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    margin-bottom: 10px;
}

.modal.active{
    visibility: visible;
    max-height: 200px;
    opacity: 1;
}

.modal header{
    display: flex;
    align-items: center;
    gap: 10px;
}

@media(max-width:600px){
    *{
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    .modal{
        width: 70vw;
        margin-top: 1vh;
        margin-bottom: 1vh;
    }

    body{
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-top: auto;
    }
    
    .contact-form{
        width: 90vw;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .name{
        display: flex;
        flex-direction: column;
    }

    .input-group input{
        width: 100%;
    }

    .query {
        display: flex;
        flex-direction: column;
        gap: 2vh;
    }

    .query div{
        width: 100%;
    }
}
