@import url('https://fonts.googleapis.com/css2?family=Karla:wght@200..800&display=swap');

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

body {
    background-color: hsl(148, 38%, 91%);
    font-size: 16px;
    font-family: 'Karla', sans-serif;
}

main {
    padding: 5%;
}

.container {
    background-color: white;
    width: 45vw;
    height: auto;
    max-width: 540px;
    min-width: 345px;
    margin: auto;
    padding: 2%;
    border-radius: 5%;
    display: block;
    position: relative;
}

#form {
    display: flex;
    flex-direction: column;
    position: relative;
    color: hsl(187, 24%, 22%);
} 

.input-group {
    display: flex;
    flex-direction: column;
    margin-top: 2%;
}

.option {
    margin-top: 2%;
    display: flex;
    flex-direction: column;
    border: 1px solid hsl(186, 15%, 59%); 
    border-radius: 5px;
    width: 49%;
    flex-wrap: wrap;
}

#form > div {
    margin: 1%;
}

.contact-name {
    display: flex;
    justify-content: space-between;
    width: 98%;
}

.contact-name .input-group {
    width: 49%;
}


input {
    height: 2rem;
    border-radius: 5px;
    border: 1px solid hsl(186, 15%, 59%);
    margin: 2% 0;
    cursor: pointer;
    padding: 1%;
    font-size: 1rem;
   
}

textarea {
    border-radius: 5px;
    margin: 2% 0;
    border: 1px solid hsl(186, 15%, 59%);
    cursor: pointer;
    font-size: 1rem;
    padding: 1%;
}

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

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

label {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;   /* space between radio and text */  
  }

input[type="radio"] {
    margin-left: 5%;
    margin-right: 2%;
    cursor: pointer;
    accent-color:  hsl(169, 82%, 27%);
}

input[type="checkbox"] {
    accent-color:  hsl(169, 82%, 27%);;
}

.error-msg {
    color: hsl(0, 66%, 54%);
    display: none;
    font-weight: 100;
}

button {
    margin-top: 3%;
    height: 2.5rem;
    border-radius: 5px;
    border: none;
    background-color: hsl(169, 82%, 27%);
    cursor:pointer;
}

button:hover {
    background-color: hsl(146, 24%, 51%);
}

.input-box:hover {
    border: 1px solid hsl(169, 82%, 27%);
}

.required {
    color:hsl(169, 82%, 27%);
}

.success {
    background-color: hsl(169, 82%, 27%);
    color: white;
    border-radius: 0.4rem;
    padding: 1%;
    width: max-content;
    font-size: 0.9rem;
    margin: auto;
    text-align: center;
    font-weight: 4000;
    margin-top: 0.5em;
    line-height: 2em;
    display: none;
}

.success img {
    height: 1.20em;
    margin-right: 0.5em;
    vertical-align: baseline;
}

.success span {
    font-weight: 600;
}

.selected-option {
    background-color: hsl(148, 38%, 91%);
    border: 1px solid hsl(169, 82%, 27%);
}

.input-err {
    border: 1px solid hsl(0, 66%, 54%);
}


@media (max-width: 820px) {
  .contact-name, .radio-group{
    display: flex;
    flex-direction: column;
  }

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

  .radio-group .option {
    width: 100%;
  }
}