/*
 * Booking Panel — a photograph carrying the copy, beside a white form card.
 *
 *   .hmt-book            rounded frame, two columns (one below 900px)
 *   .hmt-book__copy      photo + dark gradient, copy and contact buttons
 *   .hmt-book__form      white card: its own heading, the form, a privacy line
 */

.hmt-book {
  --hm-book-bg: #1A1A18;
  --hm-field: #F6F4EE;
  --hm-field-line: #E6E1D4;
  --hm-book-radius: 28px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  border-radius: var(--hm-book-radius);
  overflow: hidden;
  background: var(--hm-book-bg);
  box-shadow: 0 30px 70px -40px rgba(26, 26, 24, 0.55);
}

/* ── Copy column: photo across the top, fading into the panel ── */
.hmt-book__side {
  display: flex;
  flex-direction: column;
  color: #fff;
}
.hmt-book__media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.hmt .hmt-book__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
/* Bleeds 2px past the photo and goes solid a little early, so no sub-pixel
   sliver of the image shows as a hairline where it meets the panel. */
.hmt-book__media { background: var(--hm-book-bg); }
.hmt-book__media::after {
  content: "";
  position: absolute;
  inset: -1px 0 -2px;
  background: linear-gradient(180deg, rgba(26, 26, 24, 0) 45%, rgba(26, 26, 24, 0.55) 74%, var(--hm-book-bg) 96%);
}
.hmt-book__copy {
  position: relative;
  flex: 1;
  padding: clamp(34px, 5vw, 56px);
}
/* Under a photo the copy starts on the fade, not below a hard edge. */
.hmt-book__media + .hmt-book__copy { margin-top: -54px; padding-top: 0; isolation: isolate; }
/*
 * The photo frame usually ends on a fractional pixel, and the browser
 * antialiases the photo and its overlay differently along that edge — a 1px
 * light line through the heading. A 4px strip of the panel colour sits over
 * the seam, behind the copy's own text (z-index -1 inside the isolated copy).
 */
.hmt-book__media + .hmt-book__copy::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--hm-book-overlap, 54px) - 2px);
  height: 4px;
  z-index: -1;
  background: var(--hm-book-bg);
}

.hmt-book__copy .hmt-label { color: var(--hm-gold); }
.hmt-book__copy h2 { color: #fff; font-size: clamp(1.85rem, 3.6vw, 2.55rem); margin: 14px 0 16px; }
.hmt-book__intro { color: rgba(255, 255, 255, 0.78); font-weight: 300; max-width: 46ch; }

.hmt-book__points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hmt-book__points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}
.hmt-book__points svg {
  width: 20px;
  height: 20px;
  flex: none;
  padding: 3px;
  border-radius: 50%;
  background: rgba(193, 171, 109, 0.2);
  color: var(--hm-gold);
}

.hmt-book__contact { margin-top: 30px; }

/* ── Form card ── */
.hmt-book__form {
  display: flex;
  flex-direction: column;
  background: var(--hm-paper);
  padding: clamp(30px, 4.4vw, 56px);
}
.hmt-book__formhead { margin-bottom: 26px; }
.hmt-book__formhead h3 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
.hmt-book__formhead p { margin-top: 8px; font-size: 14px; color: var(--hm-ink-soft); }
.hmt-book__privacy {
  display: block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--hm-body);
  text-align: center;
}
/* Inline, so the lock stays beside the first word when the line wraps. */
.hmt-book__privacy svg { display: inline-block; width: 13px; height: 13px; margin: -2px 7px 0 0; vertical-align: middle; color: var(--hm-gold-dark); }

/*
 * Gravity Forms, brought onto the page's design.
 *
 * Three stylesheets compete for these fields: Woodmart's own input rules
 * (height 42px, boxed border), Woodmart's Gravity overrides
 * (`.gform-theme--foundation .gfield input[type=text]`, 0,3,1) and the
 * Gravity Forms theme framework (up to 0,5,1, loaded later). Every selector
 * here starts `.hmt .hmt-book__form .gform_wrapper` (0,3,0) so that, with the
 * element added, it clears all three. Brand colours reach Gravity's own custom
 * properties through the shortcode's `styles` attribute — see the widget.
 */
.hmt .hmt-book__form .gform_wrapper { margin: 0; }
.hmt .hmt-book__form .gform_wrapper .gform_fields { row-gap: 14px; column-gap: 14px; }

.hmt .hmt-book__form .gform_wrapper .gfield_label,
.hmt .hmt-book__form .gform_wrapper .gform-field-label {
  font-family: var(--hm-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hm-ink);
  margin-bottom: 10px;
}
.hmt .hmt-book__form .gform_wrapper .gfield_required { color: var(--hm-gold-dark); }

