#form {
  position: relative;
  background-color: var(--colour-4);
  border-radius: 20px;
  padding: 30px;
  width: min(90vw, 500px);
}

#form > h3 {
  margin-top: 0;
  color: var(--colour-5);
}

#form label {
  color: var(--colour-5);
  font-size: 0.9rem;
  font-weight: 500;
}

.htmx-indicator {
  position: absolute;
  display: none;
  inset: 0;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-white);
  opacity: 1;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

#spinner-image {
  width: 50px;
  height: 50px;
}

/* main is stretched to fill the viewport (body>main{flex:1 0 auto} in
   base.css) so the page footer sits at the bottom even on short pages.
   Without this, .contact-fold only grows to fit its own content and the
   leftover stretched space below it shows body's bare background instead -
   a gap between the page and the footer. flex:1 makes it fill that space. */
.contact-main {
  display: flex;
  flex-direction: column;
}

.contact-fold {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 80px min(5vw, 50px);
  background-color: var(--color-dark-blue);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
}

.contact-fold .text {
  width: min(90vw, 500px);
  &>h1 {
    color: var(--colour-4);
  }
}

.contact-fold h2 {
  margin-bottom: 0;
  color: var(--colour-4);
}

.contact-fold p {
  margin: 0;
  color: var(--colour-4);
}

.contactform {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 100%;
}

.contactform div {
  margin: 0.3rem 0;
  width: 100%;
}

.contactform input,
.contactform select,
.contactform textarea {
  font-family: "Inter", sans-serif;
  width: 100%;
  padding: 0.5rem 1rem;
  margin-top: 5px;
  border: 1px solid var(--colour-6);
  border-radius: 8px;
}

.contactform input:focus,
.contactform select:focus,
.contactform textarea:focus {
  outline: none;
  border-color: var(--color-light-blue);
}

.contact-button {
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  background-color: var(--color-red);
  border-radius: 9999px;
  color: var(--colour-4);
}

.contact-button:hover {
  background-color: var(--color-light-blue);
}

.thankyou {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: min(80vw, 300px);
  min-height: 400px;
}

.thankyou p {
  color: var(--colour-5);
}

@media screen and (min-width: 768px) {
  .contact-fold {
    /* no margin:auto here - that shrinks the box to its content width and
       centers it, which is what was leaving the two cream sidebars now
       that .contact-fold is a stretched flex child filling the page. */
    flex-direction: row;
    justify-content: center;
    gap: 4rem;
  }

  #form,
  .contact-fold .text {
    width: min(90vw, 480px);
  }
  .contact-fold .text {
    margin-top: -100px;
  }
}
