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

/* .karla-<uniquifier> {
  font-family: "Karla", serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
} */

/* CSS RESET */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
    9. Create a root stacking context
  */
#root,
#__next {
  isolation: isolate;
}

/* END CSS RESET */

/* CUSTOM VARIABLES */

:root {
  --green-200-lighter: hsl(148, 38%, 91%);
  --green-600-medium: hsl(169, 82%, 27%);
  --grey-500-medium: hsl(186, 15%, 59%);
  --grey-900-darker: hsl(187, 24%, 22%);
  --white: hsl(0, 0%, 100%);
  --red: hsl(0, 66%, 54%);
}

/* END CUSTOM VARIABLES */

html {
  font-family: "Karla", serif;
  font-weight: 400;
  color: var(--grey-900-darker);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--green-200-lighter);
}

main {
  min-width: 325px;
  margin: 40px 20px;
  padding: 25px 22px;
  border: none;
  border-radius: 18px;
  background-color: var(--white);
  min-height: 800px;
}

.input-box {
  height: 48px;
  width: 100%;
  font-size: 0.9rem;
  border: solid 1px var(--grey-500-medium);
  border-radius: 8px;
  padding: 10px;
  outline: none;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.input-box:hover,
.input-box:focus,
.input-box:active {
  border: solid 1px var(--green-600-medium);
}

/* ERROR VALIDATION */

/* input[type="text"]:invalid:not(:placeholder-shown) {
  border: solid 1px var(--red);
}

input[type="email"]:invalid:not(:placeholder-shown) {
  border: solid 1px var(--red);
}

textarea:invalid:not(:placeholder-shown) {
  border: solid 1px var(--red);
} */

#fname-error {
  display: none;
}

#lname-error {
  display: none;
}

#email-error {
  display: none;
}

#query-type-error {
  display: none;
}

#message-error {
  display: none;
}

#consent-error {
  display: none;
}

/* classes for error validation are at the EOF */

/* END ERROR VALIDATION */

.modal {
  background-color: var(--grey-900-darker);
  position: absolute;
  min-width: 275px;
  max-width: 400px;
  width: 50%;
  border-radius: 15px;
  color: var(--white);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal.centered {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.modal-content div {
  display: flex;
  margin-bottom: 10px;
}

.modal-content div > span {
  margin-right: 10px;
}

.modal-content > p {
  font-size: 0.85rem;
  font-weight: 400;
}

.form-input {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.title {
  font-weight: 700;
  margin-bottom: 20px;
}

.contact-form__nameboxes {
  display: block;
}

.contact-form__asterisk {
  color: var(--green-600-medium);
  display: inline;
}

.contact-form__input1 {
  width: auto;
}

.contact-form__input1 label {
  margin-bottom: 10px;
}

.contact-form__input2 {
  width: auto;
}

.contact-form__input2 label {
  margin-bottom: 10px;
}

.contact-form__input3 label {
  margin-bottom: 10px;
}

.contact-form__input4 > p {
  margin-bottom: 10px;
}

.contact-form__query-type-boxes {
  display: block;
}

.contact-form__query-type-boxes .input-box:first-child {
  margin-bottom: 20px;
}

.contact-form__query-type-boxes .input-box {
  width: auto;
}

.contact-form__input4 div label {
  height: 100%;
  display: flex;
  align-items: center;
}

.contact-form__input4 input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
}

.contact-form__input4__label__row {
  width: 100%;
  position: relative;
  padding-left: 50px;
  font-size: 1rem;
}

.radio_btn_circle {
  position: absolute;
  top: 3px;
  left: 15px;
  width: 1.2rem;
  height: 1.2rem;
  border: solid 2px var(--green-200-lighter);
  border-radius: 50%;
  transition: all 0.4s ease;
}

/* On mouse-over, add grey background color */
.contact-form__input4 .input-box:hover input ~ .radio_btn_circle {
  background-color: #eee;
}

/* When the indicator is checked, add a green border */
.contact-form__input4 input[type="radio"]:checked ~ .radio_btn_circle {
  background-color: var(--white);
  border: solid 1.5px var(--green-600-medium);
  transition: all 0.5s ease-in;
}

.contact-form__input4 .input-box:has(input[type="radio"]:checked) {
  background-color: var(--green-200-lighter);
  border: solid 1px var(--green-600-medium);
}

/* Show the indicator when checked */
.contact-form__input4 input:checked ~ .radio_btn_circle:after {
  display: block;
}

/* Create the indicator (hidden when not checked) and set border attribute */
.radio_btn_circle:after {
  content: "";
  position: absolute;
  display: none;
}

/* Style the indicator */
.contact-form__input4 .radio_btn_circle:after {
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  background-color: var(--green-600-medium);
  border-radius: 50%;
  transform: translate(-51%, -50%);
}

.contact-form__input5 > label {
  margin-bottom: 10px;
}

.contact-form__input5 textarea {
  width: 100%;
  height: 250px;
  padding: 10px;
  font-size: 0.9rem;
  border: solid 1px var(--grey-500-medium);
  border-radius: 8px;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form__input5 textarea:focus:hover,
.contact-form__input5 textarea:active {
  border: solid 1px var(--green-600-medium);
}

.radio_btn_checkbox {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0px;
  width: 1.2rem;
  height: 1.2rem;
  border: solid 2px var(--grey-500-medium);
  transition: all 0.4s ease;
}

.contact-form__input6 {
  width: 100%;
  flex-direction: column;
  justify-content: center;
  margin-top: 40px;
  margin-bottom: 40px;
  border: none;
}

/* On mouse-over, add grey background color */
.contact-form__input6:hover input ~ .radio_btn_checkbox {
  background-color: #eee;
}

/* When the checkbox is checked, add a green background and border */
.contact-form__input6 input:checked ~ .radio_btn_checkbox {
  background-color: var(--green-600-medium);
  border-color: var(--green-600-medium);
  transition: all 0.5s ease-in;
}

/* Create the checkmark/indicator (hidden when not checked) and set border attribute */
.radio_btn_checkbox:after {
  content: "";
  position: absolute;
  display: none;
  border: solid 2px var(--grey-500-medium);
}

/* Show the checkmark when checked */
.contact-form__input6 input:checked ~ .radio_btn_checkbox:after {
  display: block;
}

/* Style the checkmark/indicator */
.contact-form__input6 .radio_btn_checkbox:after {
  left: 52%;
  top: 45%;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: translate(-50%, -50%) rotate(45deg);
}

.contact-form__input6 > label {
  height: 50%;
  position: relative;
  padding-left: 35px;
}

.contact-form__input6 input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.contact-form__input6 label::after {
  content: " *";
  color: var(--green-600-medium);
}

.contact-form__button {
  height: 58px;
  width: 100%;
  color: var(--white);
  font-weight: 700;
  background-color: var(--green-600-medium);
  border: none;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: background-color 0.4s ease-in-out;
}

.contact-form__button:hover {
  background-color: hsl(169deg 92.15% 13.79%);
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

/* ERROR VALIDATION CLASSES */

.error-input {
  border: solid 1px var(--red) !important;
}

.error-message {
  height: 1rem;
  color: var(--red);
  margin-top: 8px;
}
