/* aanvraag formulier  */
.aanvraagformulier {
  background: var(--primairy);
  background: linear-gradient(
    45deg,
    var(--primairy) 0%,
    var(--secondairy) 100%
  );
  color: var(--white);
  padding: 2rem;

  & h2 {
    color: var(--white);
  }

  & h3 {
    color: var(--white);
    margin: 1rem 0 0 0;
  }

  & img {
    width: 15rem;
  }

  & a {
    color: white;
    text-decoration: none;
    background: linear-gradient(to right, var(--white), var(--white)),
      linear-gradient(to right, var(--white), var(--tertiary));
    background-size: 100% 2px, 0 2px;
    background-position: 100% 100%, 0 100%;
    background-repeat: no-repeat;
    transition: background-size 400ms;
  }

  & a:hover {
    background-size: 0 2px, 100% 2px;
    color: var(--tertiary);
  }
}

form {
  font-family: var(--bodytext);
  margin: 1.5rem 0;
}

fieldset {
  border: none;
}

legend {
  font-family: var(--headtext);
  font-size: 1.3rem;
  padding: 0rem 0.5rem 0.5rem 0;
  position: relative;
  width: 100%;
  /* background-color: green; */
}

.persoonlijke-gegevens legend::after,
.contact-details legend::after {
  content: "";
  width: 25%;
  height: 0.2rem;
  background-color: var(--white);
  opacity: 0.5;
  position: absolute;
  top: 39%;
  left: 14rem;
}

.contact-details legend::after {
  left: 9.8rem;
  width: 54%;
}

input {
  border: none;
  height: 1.8rem;
  padding: 0.2rem 0.2rem 0.2rem 0.5rem;
  border-radius: 0.3rem;
}

textarea {
  height: 7rem;
  border-radius: 0.3rem;
  padding: 0.2rem 0.2rem 0.2rem 0.5rem;
  font-family: var(--bodytext);
}

input[type="date"]::-webkit-datetime-edit {
  font-family: var(--bodytext);
  font-weight: 500;
}

input[type="date"]:invalid::-webkit-datetime-edit {
  font-family: var(--bodytext);
  color: var(--darkgray);
}

input[type="checkbox"] {
  border: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.5rem 0.5rem 0.5rem 0;
}

label {
  padding: 0.3rem 0rem;
}

.formfield {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0.3rem 0;
}

.checkfield {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.formfield-container {
  display: flex;
  flex-direction: column;
}

.pgb-container {
  align-items: center;
}

.contact-details {
  margin: 3rem 0;
}

button[type="submit"] {
  display: flex;
  background-color: var(--secondairy);
  color: white;
  font-family: var(--headtext);
  font-weight: 700;
  padding: 0.5rem 2rem;
  border: 2px solid var(--secondairy);
  border-radius: 0.3rem;
  font-size: 1.15rem;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  filter: drop-shadow(0px 0px 5px #031d28);
}

button[type="submit"]:hover {
  filter: drop-shadow(0px 0px 5px #031d28);
}

/* contact form  */
.contactformulier {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 1001;

  display: flex;
  justify-content: center;
  align-items: center;
  color: white;

  transform: translateX(-102vw);
  transition: transform 0.3s ease-in-out;

  & h2 {
    color: white;
    font-size: 1.4rem;
    width: 80%;
    margin: 0.5rem auto 0 auto;
  }

  & h4 {
    color: white;
  }

  & label {
    font-size: 1rem;
  }

  & span {
    font-style: italic;
  }

  & textarea {
    margin-bottom: 2rem;
  }

  & legend {
    display: none;
  }

  & button[type="submit"] {
    border: 2px solid var(--white);
  }
  & form {
    margin: 0;
  }
}

.activeform {
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

.closeform {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--white);
  border: 2px solid var(--secondairy);

  position: absolute;
  right: 2rem;
  top: 2rem;
  border-radius: 50%;

  filter: drop-shadow(0px 0px 2px #031d28);

  transition: filter 0.3s ease-in-out;
  transition: transform 0.5s ease-in-out;
  cursor: pointer;

  .st0 {
    stroke: var(--darkgray);
    stroke-width: 2.8346;
    stroke-linecap: round;
    stroke-miterlimit: 10;
    transition: stroke 0.3s ease-in-out;
  }
}

.closeform:hover {
  filter: drop-shadow(0px 0px 5px #031d28);
  transform: rotate(90deg);
  .st0 {
    stroke: var(--secondairy);
  }
}

.popcontainer {
  width: 100vw;
  height: 100vh;
  margin: 0 auto;
  padding: 2rem 0 2rem 0;
  background: var(--secondairy);
  z-index: 10002;

  overflow-y: scroll;
}

.contactwrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.cf-container {
  width: 80%;

  & h4 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
  }

  & img {
    width: 7rem;
    margin-top: 2rem;
  }
}

.linebreaker {
  height: 0.2rem;
  width: 80vw;
  opacity: 0.4;
  background-color: var(--white);
  margin: 1.5rem 0;
}

.contactinformation {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 80%;

  & h4 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
  }

  .ci-adres,
  .ci-telefoon,
  .ci-email {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;

    & img {
      width: 1.5rem;
      margin: 0.1rem 1.2rem 0 0;
    }

    & p {
      font-size: 1rem;
      line-height: 1.7rem;
    }
  }
}

/* SPINNER  */
.spinner-container,
.cf-spinner-container {
  display: none;
}

.activate-spinner,
.cf-activate-spinner {
  background-color: var(--secondairy);
  width: 14rem;
  border-radius: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0;
}

.cf-activate-spinner {
  border: 2px solid var(--white);
  width: 12.8rem;
  padding: 0.55rem 0;
}

.loader {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: block;
  border-top: 3px solid #fff;
  border-right: 3px solid transparent;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spam {
  padding-top: 1rem;
}

/* media queries  */
@media all and (min-width: 50rem) {
  .aanvraagformulier {
    width: min(50rem, 80%);
    margin: auto;
    padding: 5rem;
  }

  .persoonlijke-gegevens legend::after,
  .contact-details legend::after {
    content: "";
    width: 65%;
  }

  .contact-details legend::after {
    width: 75.6%;
  }

  .formfield-container {
    flex-direction: row;
    gap: 4rem;
  }

  .housenumber {
    width: 35%;
  }

  button[type="submit"] {
    filter: none;
  }

  /* contact form  */
  .contactformulier {
    align-items: center;
    & h2 {
      font-size: var(--h2size);
      width: 100%;
    }
  }

  .closeform {
    display: flex;
    width: 3rem;
    height: 3rem;
    position: absolute;
    right: 2.5rem;
    top: 2.5rem;
    filter: none;
  }

  .linebreaker {
    width: 0.2rem;
    height: 30rem;
    opacity: 0.4;
    background-color: var(--white);
    margin: 0 2rem 0 2rem;
  }

  .popcontainer {
    width: min(50rem, 100%);
    height: auto;
    padding: 3rem 5rem;
    border-radius: 1rem;
    filter: drop-shadow(0px 0px 5px #031d28);

    overflow-y: hidden;
  }

  .contactwrapper {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .cf-container {
    width: 60%;
  }

  .contactinformation {
    width: auto;
  }
}
