/* RJG Mediaworks: terminal form. Divi's Contact Form module dressed as the prototype's .term card.
   Markup (forms.py): Group.term > Code.term__bar + Contact Form.term__form (form.et_pb_contact_form = the card body).
   Printed after divi.css and before site.css (see functions.php). */
.rjg .term__form.et_pb_contact_form_container { display: block; margin: 0; padding: 0; background: none; border: 0; }
.rjg .term__form .et_pb_contact { margin: 0; padding: 0; }
.rjg .term__form form.et_pb_contact_form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 0; align-items: start;
  margin: 0; padding: 14px clamp(22px, 3vw, 40px) clamp(24px, 3vw, 40px); counter-reset: fld;
}
.rjg .term__form .et_pb_contact_field {
  display: grid; gap: 4px; width: auto; min-width: 0; margin: 0; padding: 18px 0 6px; border: 0; background: none;
}
.rjg .term__form .term__chips, .rjg .term__form .term__fld--wide, .rjg .term__form .et_contact_bottom_container, .rjg .term__form .term__note { grid-column: 1 / -1; }
.rjg .term__form .et_pb_contact_form_label, .rjg .term__form .et_pb_contact_field_options_title {
  display: block; padding: 0; font: 400 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.rjg .term__form .et_pb_contact_field > .et_pb_contact_form_label::before { counter-increment: fld; content: "0" counter(fld) " /"; margin-right: 6px; color: rgba(245, 245, 244, .85); }
.rjg .term__form .term__fld--opt > .et_pb_contact_form_label::after { content: " (optional)"; opacity: .7; }
.rjg .term__form .et_pb_contact_main_title { display: none; } /* the form title is only for the email subject (the card has its own caption bar) */
.rjg .term__form .et_pb_contact_field input[type="text"], .rjg .term__form .et_pb_contact_field input[type="email"], .rjg .term__form .et_pb_contact_field input[type="tel"],
.rjg .term__form .et_pb_contact_field textarea, .rjg .term__form .et_pb_contact_field select {
  width: 100%; margin: 0; padding: 10px 0 12px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: none; outline: none;
  font: 400 18px/1.4 var(--sans); letter-spacing: -.01em; color: #fff; box-shadow: none; transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.rjg .term__form .et_pb_contact_field textarea { min-height: 99px; }
.rjg .term__form .term__fld--r4 textarea { min-height: 124px; } /* the enquiry message has rows=4 in the prototype */
.rjg .term__form .et_pb_contact_field input::placeholder, .rjg .term__form .et_pb_contact_field textarea::placeholder { color: rgba(245, 245, 244, .3); opacity: 1; }
.rjg .term__form .et_pb_contact_field input:focus, .rjg .term__form .et_pb_contact_field textarea:focus { border-bottom-color: var(--lime); box-shadow: 0 1px 0 var(--lime); color: #fff; background: none; }
/* chips: Divi's checkbox field */
.rjg .term__form .term__chips { margin-top: 20px; padding-top: 0; }
.rjg .term__form .term__chips .et_pb_contact_field_options_title { display: none; }
.rjg .term__form .term__chips .et_pb_checkbox_handle { display: none; }
.rjg .term__form .et_pb_contact_field_options_wrapper { display: block; }
.rjg .term__form .et_pb_contact_field_options_list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.rjg .term__form .et_pb_contact_field_checkbox { position: relative; display: block !important; margin: 0; padding: 0; width: auto !important; flex: none; }
.rjg .term__form .et_pb_contact_field_checkbox input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1; -webkit-appearance: auto; appearance: auto; }
.rjg .term__form .et_pb_contact_field_checkbox label {
  display: inline-flex !important; align-items: center !important; height: 38px; margin: 0; padding: 0 16px !important; line-height: 1 !important; border: 1px solid var(--line-2); border-radius: 999px;
  font: 400 13.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: rgba(245, 245, 244, .8); transition: background .3s, color .3s, border-color .3s;
}
.rjg .term__form .et_pb_contact_field_checkbox label i { display: none !important; }
.rjg .term__form .et_pb_button_wrapper { margin: 0 !important; width: auto !important; flex: none !important; text-align: left !important; float: none !important; }
.rjg .term__form .et_pb_contact_field_checkbox:hover label { border-color: rgba(255, 255, 255, .5); }
.rjg .term__form .et_pb_contact_field_checkbox input:checked + label { background: #fff; border-color: #fff; color: #050505; }
.rjg .term__form .et_pb_contact_field_checkbox input:focus-visible + label { outline: 2px solid var(--lime); outline-offset: 3px; }
/* send button = .btn.btn--light.btn--lg with the arrow */
.rjg .term__form .et_contact_bottom_container { display: flex; align-items: center; justify-content: flex-start !important; flex-wrap: wrap; gap: 20px; margin: 30px 0 0; padding: 0; float: none; width: 100% !important; justify-self: stretch !important; text-align: left; }
.rjg .term__form .et_pb_contact_submit.et_pb_button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; float: none; width: auto; height: 56px; margin: 0; padding: 0 30px;
  border: 1px solid transparent; border-radius: 999px; background: #fff; color: #050505; cursor: pointer; white-space: nowrap;
  font: 500 15px/1 var(--sans) !important; letter-spacing: -.01em; text-transform: none; transition: box-shadow .45s var(--ease), background .3s, color .3s;
}
.rjg .term__form .et_pb_contact_submit.et_pb_button::after {
  content: ""; position: static; inset: auto; transform: none; translate: none; display: block; flex: none; width: 16px; height: 16px; margin: 0; opacity: 1; line-height: 1; font-size: 0; transition: transform .45s var(--ease);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050505' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12h15M13 6l6 6-6 6'/></svg>") center / 16px no-repeat;
}
.rjg .term__form .et_pb_contact_submit.et_pb_button:hover { padding: 0 30px; border-color: transparent; background: #fff; color: #050505; box-shadow: 0 0 0 1px rgba(198, 244, 50, .55), 0 0 30px rgba(198, 244, 50, .42), 0 0 90px rgba(198, 244, 50, .2); }
.rjg .term__form .et_pb_contact_submit.et_pb_button:hover::after { transform: translateX(4px); }
/* Divi's success / error message */
.rjg .term__form .et-pb-contact-message { margin: 0; padding: 18px clamp(22px, 3vw, 40px) 22px; font: 400 12.5px/1.5 var(--mono); color: rgba(245, 245, 244, .85); }
.rjg .term__form .et-pb-contact-message:empty { display: none; }
.rjg .term__form .et-pb-contact-message p { display: inline; margin: 0; padding: 0; } /* so the lime > sits on the same line as the words */
.rjg .term__form .et-pb-contact-message ul { margin: 6px 0 0; padding: 0; list-style: none; }
.rjg .term__form .et-pb-contact-message::before { content: "> "; color: var(--lime); }
.rjg .term__form form.et_pb_contact_form .term__note { margin: 18px 0 0; }
.rjg .term__form .et_contact_bottom_container::after { content: ""; flex: 1 1 240px; min-height: 18.75px; } /* the empty slot where the prototype shows its message line */
@media (max-width: 640px) {
  .rjg .term__form form.et_pb_contact_form { grid-template-columns: 1fr; }
  .rjg .term__form .et_pb_contact_submit.et_pb_button, .rjg .term__form .et_pb_contact_submit.et_pb_button:hover { height: 54px; padding: 0 24px; }
}
