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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: Karla;
  font-size: 16px;
  font-weight: 400;
  color: hsl(187, 24%, 22%);
  background-color: hsl(148, 38%, 91%);
  display: flex;
  width: 100dvw;
  height: 100dvh;
  flex-direction: column;
  align-items: center;
}

main {
  margin: auto;
  background-color: hsl(0, 0%, 100%);
  padding: 2rem;
  width: 35dvw;
  border-radius: 10px;
  font-size: 16px;
}

input {
  height: 2.5rem;
  border-radius: 8px;
  border: 2px solid hsl(186, 15%, 59%);
  padding-left: 1rem;
}

input:hover,
input:active,
input:focus {
  border: 2px solid hsl(169, 82%, 27%);
}

#firstName,
#lastName {
  cursor: pointer;
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0rem;
  padding-left: 1rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.name-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  flex: 1;
  min-width: 0;
}

.input-text:focus {
  border-color: hsl(169, 82%, 27%);
}

.radio-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  border: 2px solid hsl(186, 15%, 59%);
  height: 2.5rem;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}

.option input {
  display: none;
}

.radio-check {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid hsl(186, 15%, 59%);
  border-radius: 10px;
  margin-left: 1rem;
}

.option input:checked + .radio-check {
  border: none;
  background-image: url(../icon-radio-selected.svg);
  background-size: 100%;
  background-position: center;
  padding: 1.5px;
}

.option:has(input:checked) {
  background-color: hsla(169, 82%, 27%, 0.149);
  border-color: hsl(169, 82%, 27%);
}

textarea {
  color: hsl(187, 24%, 22%);
  font-family: Karla;
  font-weight: 400;
  border-radius: 8px;
  border: 2px solid hsl(186, 15%, 59%);
  padding: 1rem;
}

textarea:hover,
textarea:active {
  border: 2px solid hsl(169, 82%, 27%);
}

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

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  display: none;
}

.check {
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: hsl(0, 0%, 100%);
  border: 2px solid hsl(186, 15%, 59%);
  border-radius: 3px;
}

.checkbox-container input:checked ~ .check {
  background-image: url(../icon-checkbox-check.svg);
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  padding: 1.5px;
  border: none;
}

button {
  border-radius: 8px;
  border: none;
  text-align: center;
  background-color: hsl(169, 82%, 27%);
  color: hsl(0, 0%, 100%);
  font-weight: 700;
  letter-spacing: 2px;
  padding: 1rem;
  cursor: pointer;
}

button:hover {
  background-color: hsl(187, 24%, 22%);
}

.submit-notification {
  z-index: 2;
  color: hsl(0, 0%, 100%);
  background-color: hsl(187, 24%, 22%);
  position: fixed;
  margin: auto;
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 15px 20px;
  border-radius: 8px;
  width: 30dvw;
  margin-top: 15px;
}

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

.required-message {
  color: hsl(0, 66%, 54%);
}

@media screen and (max-width: 800px) {
  .name-container {
    flex-direction: column;
  }
  .radio-container {
    flex-direction: column;
    width: 100%;
  }
  main {
    width: 80dvw;
  }
}
