@font-face {
  font-family: 'Karla';
  src: url(./assets/fonts/Karla-VariableFont_wght.ttf);
}
body{
  background: #dff1e7;
  font-family: 'Karla', sans-serif;
  /* display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; */
  position: relative;
}
main {
  width: 40%;
  background: white;
  margin: 100px auto;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
}
h1{
  margin: 0;
  margin-bottom: 20px;
  font-size: 1.8rem;
}
input:not([type="radio"], [type="checkbox"]):focus{
  outline: none;
  border-color:  hsl(169, 82%, 27%);
}
h1, label, input{
  color: hsl(187, 24%, 22%);
  cursor: pointer;
}
form{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* grid-auto-rows: 50px; */
  gap: 16px;
}
.form-item:not(.ln-item, .fn-item){
  grid-column: span 2;
}
.form-item {
  display: flex;
  gap: 12px;
}
.form-item:not(.c-item){
  flex-direction: column;
}
.form-item label, .form-item input {
  font-size: 0.9rem;
}
textarea{
  all: unset;
}
input:not([type="radio"]), textarea{
  border: 1px solid hsl(186, 15%, 59%);
  border-radius: 5px;
  padding: 10px;
}
textarea{
  height: 80px;
}
button{
  all: unset;
  background: hsl(169, 82%, 27%);
  border: 1px solid transparent;
  padding: 15px 0;
  text-align: center;
  color: hsl(148, 38%, 91%);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 40px;
  transition: 0.15s;
}
button:hover{
  border-color: hsl(169, 82%, 27%);
  background-color: hsl(148, 38%, 91%);
  color: hsl(169, 82%, 27%);
}
.radio-div{
  display: flex;
  gap: 10px;
  /* justify-content: space-between; */
}
.radio{
  flex: 1;
  border: 1px solid hsl(186, 15%, 59%);
  border-radius: 5px;
  padding: 10px;
  position: relative;
  box-sizing: border-box;
  transition: background-color 0.15s, border-color 0.15s;
}
input[type="radio"]{
  display: none;
}
.custom-radio{
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid hsl(0, 0%, 80%);
  border-radius: 50%;
  position: relative;
  margin-right: 5px;
  vertical-align: middle;
  transition: border-color 0.15s;
}
.radio label{
  vertical-align: baseline;
}
.custom-radio::before{
  position: absolute;
  display: block;
  content: '';
  background: white;
  /* border: 1px solid hsl(187, 24%, 22%); */
  border-radius: 50px;
  width: 10px;
  height: 10px;
  background-color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.15s;
}
.radio:has(input[type="radio"]:checked){
  background-color: hsl(148, 38%, 91%);
  border-color: hsl(169, 82%, 27%);
}
.radio:has(input[type="radio"]:checked) .custom-radio::before{
  background: hsl(169, 82%, 27%);
}
.radio:has(input[type="radio"]:checked) .custom-radio{
  border: 2px solid hsl(169, 82%, 27%);
}
.c-item{
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
}
.c-item input[type="checkbox"]{
  display: none;
}
.checkmark{
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid hsl(186, 15%, 59%);
  border-radius: 2px;
  position: relative;
  margin-right: 10px;
  vertical-align: middle;
  transition: all 0.15s;
}
.checkmark::after{
  content: '';
  display: none;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.c-item:has(input[type="checkbox"]:checked) .checkmark{
  background: hsl(169, 82%, 27%);
  border-color: #0c7d69;
}
.c-item:has(input[type="checkbox"]:checked) .checkmark::after{
  display: block;
}
@media (max-width: 1100px) {
  main{
    width: 50%;
  }
  .form-item{
    grid-column: span 2;
  }
}

@media (max-width: 800px){
  main{
    width: 60%;
  }
}
@media (max-width: 600px) {
  main{
    width: 70%;
  }
  .radio-div{
    flex-direction: column;
  }
  textarea{
    height: 100px;
  }
}
@media (max-width: 450px) {
  main{
    /* width: 80%; */
  }
}