:root {
  --green-200: hsl(148, 38%, 91%);
  --green-600: hsl(169, 82%, 27%);
  --white: hsl(0, 0%, 100%);
  --grey-500: hsl(186, 15%, 59%);
  --grey-900: hsl(187, 24%, 22%);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-family: "Karla", sans-serif;
}

h1 {
  margin-bottom: 2rem;
}

label {
  display: block;
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--grey-500);
  cursor: pointer;
  outline: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover {
  border-color: var(--green-600);
  outline: none;
}

button {
  color: var(--white);
  background-color: var(--green-600);
  border: none;
  padding: 1rem;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: rgb(248, 241, 230);
}

main {
  min-height: 700px;
  height: auto;
  max-width: 700px;
  width: 100%;
  background: var(--white);
  border-radius: 30px;
  padding: 2.3rem;
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
}

form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.name-container {
  display: flex;
  gap: 1rem;
}

.first-name-container,
.last-name-container {
  flex: 1;
}

.error-message {
  display: block;
  margin-top: 1rem;
}

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-box {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--grey-500);
  border-radius: 8px;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0;
}

.radio-box:hover {
  border-color: var(--green-600);
}

.radio-box input[type="radio"]:checked {
  background: var(--green-600);
}

.radio-box label {
  margin-bottom: 0;
}

#message {
  height: 8rem;
}

.checkbox-input-field {
  display: flex;
  gap: 10px;
}

.checkbox-container label {
  margin-bottom: 0;
}

.checkbox-container input[type="checkbox"] {
  accent-color: var(--green-600);
}

.success-message {
  background-color: var(--green-600);
  color: white;
  padding: 2rem;
  border-radius: 10px;
}

.success-title {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.hidden {
  display: none;
}

.attribution a {
  text-decoration: none;
  color: var(--green-600);
}

.attribution a:hover {
  text-decoration: underline;
  color: var(--grey-900);
}

@media (max-width: 768px) {
  main {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
  }

  .name-container {
    flex-direction: column;
  }

  .radio-group {
    flex-direction: column;
  }
}

@media (max-width: 425px) {
  main {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
  }
}
