﻿/* =============================================================================
   FORMS - the Contact form and the Lunch & Learn form
   Sending is done by js/forms.js (the email address is set at the top of that file).

   <form class="site-form">
     <div class="site-form__grid">
       <label class="form-field">                  one question (label + box)
       <label class="form-field form-field--wide"> takes the full width
       <fieldset class="form-field form-field--wide"> a group of choices
     </div>
     <p class="site-form__note">...</p>
     <button class="site-form__submit">Submit</button>
   </form>
   ============================================================================= */

.site-form {
  padding: 51px;
  border: 0.8px solid rgba(245, 185, 23, 0.4);
  border-radius: 20px;
  background-color: rgba(245, 185, 23, 0.05);
  font-size: 16px;
  color: var(--black);
}

/* two questions side by side */
.site-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1.6;
}
.form-field--wide { grid-column: 1 / -1; }

/* the boxes you type in */
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 0.8px solid rgba(245, 185, 23, 0.6);
  border-radius: 6px;
  background-color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--black);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--grey); }

.form-field textarea {
  height: 92px;
  padding: 8px 12px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

/* drop-down box with a small arrow on the right */
.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 11'%3E%3Cpath d='M8 10.5 16 1.86 14.74.5 8 7.78 1.26.5 0 1.86z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  color: var(--grey);
  cursor: pointer;
}
.form-field select:valid { color: var(--black); }

/* phone box: small globe icon in front of the number */
.form-field__phone { position: relative; }
.form-field__phone input { padding-left: 44px; }
.form-field__phone svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--grey);
}

/* round (radio) and square (checkbox) choices, two per row */
.choice-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}
.choice input {
  appearance: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 0.8px solid rgba(245, 185, 23, 0.6);
  border-radius: 50%;
  background-color: var(--white);
  cursor: pointer;
}
.choice input[type="checkbox"] { border-radius: 3px; }
.choice input:checked {
  border-color: var(--yellow);
  background-color: var(--yellow);
  box-shadow: inset 0 0 0 3px var(--white);
}

.site-form__note {
  margin-top: 24px;
  line-height: 1.5;
}

.site-form__submit {
  display: block;
  width: 19.21cqw;
  height: 41px;
  margin-top: 24px;
  padding: 11px 15px;
  border: 0;
  border-radius: 5px;
  background-color: var(--yellow);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.2;
  color: var(--white);
  cursor: pointer;
}
.site-form__submit:hover { opacity: 0.85; }
.site-form__submit:disabled { opacity: 0.6; cursor: wait; }

/* "Thanks for submitting!" / error message under the button (js/forms.js) */
.site-form__message { margin-top: 12px; font-size: 15px; }
.site-form__message:empty { display: none; }


/* ---------- Tablet ---------------------------------------------------------- */
@media (max-width: 1000px) {
  .form-field > span:first-child,
  .form-field > legend { line-height: 20px; }
  .site-form__submit { width: 160px; }
}

/* ---------- Phone: one question per row ------------------------------------- */
@media (max-width: 750px) {
  .site-form { padding: 26px; }
  .site-form__grid { grid-template-columns: 1fr; }
  .form-field > span:first-child,
  .form-field > legend { font-size: 14px; line-height: 17px; }
  .choice-list { grid-template-columns: 1fr; }
  .site-form__submit { width: 100%; }
}
