@import url('https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family: "Karla", sans-serif;
    font-weight: 400;
    background-color: hsl(148, 38%, 91%);
    min-height: 100vh;
    place-content: center;
    color: hsl(187, 24%, 22%);
}
.empty, .invalid-email {
    display: none;
    font-size: 13px;
    color: hsl(0, 66%, 54%);
    margin-top: 8px;
}

.alert-message {
    display: none;
   position: absolute;
    background-color: hsl(187, 24%, 22%);
    color:hsl(0, 0%, 100%);
    padding: 25px 22px;
    border-radius: 10px;
    top: -6.2rem;
    left: 10rem;
    margin-top: 50px;
}
.alert-message div {
    display: flex;
}
.alert-message p {
    font-size: 14px;
    padding-top: 10px;
}
.alert-message h2 {
    font-size: 20px;
    padding-left: 20px;
}

label, button {
    font-size: 16px;
}

span {
    color: hsl(169, 82%, 27%);
}
.container {  
    position: relative;
    display: flex;
    flex-direction: column;
    width: 50%;
    background-color: hsl(0, 0%, 100%);
    margin-inline: auto;
    padding: 40px 30px;
    border-radius: 20px;
    margin-top: 50px;
}

h1 { 
    margin-bottom: 30px;
}
/* name-section */
.name-container{
    display: flex;
   width: 100%;
}
.name {
    display: flex;
    flex-direction: column;
    width: 50%;
}
.last {
    padding-left: 10px;
}
.first {
    padding-right: 10px;
}

/* input layout */
.box, .query-option {
    height: 50px;
    width: 100%;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid hsl(186, 15%, 59%);
}
input, button {
    cursor: pointer;
}
input {
    color: hsl(187, 24%, 22%);
    padding-left: 20px;
}
input::placeholder {
    color: hwb(189 17% 73%);
}
input:hover {
    border: 1px solid hsl(169, 82%, 27%);
}
input:focus {
    outline: 1px solid hsl(169, 82%, 27%);
}
input[type="radio"]:focus, input[type="checkbox"]:focus, input[type="radio"],
input[type="checkbox"] {
    accent-color: hsl(169, 82%, 27%);
    outline: none;
}

/* email-section */
.email-container {
    display: flex;
    flex-direction: column;
    margin-top: 25px;
}

/* query-section */
.query-container {
    display: flex;
}
.query-option {
padding-left: 20px;
place-content: center;
}
.query-option:nth-child(1) {
    margin-right: 20px;
}
.query-option label, .consent-container label {
    margin-left: 10px;
}

/* message-section */
.message-container, .query-type-container, .consent-container, .submit {
    margin-top: 30px;
}
.message-container input {
height: 100px;
} 

/* submit */
button {
background-color: hsl(169, 82%, 27%);
color:hsl(0, 0%, 100%);
}

.submit:hover {
    background-color: hsl(187, 24%, 22%);
}

.attribution { 
    font-size: 13px; 
    text-align: center; 
    margin: 30px 0;
}

.attribution a { 
    color: hsl(228, 45%, 44%); 
}



@media screen and (max-width: 800px) { 
    .container {
        margin-top: 100px;
        width: 70%;
     }
     .alert-message {
        left: 5rem;
     }
    h1 { 
        margin-bottom: 0;
    }
    /* name-section */
    .name-container{
        flex-direction: column; 
    }
    .name {
        width: 100%; 
        margin-top: 30px; 
    }
    .last {
        padding-left: 0; 
    }
    .first {
        padding-right: 0; 
    } 
     
    /* query-section */
    .query-container {
        flex-direction: column; 
    }
    /* message-section */
    .message-container input {
    height: 200px; 
    } 

}


@media screen and (max-width: 400px) {

    .container {
        margin-top: 130px;
       width: 90%;
    }
    .alert-message {
        left: rem;
        top: -7.5rem;
    }
}