/* Filled fields: a warm tint at rest, white with a gold ring when in use. */
.hmt .hmt-book__form .gform_wrapper input[type="text"],
.hmt .hmt-book__form .gform_wrapper input[type="email"],
.hmt .hmt-book__form .gform_wrapper input[type="tel"],
.hmt .hmt-book__form .gform_wrapper input[type="number"],
.hmt .hmt-book__form .gform_wrapper input[type="date"],
.hmt .hmt-book__form .gform_wrapper select,
.hmt .hmt-book__form .gform_wrapper textarea {
  width: 100%;
  height: auto;
  min-height: 54px;
  block-size: auto;
  min-block-size: 54px;
  font-family: var(--hm-text);
  font-size: 15px;
  line-height: 1.4;
  color: var(--hm-ink);
  background-color: var(--hm-field);
  border: 1px solid var(--hm-field-line);
  border-radius: 14px;
  padding: 15px 18px;
  box-shadow: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.hmt .hmt-book__form .gform_wrapper input:hover,
.hmt .hmt-book__form .gform_wrapper select:hover,
.hmt .hmt-book__form .gform_wrapper textarea:hover { border-color: var(--hm-hair); }
.hmt .hmt-book__form .gform_wrapper input:focus,
.hmt .hmt-book__form .gform_wrapper select:focus,
.hmt .hmt-book__form .gform_wrapper textarea:focus {
  outline: none;
  background-color: var(--hm-paper);
  border-color: var(--hm-gold);
  box-shadow: 0 0 0 4px rgba(193, 171, 109, 0.18);
}
.hmt .hmt-book__form .gform_wrapper ::placeholder { color: #8A877E; opacity: 1; }

/*
 * The one !important in the toolkit: Woodmart's site-wide Custom CSS carries
 * `.gform_wrapper select { height: 39px !important }`, which clips the text
 * once the field has our padding. Scoped to this panel, so every other form
 * on the site keeps that rule.
 */
.hmt .hmt-book__form .gform_wrapper select {
  height: auto !important;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  cursor: pointer;
  font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%239C844A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
}
/* Gravity sizes the textarea from its rows attribute (10 → 250px). */
.hmt .hmt-book__form .gform_wrapper textarea {
  height: 112px;
  block-size: 112px;
  min-height: 112px;
  min-block-size: 112px;
  resize: vertical;
}

/*
 * Treatment choices — the checkbox group each service reveals — as chips.
 * The form hides every label (hidden_label); the group's heading is shown
 * here because the chips alone do not say what is being asked.
 */
.hmt .hmt-book__form .gform_wrapper .gfield--type-checkbox {
  padding: 18px;
  border-radius: 16px;
  background: var(--hm-gold-tint);
}
.hmt .hmt-book__form .gform_wrapper .gfield--type-checkbox.hidden_label .gfield_label {
  /* A <legend> is drawn on the fieldset's top edge; floating it puts it inside. */
  float: left;
  width: 100%;
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 12px;
  clip: auto;
  clip-path: none;
  overflow: visible;
  display: block;
}
.hmt .hmt-book__form .gform_wrapper .gfield--type-checkbox .gfield_label::before { content: "Choose from "; }
.hmt .hmt-book__form .gform_wrapper .gfield--type-checkbox .ginput_container { clear: both; }
/* Gravity's "vertical" choice alignment would stack the chips one per row. */
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice {
  position: relative;
  display: block;
  margin: 0;
}
/* The real input stays in place for keyboards and screen readers, invisible. */
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: none;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--hm-field-line);
  border-radius: var(--hm-pill);
  background: var(--hm-paper);
  font-family: var(--hm-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hm-ink);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice:hover label { border-color: var(--hm-ink); }
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice:has(input:checked) label {
  background: var(--hm-ink);
  border-color: var(--hm-ink);
  color: #fff;
}
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice:has(input:checked) label::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--hm-gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hmt .hmt-book__form .gform_wrapper .gfield_checkbox .gchoice:has(input:focus-visible) label {
  outline: 2px solid var(--hm-gold);
  outline-offset: 2px;
}

/*
 * Single-choice questions (experience level, how a course is funded) as the
 * same chips, one selectable at a time. Gravity keeps these labels visible.
 */
.hmt .hmt-book__form .gform_wrapper .gfield_radio {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice { position: relative; display: block; margin: 0; }
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice label {
  display: inline-flex;
  align-items: center;
  max-width: none;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--hm-field-line);
  border-radius: var(--hm-pill);
  background: var(--hm-field);
  font-family: var(--hm-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--hm-ink);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice:hover label { border-color: var(--hm-ink); }
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice:has(input:checked) label { background: var(--hm-ink); border-color: var(--hm-ink); color: #fff; }
.hmt .hmt-book__form .gform_wrapper .gfield_radio .gchoice:has(input:focus-visible) label { outline: 2px solid var(--hm-gold); outline-offset: 2px; }

/* The turnstile check is a widget, not a question — no heading over it. */
.hmt .hmt-book__form .gform_wrapper .gfield--type-turnstile .gfield_label { display: none; }
.hmt .hmt-book__form .gform_wrapper .gfield--type-turnstile:not(:has(iframe, .cf-turnstile)) { display: none; }

/* Errors: a red ring on the field and a short line under it. */
.hmt .hmt-book__form .gform_wrapper .gfield_error input,
.hmt .hmt-book__form .gform_wrapper .gfield_error select,
.hmt .hmt-book__form .gform_wrapper .gfield_error textarea { border-color: #C0473A; background-color: #FFF8F7; }
.hmt .hmt-book__form .gform_wrapper .gfield_validation_message,
.hmt .hmt-book__form .gform_wrapper .validation_message {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: #B03A2E;
}
.hmt .hmt-book__form .gform_wrapper .gform_validation_errors {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #F0C9C4;
  border-radius: 14px;
  background: #FFF6F5;
  box-shadow: none;
}
.hmt .hmt-book__form .gform_wrapper .gform_validation_errors .gform_submission_error {
  font-family: var(--hm-text);
  font-size: 13.5px;
  font-weight: 500;
  color: #8E2F25;
}

/* Sent: the confirmation reads as part of the card, not a system message. */
.hmt .hmt-book__form .gform_confirmation_message {
  padding: 26px 24px;
  border-radius: 16px;
  background: var(--hm-gold-tint);
  font-size: 15px;
  color: var(--hm-ink);
}

/* ── Submit: the site's pill with its arrow badge ── */
.hmt .hmt-book__form .gform_wrapper .gform_footer,
.hmt .hmt-book__form .gform_wrapper .gform-page-footer { margin: 22px 0 0; padding: 0; }
.hmt .hmt-book__form .gform_wrapper .gform_footer .gform_button.button,
.hmt .hmt-book__form .gform_wrapper .gform-page-footer .gform_button.button {
  /*
   * `.gform_button.button` (both classes are on the button and on the older
   * input variant) takes this to 0,6,0 — Gravity's own
   * `… > button:not([id*=mceu_]):not(.mce-open)` is 0,5,1 and loads later.
   * Gravity's framework sizes its button with logical properties
   * (min-block-size, padding-inline, border-start-start-radius…) through
   * --gf-local-* variables, and those beat the physical ones below. Point its
   * own variables at ours as well, so both routes agree.
   */
  --gf-local-radius: var(--hm-pill);
  --gf-local-height: auto;
  --gf-local-min-height: 58px;
  --gf-local-padding-x: 26px;
  --gf-local-padding-y: 11px;
  --gf-local-line-height: 1;
  --gf-local-font-size: 13px;
  --gf-local-font-weight: 600;
  --gf-local-font-family: var(--hm-text);
  --gf-local-bg-color: var(--hm-gold);
  --gf-local-color: #fff;
  --gf-local-shadow: none;
  --gf-local-border-color: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  inline-size: 100%;
  height: auto;
  block-size: auto;
  min-height: 58px;
  min-block-size: 58px;
  padding: 11px 64px;
  padding-block: 11px;
  padding-inline: 64px;
  margin: 0;
  font-family: var(--hm-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--hm-gold);
  border: 0;
  border-radius: var(--hm-pill);
  box-shadow: 0 14px 28px -16px rgba(156, 132, 74, 0.9);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
/*
 * The arrow badge, drawn in CSS: Gravity re-renders the form after a failed
 * submission without any of our filters, so markup added to the button would
 * vanish exactly when the visitor tries again.
 */
.hmt .hmt-book__form .gform_wrapper .gform_footer .gform_button.button::after,
.hmt .hmt-book__form .gform_wrapper .gform-page-footer .gform_button.button::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 17 17 7M9 7h8v8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat,
    rgba(255, 255, 255, 0.22);
}
.hmt .hmt-book__form .gform_wrapper .gform_footer .gform_button.button:hover,
.hmt .hmt-book__form .gform_wrapper .gform_footer .gform_button.button:focus-visible,
.hmt .hmt-book__form .gform_wrapper .gform-page-footer .gform_button.button:hover {
  --gf-local-bg-color: var(--hm-gold-dark);
  --gf-local-color: #fff;
  background: var(--hm-gold-dark);
  color: #fff;
  box-shadow: 0 16px 30px -16px rgba(156, 132, 74, 1);
}
.hmt .hmt-book__form .gform_wrapper .gform_ajax_spinner { margin-left: 10px; }

/* Side by side, the photo takes whatever height the form leaves over, so the
   dark column never ends in an empty band below the buttons. */
@media (min-width: 901px) {
  .hmt-book__media { flex: 1 1 auto; aspect-ratio: auto; min-height: 300px; }
  .hmt-book__copy { flex: 0 0 auto; }
}

@media (max-width: 900px) {
  .hmt-book { grid-template-columns: 1fr; --hm-book-radius: 22px; }
}
@media (max-width: 600px) {
  /* Edge to edge on a phone: the card is the section. */
  .hmt-bookwrap .hmt-wrap { padding-inline: 12px; }
  .hmt-book__copy,
  .hmt-book__form { padding: 30px 22px; }
  .hmt-book__media + .hmt-book__copy { margin-top: -40px; padding-top: 0; --hm-book-overlap: 40px; }
  .hmt .hmt-book__form .gform_wrapper .gform_fields { row-gap: 12px; }
}
