/**
 * @file
 * HABD member forms: node add, edit and delete, the restricted page, Add
 * team member, and the account pages (log in, forgotten password, one-time
 * login) (includes/habd.forms.inc, templates/system/page--habd-form.html.twig).
 *
 * The forms keep the base theme's Bootstrap 3 markup (form-group,
 * form-control, panels, tabs-left) and their widgets (Chosen, CKEditor 5,
 * inline entity forms, paragraphs, office hours), so everything is restyled
 * from one root: F = .habd-form.habd:not(#habd-reset). Its id term outranks
 * the legacy rules, Bootstrap's and the per-widget ones, without !important.
 *
 * Fields follow the design system's search bar and filter panel: a label
 * over a cream field, gold focus ring. Sections are white cards; the field
 * group tabs are the sticky contents panel (N.1).
 */

/* ==========================================================================
   Page: the forest band, and the frame the form sits in
   ========================================================================== */
.habd-form-page {
  padding: 0;
  background: var(--habd-cream);
  --hf-frame: 1180px;
  --hf-field: #FFFDF8;
  --hf-line: #D8CBA6;
  --hf-hair: #EFE6CE;
  --hf-danger: #8F3423;
}
.habd.habd-form-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--habd-forest-mid), var(--habd-forest) 52%, var(--habd-forest-deep));
}
.habd.habd-form-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 70% at 86% 12%, rgba(229, 200, 140, 0.18) 0, rgba(10, 32, 22, 0) 66%);
}
.habd-form-hero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  box-sizing: border-box;
  max-width: calc(var(--hf-frame) + 2 * var(--habd-gutter));
  margin: 0 auto;
  padding: 36px var(--habd-gutter) 44px;
}
.habd.habd-form-hero .habd-form-hero__back {
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--habd-gold);
}
.habd.habd-form-hero .habd-form-hero__back:hover {
  color: var(--habd-gold-light);
}
.habd.habd-form-hero .habd-form-hero__kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--habd-gold);
}
.habd.habd-form-hero .habd-form-hero__title {
  margin: 0;
  max-width: 900px;
  font-family: var(--habd-serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.04;
  color: var(--habd-ink-light);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.habd.habd-form-hero .habd-form-hero__lead {
  margin: 4px 0 0;
  max-width: 720px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: #C6D2C7;
  text-wrap: pretty;
}
.habd.habd-form-hero .habd-form-hero__help {
  font-size: 15px;
  color: var(--habd-gold);
  border-bottom: 1px solid rgba(201, 162, 74, 0.5);
}

.habd-form-page__body {
  box-sizing: border-box;
  max-width: calc(var(--hf-frame) + 2 * var(--habd-gutter));
  margin: 0 auto;
  padding: 36px var(--habd-gutter) 80px;
}
/* A form without tabs reads best at one column's width; the band's text
   lines up with it. */
.habd-form-page:not(:has(.field-group-tabs-wrapper)) :is(.habd-form-page__body, .habd-form-hero__inner) {
  max-width: calc(880px + 2 * var(--habd-gutter));
}

/* The account pages (log in, forgotten password, one-time login): a narrow
   card, one full-width button, and the links under it. */
.habd-form-page:has(:is(.habd-form-page__body--login, .habd-form-page__body--password, .habd-form-page__body--reset)) :is(.habd-form-page__body, .habd-form-hero__inner) {
  max-width: calc(520px + 2 * var(--habd-gutter));
}
/* style.css pads the user pages' main 180px 20px 100px, and custom.css their
   content region 140px at narrow widths. */
#main-content.habd-form-page,
#main-content.habd-form-page .region-content {
  padding: 0;
}
/* style.css paints the login button with a gradient, white text and its
   own padding from a two-id rule (body.path-user form#user-login-form
   button#edit-submit). */
#main-content .habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary {
  padding: 15px 30px;
  border: 1px solid var(--habd-gold);
  border-radius: 999px;
  background: var(--habd-gold);
  color: var(--habd-forest);
}
#main-content .habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary:is(:hover, :focus-visible) {
  background: var(--habd-gold-light);
}
/* #main-content: the card rule further down sets the bottom padding to 0
   (the member forms' Save bar sits on the card's edge) at the same weight. */
#main-content :is(.habd-form-page__body--login, .habd-form-page__body--password, .habd-form-page__body--reset) .habd-form.habd:not(#habd-reset) {
  padding-bottom: 36px;
}
#main-content :is(.habd-form-page__body--login, .habd-form-page__body--password, .habd-form-page__body--reset) .habd-form.habd:not(#habd-reset) .form-actions {
  position: static;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
#main-content :is(.habd-form-page__body--login, .habd-form-page__body--password, .habd-form-page__body--reset) .habd-form.habd:not(#habd-reset) .form-actions .habd-btn {
  width: 100%;
}
.habd-form-account-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--habd-sans);
  font-size: 16px;
  font-weight: 300;
  color: #4A463D;
}
.habd-form-account-links a {
  color: var(--habd-gold-ink);
  text-decoration: underline;
  text-decoration-color: rgba(122, 97, 30, 0.4);
  text-underline-offset: 3px;
}
.habd-form-account-links a:hover {
  color: var(--habd-ink);
  text-decoration-color: currentColor;
}

/* Status and error messages, above the form. */
.habd-form-page__messages {
  margin-bottom: 24px;
}
.habd-form-page .alert {
  margin: 0 0 12px;
  padding: 16px 20px 16px 22px;
  border: 1px solid var(--hf-hair);
  border-left: 3px solid var(--habd-gold-deep);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: none;
  font-family: var(--habd-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  color: #3A3730;
  text-shadow: none;
}
.habd-form-page .alert-danger,
.habd-form-page .alert-error {
  border-left-color: var(--hf-danger);
  background: #FCF4F1;
}
.habd-form-page .alert-warning {
  border-left-color: #B7862A;
  background: #FFF8E8;
}
.habd-form-page .alert a {
  color: var(--habd-gold-ink);
  text-decoration: underline;
}
.habd-form-page .alert .close {
  opacity: 0.5;
  text-shadow: none;
}

/* ==========================================================================
   The form: a white card, or (with tabs) a contents panel beside one
   ========================================================================== */
.habd-form.habd:not(#habd-reset) {
  font-family: var(--habd-sans);
  font-size: 16px;
  color: var(--habd-ink);
  --ck-color-base-border: #D8CBA6;
  --ck-color-toolbar-border: #D8CBA6;
  --ck-color-toolbar-background: #F6F1E2;
  --ck-color-focus-border: #9A7B2E;
  --ck-color-button-on-background: #F3EAD5;
  --ck-color-button-on-hover-background: #EFE3C4;
  --ck-color-button-default-hover-background: #EFE6CE;
  --ck-border-radius: 12px;
  --ck-font-face: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --ck-focus-ring: 1px solid #9A7B2E;
  --ck-inner-shadow: none;
  --ck-focus-outer-shadow: 0 0 0 3px rgba(201, 162, 74, 0.22);
}
.habd-form.habd:not(#habd-reset):not(:has(.field-group-tabs-wrapper)) {
  padding: 40px 44px 0;
  border: 1px solid var(--habd-cream-line);
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 16px 36px rgba(90, 74, 32, 0.08);
}

/* ==========================================================================
   Fields
   ========================================================================== */
.habd-form.habd:not(#habd-reset) .form-group {
  margin: 0 0 26px;
}
.habd-form.habd:not(#habd-reset) .form-group .form-group {
  margin-bottom: 0;
}
.habd-form.habd:not(#habd-reset) .form-item + .form-item,
.habd-form.habd:not(#habd-reset) .panel-body > .form-item + .form-item {
  margin-top: 20px;
}
.habd-form.habd:not(#habd-reset) label.control-label,
.habd-form.habd:not(#habd-reset) .form-item > label:not(.option),
.habd-form.habd:not(#habd-reset) .field-multiple-table th .label,
.habd-form.habd:not(#habd-reset) .field-multiple-table th h4 {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-family: var(--habd-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) label.option {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  text-transform: none;
  color: #3A3730;
}
.habd-form.habd:not(#habd-reset) .form-required::after,
.habd-form.habd:not(#habd-reset) .form-required {
  color: var(--habd-gold-ink);
}
.habd-form.habd:not(#habd-reset) .help-block,
.habd-form.habd:not(#habd-reset) .description {
  margin: 8px 0 0;
  font-family: var(--habd-sans);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: #6C6858;
}
.habd-form.habd:not(#habd-reset) .help-block ul,
.habd-form.habd:not(#habd-reset) .description ul {
  margin: 4px 0 0;
  padding-left: 18px;
}
.habd-form.habd:not(#habd-reset) .help-block a,
.habd-form.habd:not(#habd-reset) .description a {
  color: var(--habd-gold-ink);
}

.habd-form.habd:not(#habd-reset) .form-control,
.habd-form.habd:not(#habd-reset) input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="number"], [type="date"], [type="time"], [type="password"], [type="search"], [type="datetime-local"]),
.habd-form.habd:not(#habd-reset) select,
.habd-form.habd:not(#habd-reset) textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 50px;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background-color: var(--hf-field);
  box-shadow: none;
  font-family: var(--habd-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--habd-ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.habd-form.habd:not(#habd-reset) :is(.form-control, input, select, textarea)::placeholder {
  color: #9C978A;
  opacity: 1;
}
.habd-form.habd:not(#habd-reset) :is(.form-control, input, select, textarea):focus {
  border-color: var(--habd-gold-display);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.22);
}
.habd-form.habd:not(#habd-reset) textarea {
  min-height: 120px;
  resize: vertical;
}
.habd-form.habd:not(#habd-reset) select:not([multiple]) {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237A611E' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.habd-form.habd:not(#habd-reset) select[multiple] {
  padding: 8px;
}
.habd-form.habd:not(#habd-reset) .select-wrapper::after {
  display: none;
}
/* Short values do not need the full width. */
.habd-form.habd:not(#habd-reset) :is(input[type="number"], input[type="date"], input[type="time"], input[type="tel"]) {
  max-width: 320px;
}
.habd-form.habd:not(#habd-reset) .form-inline .form-control {
  display: block;
  width: 100%;
}
.habd-form.habd:not(#habd-reset) input:is([type="checkbox"], [type="radio"]) {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--habd-gold-ink);
}
.habd-form.habd:not(#habd-reset) .checkbox,
.habd-form.habd:not(#habd-reset) .radio {
  margin: 0 0 8px;
}
/* Bootstrap floats the box into the label's padding; set them side by
   side instead. */
.habd-form.habd:not(#habd-reset) :is(.checkbox, .radio) label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 0;
  margin: 0;
  padding-left: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) :is(.checkbox, .radio) input:is([type="checkbox"], [type="radio"]) {
  position: static;
  margin: 0;
}

/* File inputs: the native control, with the button drawn as an outline
   pill. */
.habd-form.habd:not(#habd-reset) input[type="file"] {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-size: 15px;
  color: #6C6858;
}
.habd-form.habd:not(#habd-reset) input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 10px 18px;
  border: 1px solid var(--habd-gold-display);
  border-radius: 999px;
  background: #FFFFFF;
  font-family: var(--habd-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--habd-gold-ink);
  cursor: pointer;
}
.habd-form.habd:not(#habd-reset) input[type="file"]::file-selector-button:hover {
  background: #F3EAD5;
}
.habd-form.habd:not(#habd-reset) .image-widget,
.habd-form.habd:not(#habd-reset) .form-managed-file {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  padding: 16px;
  border: 1px dashed #DCCFA6;
  border-radius: 14px;
  background: var(--hf-field);
}
.habd-form.habd:not(#habd-reset) .image-widget .form-managed-file {
  padding: 0;
  border: 0;
  background: none;
}
.habd-form.habd:not(#habd-reset) .image-preview img,
.habd-form.habd:not(#habd-reset) .image-widget img {
  display: block;
  max-width: 120px;
  height: auto;
  border-radius: 10px;
}
.habd-form.habd:not(#habd-reset) .file a {
  color: var(--habd-gold-ink);
}

/* An input with an add-on: the link widget's autocomplete throbber sits
   inside the field's right edge. */
.habd-form.habd:not(#habd-reset) .input-group {
  position: relative;
  display: block;
  width: 100%;
}
.habd-form.habd:not(#habd-reset) .input-group .form-control {
  border-radius: 12px;
  padding-right: 44px;
}
.habd-form.habd:not(#habd-reset) .input-group-addon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  color: #B9B09A;
  transform: translateY(-50%);
}

/* The address widget's country select sits in an input group beside the
   AJAX throbber, which only shows while it is working. */
.habd-form.habd:not(#habd-reset) .input-group > .select-wrapper {
  display: block;
  width: 100%;
}
.habd-form.habd:not(#habd-reset) .input-group > .select-wrapper + .input-group-addon {
  right: 44px;
}
.habd-form.habd:not(#habd-reset) .input-group-addon .ajax-progress-throbber:not(.glyphicon-spin) {
  visibility: hidden;
}

/* Errors. */
.habd-form.habd:not(#habd-reset) .has-error :is(.form-control, .chosen-single, .chosen-choices),
.habd-form.habd:not(#habd-reset) .error:is(.form-control, input, select, textarea) {
  border-color: var(--hf-danger);
  box-shadow: 0 0 0 3px rgba(143, 52, 35, 0.12);
}
.habd-form.habd:not(#habd-reset) .has-error .control-label,
.habd-form.habd:not(#habd-reset) .has-error .help-block {
  color: var(--hf-danger);
}
.habd-form.habd:not(#habd-reset) .form-item--error-message {
  margin-top: 6px;
  font-size: 14px;
  color: var(--hf-danger);
}

/* ==========================================================================
   Sections: fieldsets and details (Bootstrap panels)
   ========================================================================== */
.habd-form.habd:not(#habd-reset) .panel {
  margin: 0 0 26px;
  border: 1px solid var(--hf-hair);
  border-radius: 16px;
  background: #FDFBF3;
  box-shadow: none;
}
.habd-form.habd:not(#habd-reset) .panel .panel {
  background: #FFFFFF;
}
.habd-form.habd:not(#habd-reset) .panel > .panel-heading {
  padding: 18px 22px 0;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: none;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .panel > .panel-heading .panel-title,
.habd-form.habd:not(#habd-reset) .panel > .panel-heading > a.panel-title {
  display: block;
  margin: 0;
  font-family: var(--habd-serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .panel > .panel-heading > a.panel-title {
  position: relative;
  padding-right: 28px;
  text-decoration: none;
}
/* A collapsible section's chevron. */
.habd-form.habd:not(#habd-reset) .panel > .panel-heading > a.panel-title::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 4px;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--habd-gold-ink);
  border-bottom: 1.5px solid var(--habd-gold-ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.habd-form.habd:not(#habd-reset) .panel > .panel-heading > a.panel-title.collapsed::after,
.habd-form.habd:not(#habd-reset) .panel > .panel-heading > a.panel-title[aria-expanded="false"]::after {
  transform: translateY(-30%) rotate(-135deg);
}
.habd-form.habd:not(#habd-reset) .panel > .panel-body,
.habd-form.habd:not(#habd-reset) .panel > .panel-collapse > .panel-body {
  padding: 14px 22px 22px;
  border: 0;
}
.habd-form.habd:not(#habd-reset) .panel > .panel-body > .help-block:first-child,
.habd-form.habd:not(#habd-reset) .panel > .panel-collapse > .panel-body > .help-block:first-child {
  margin: 0 0 16px;
}

/* ==========================================================================
   Field group tabs: the contents panel and the pane card
   ========================================================================== */
/* Bootstrap's .clearfix adds ::before and ::after, which would take the first
   and last cells of these grids and flex rows. */
.habd-form.habd:not(#habd-reset) :is(.tabbable.tabs-left, .image-widget, .form-managed-file, .form-actions, .filter-wrapper)::before,
.habd-form.habd:not(#habd-reset) :is(.tabbable.tabs-left, .image-widget, .form-managed-file, .form-actions, .filter-wrapper)::after {
  content: none;
  display: none;
}
.habd-form.habd:not(#habd-reset) .tabbable.tabs-left {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin: 0;
  border: 0;
}
.habd-form.habd:not(#habd-reset) .tabbable.tabs-left > .vertical-tabs-list {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--habd-offset-top, 0px) + var(--habd-header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  float: none;
  width: auto;
  max-height: calc(100vh - var(--habd-offset-top, 0px) - var(--habd-header-h) - 40px);
  margin: 0;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid #EBE3CF;
  border-radius: 16px;
  background: #FFFFFF;
  list-style: none;
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li {
  float: none;
  margin: 0;
  border: 0;
  background: none;
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > a {
  display: block;
  margin: 0;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: var(--habd-sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.35;
  text-decoration: none;
  color: #3F3A31;
  transition: background-color 0.2s ease;
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > a:hover,
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > a:focus-visible {
  background: #F6F1E2;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li.active > a,
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li.selected > a {
  background: #F3EAD5;
  box-shadow: inset 3px 0 0 var(--habd-gold-deep);
  font-weight: 500;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list .summary {
  display: none;
}
/* A tab holding a required field: a gold dot (js/habd/habd-forms.js); one
   with an error, a red one. */
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > :is(a.habd-form__tab--required, a.habd-form__tab--error) > span:first-child::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--habd-gold-deep);
  vertical-align: middle;
}
.habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > a.habd-form__tab--error > span:first-child::after {
  background: var(--hf-danger, #8F3423);
}
.habd-form.habd:not(#habd-reset) .tabbable.tabs-left > .tab-content {
  min-width: 0;
  margin: 0;
  padding: 36px 40px 14px;
  border: 1px solid var(--habd-cream-line);
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 16px 36px rgba(90, 74, 32, 0.08);
}
/* Fields outside the tabs (the title, on some forms): a card in the pane
   column, above the panes. */
.habd-form.habd:not(#habd-reset):has(.field-group-tabs-wrapper) > .form-group:not(.form-actions):not(:has(> .entity-meta)) {
  margin: 0 0 20px 278px;
  padding: 24px 28px;
  border: 1px solid var(--habd-cream-line);
  border-radius: 18px;
  background: #FFFFFF;
}
.habd-form.habd:not(#habd-reset) .habd-form__pane-title {
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hf-hair);
  font-family: var(--habd-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.08;
  color: var(--habd-ink);
}
/* The empty "Vertical Tabs" wrapper core adds for the advanced settings. */
.habd-form.habd:not(#habd-reset) .form-item:has(> .entity-meta):not(:has(> .entity-meta > :not(input[type="hidden"]))) {
  display: none;
}

/* The AI assistant on the business profile forms: a forest card above. */
.habd-form.habd:not(#habd-reset) .hab-ai-magic {
  margin: 0 0 28px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(150deg, var(--habd-forest-mid), #0A2016 58%, var(--habd-forest-deep));
  box-shadow: 0 20px 44px rgba(10, 32, 22, 0.24);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading {
  padding: 26px 30px 0;
  background: none;
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading::after {
  display: none;
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading > a.panel-title,
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading .panel-title {
  font-size: 30px;
  color: var(--habd-ink-light);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading > a.panel-title::before {
  color: var(--habd-gold);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic > .panel-heading > a.panel-title::after {
  border-color: var(--habd-gold);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic .panel-body {
  padding: 14px 30px 30px;
  background: none;
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic :is(label.control-label, .help-block, .description) {
  color: #C6D2C7;
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic label.control-label {
  color: var(--habd-ink-light);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic .hab-ai-build {
  margin-top: 8px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--habd-gold);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  font-family: var(--habd-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--habd-forest);
}
.habd-form.habd:not(#habd-reset) .hab-ai-magic .hab-ai-build:hover:not(:disabled) {
  background: var(--habd-gold-light);
}

/* ==========================================================================
   Buttons inside the form (Remove, Add another, inline forms). Not .js-hide:
   core hides those once JS runs (the Upload button beside a file picker).
   ========================================================================== */
.habd-form.habd:not(#habd-reset) :is(.btn, button.form-submit, input.form-submit, .button):not(.habd-btn):not(.hab-ai-build):not(.link):not(.js-hide):not(.habd-form__delete) {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid var(--habd-gold-display);
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: none;
  font-family: var(--habd-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  color: var(--habd-gold-ink);
  cursor: pointer;
}
.habd-form.habd:not(#habd-reset) :is(.btn, button.form-submit, input.form-submit, .button):not(.habd-btn):not(.hab-ai-build):not(.link):not(.js-hide):not(.habd-form__delete):hover {
  background: #F3EAD5;
  color: var(--habd-gold-ink);
}
.habd-form.habd:not(#habd-reset) :is(.btn-danger, [name$="remove_button"], .remove-button):not(.habd-btn) {
  border-color: rgba(143, 52, 35, 0.45);
  color: var(--hf-danger);
}
.habd-form.habd:not(#habd-reset) :is(.btn, button, .button) .glyphicon,
.habd-form.habd:not(#habd-reset) :is(.btn, button, .button) .icon {
  display: none;
}
/* Text buttons: Show row weights, column toggles. */
.habd-form.habd:not(#habd-reset) button.link {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--habd-sans);
  font-size: 13px;
  color: var(--habd-gold-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.habd-form.habd:not(#habd-reset) .tabledrag-toggle-weight-wrapper {
  margin: 0 0 6px;
  text-align: right;
}
.habd-form.habd:not(#habd-reset) a.btn,
.habd-form.habd:not(#habd-reset) .help-block a.icon-before {
  text-decoration: none;
}

/* ==========================================================================
   Tables: multiple values, paragraphs, inline entity forms, opening hours
   ========================================================================== */
.habd-form.habd:not(#habd-reset) table {
  width: 100%;
  margin: 0 0 12px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: none;
}
.habd-form.habd:not(#habd-reset) table > thead,
.habd-form.habd:not(#habd-reset) table > thead > tr {
  background: none;
}
.habd-form.habd:not(#habd-reset) table > thead > tr > th {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--habd-cream-line);
  background: none;
  font-family: var(--habd-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--habd-gold-ink);
}
.habd-form.habd:not(#habd-reset) table > tbody > tr > td {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--hf-hair);
  background: none;
  vertical-align: middle;
}
.habd-form.habd:not(#habd-reset) table > tbody > tr:nth-of-type(odd),
.habd-form.habd:not(#habd-reset) table > tbody > tr:hover {
  background: none;
}
.habd-form.habd:not(#habd-reset) table > tbody > tr.drag,
.habd-form.habd:not(#habd-reset) table > tbody > tr.drag-previous {
  background: #FDF7E6;
}
.habd-form.habd:not(#habd-reset) .field-multiple-table th.field-label {
  padding: 0 0 8px;
  border-bottom: 0;
  text-align: left;
  letter-spacing: 0;
  text-transform: none;
}
.habd-form.habd:not(#habd-reset) .field-multiple-table th.field-label :is(label, h4) {
  margin: 0;
  font-family: var(--habd-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .field-multiple-table > thead > tr > th:not(.field-label) {
  border-bottom: 0;
}
.habd-form.habd:not(#habd-reset) .field-multiple-table > tbody > tr:first-child > td {
  border-top: 1px solid var(--hf-hair);
}
.habd-form.habd:not(#habd-reset) .field-multiple-table th .form-required {
  font-size: inherit;
}
.habd-form.habd:not(#habd-reset) td .form-group,
.habd-form.habd:not(#habd-reset) td .form-item {
  margin: 0;
}
.habd-form.habd:not(#habd-reset) .field-add-more-submit,
.habd-form.habd:not(#habd-reset) .clearfix > .field-add-more-submit {
  margin-top: 4px;
}
/* Opening hours: compact time fields; the day as a plain label. */
.habd-form.habd:not(#habd-reset) table[id*="office-hours"] td,
.habd-form.habd:not(#habd-reset) .office-hours-label {
  background: none;
}
.habd-form.habd:not(#habd-reset) .office-hours-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .office-hours :is(input, select) {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 15px;
}
.habd-form.habd:not(#habd-reset) .office-hours a {
  font-size: 13px;
  color: var(--habd-gold-ink);
}

/* Paragraphs: each item reads as a card. */
.habd-form.habd:not(#habd-reset) .paragraph-type-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px;
}
.habd-form.habd:not(#habd-reset) .paragraph-type-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--habd-gold-ink);
}
.habd-form.habd:not(#habd-reset) .paragraphs-subform {
  padding: 4px 0 0;
}
.habd-form.habd:not(#habd-reset) .paragraphs-tabs {
  display: none;
}

/* ==========================================================================
   Chosen selects
   ========================================================================== */
.habd-form.habd:not(#habd-reset) .chosen-container {
  width: 100% !important;
  font-family: var(--habd-sans);
  font-size: 16px;
}
.habd-form.habd:not(#habd-reset) .chosen-container.form-control {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}
.habd-form.habd:not(#habd-reset) .chosen-container-single .chosen-single {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 50px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background: var(--hf-field);
  box-shadow: none;
  font-weight: 300;
  line-height: 1.4;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .chosen-container-single .chosen-default {
  color: #9C978A;
}
.habd-form.habd:not(#habd-reset) .chosen-container-single .chosen-single div {
  top: 0;
  right: 14px;
  width: 16px;
  height: 100%;
}
.habd-form.habd:not(#habd-reset) .chosen-container-single .chosen-single div b {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237A611E' stroke-width='1.5'/%3E%3C/svg%3E") center / 12px 8px no-repeat;
}
.habd-form.habd:not(#habd-reset) .chosen-container-multi .chosen-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  height: auto;
  min-height: 50px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background: var(--hf-field);
  box-shadow: none;
}
.habd-form.habd:not(#habd-reset) .chosen-container-multi .chosen-choices li.search-choice {
  position: relative;
  margin: 0;
  padding: 7px 28px 7px 12px;
  border: 1px solid rgba(201, 162, 74, 0.5);
  border-radius: 999px;
  background: rgba(229, 200, 140, 0.18);
  box-shadow: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: #3F3A31;
}
.habd-form.habd:not(#habd-reset) .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
}
.habd-form.habd:not(#habd-reset) .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--habd-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .chosen-container-active :is(.chosen-single, .chosen-choices) {
  border-color: var(--habd-gold-display);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.22);
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-drop {
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--hf-line);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 18px 36px rgba(90, 74, 32, 0.14);
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-search input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--hf-line);
  border-radius: 8px;
  background-image: none;
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-results {
  margin: 6px 0;
  padding: 0 6px;
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-results li {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.35;
  color: #3F3A31;
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-results li.highlighted {
  background: #F3EAD5;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .chosen-container .chosen-results li.result-selected {
  color: #9C978A;
}

/* ==========================================================================
   CKEditor 5 (colours from the --ck variables on the form)
   ========================================================================== */
.habd-form.habd:not(#habd-reset) .ck.ck-editor__main > .ck-editor__editable {
  min-height: 200px;
  max-height: 70vh;
  padding: 6px 18px;
  background: #FFFFFF;
  font-family: var(--habd-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--habd-ink);
}
.habd-form.habd:not(#habd-reset) .ck-content :is(h1, h2) {
  margin: 1em 0 0.4em;
  font-family: var(--habd-serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}
.habd-form.habd:not(#habd-reset) .ck-content :is(h3, h4, h5, h6) {
  margin: 1em 0 0.4em;
  font-family: var(--habd-sans);
  font-size: 18px;
  font-weight: 500;
}
.habd-form.habd:not(#habd-reset) .ck-content a {
  color: var(--habd-gold-ink);
}
/* The text format chooser: one quiet line under the editor. */
.habd-form.habd:not(#habd-reset) .filter-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}
.habd-form.habd:not(#habd-reset) .filter-wrapper .form-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.habd-form.habd:not(#habd-reset) .filter-wrapper label {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #6C6858;
}
.habd-form.habd:not(#habd-reset) .filter-wrapper select {
  width: auto;
  min-height: 34px;
  padding: 5px 36px 5px 12px;
  font-size: 13px;
  background-position: right 12px center;
}
.habd-form.habd:not(#habd-reset) .filter-help a {
  font-size: 13px;
  color: var(--habd-gold-ink);
}

/* ==========================================================================
   The actions: Save in a bar that stays in view
   ========================================================================== */
.habd-form.habd:not(#habd-reset) .form-actions {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 32px -44px 0;
  padding: 18px 44px;
  border-top: 1px solid var(--hf-hair);
  border-radius: 0 0 22px 22px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.habd-form.habd:not(#habd-reset):has(.field-group-tabs-wrapper) > .form-actions {
  bottom: 12px;
  margin: 28px 0 0 278px;
  padding: 16px 24px;
  border: 1px solid var(--habd-cream-line);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(90, 74, 32, 0.12);
}
/* custom.css styles every div#edit-actions button full width and gold, and
   style.css lifts button#edit-actions-submit 63px (it once sat the footer
   Subscribe button inside its field); these restate the habd buttons at a
   weight that beats both. */
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn {
  position: static;
  top: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.1;
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary {
  border-color: var(--habd-gold);
  background: var(--habd-gold);
  color: var(--habd-forest);
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary:hover,
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary:focus-visible {
  border-color: var(--habd-gold-light);
  background: var(--habd-gold-light);
  color: var(--habd-forest);
}
/* style.css also gives button#edit-actions-submit a green, !important skin;
   a webform's submit (Add team member) carries that id. */
.habd-form.habd:not(#habd-reset) .form-actions button#edit-actions-submit.habd-btn--primary {
  left: auto;
  border: 1px solid var(--habd-gold) !important;
  border-radius: 999px !important;
  background: var(--habd-gold) !important;
  color: var(--habd-forest) !important;
  font-family: var(--habd-sans);
  font-weight: 500 !important;
  line-height: 1.1 !important;
}
.habd-form.habd:not(#habd-reset) .form-actions button#edit-actions-submit.habd-btn--primary:is(:hover, :focus-visible) {
  border-color: var(--habd-gold-light) !important;
  background: var(--habd-gold-light) !important;
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--outline {
  border-color: var(--habd-outline-border);
  background: transparent;
  color: var(--habd-outline-text);
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--outline:hover,
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--outline:focus-visible {
  background: var(--habd-outline-hover);
  color: var(--habd-outline-text);
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--danger {
  border-color: var(--hf-danger, #8F3423);
  background: var(--hf-danger, #8F3423);
  color: #FFFFFF;
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-btn--primary {
  min-width: 160px;
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-form__delete {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font-family: var(--habd-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--hf-danger);
}
.habd-form.habd:not(#habd-reset) .form-actions .habd-form__delete .glyphicon {
  display: none;
}
.habd.habd .habd-btn--danger {
  background: var(--hf-danger, #8F3423);
  border-color: var(--hf-danger, #8F3423);
  color: #FFFFFF;
}
.habd.habd .habd-btn--danger:hover,
.habd.habd .habd-btn--danger:focus-visible {
  background: #74291B;
  border-color: #74291B;
  color: #FFFFFF;
}

/* The delete confirmation: its question as the lead. */
.habd-form-page__body--delete .habd-form.habd:not(#habd-reset) > :not(.form-actions):not(input) {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: #3A3730;
}

/* ==========================================================================
   The restricted page: the upgrade, in a card
   ========================================================================== */
.habd-form-page .hab-core-restricted-node-add {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
  max-width: 880px;
  margin: 0 auto;
  padding: 34px 38px;
  border: 1px solid var(--habd-cream-line);
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 16px 36px rgba(90, 74, 32, 0.08);
}
.habd-form-page .hab-core-restricted-node-add p {
  margin: 0;
  font-family: var(--habd-sans);
  font-size: 19px;
  font-weight: 300;
  line-height: 1.6;
  color: #3A3730;
}
.habd-form-page .hab-core-restricted-node-add :is(a.button, a.btn) {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 16px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--habd-gold);
  box-shadow: var(--habd-shadow-2);
  font-family: var(--habd-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--habd-forest);
}
.habd-form-page .hab-core-restricted-node-add :is(a.button, a.btn):hover {
  background: var(--habd-gold-light);
  color: var(--habd-forest);
}

/* ==========================================================================
   Narrower screens
   ========================================================================== */
@media (max-width: 960px) {
  .habd-form.habd:not(#habd-reset) .tabbable.tabs-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  /* The contents become one row of pills, scrolled sideways. */
  .habd-form.habd:not(#habd-reset) .tabbable.tabs-left > .vertical-tabs-list {
    position: static;
    flex-direction: row;
    gap: 6px;
    max-height: none;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .habd-form.habd:not(#habd-reset) .tabbable.tabs-left > .vertical-tabs-list::-webkit-scrollbar {
    display: none;
  }
  .habd-form.habd:not(#habd-reset) .vertical-tabs-list > li > a {
    white-space: nowrap;
  }
  .habd-form.habd:not(#habd-reset) .vertical-tabs-list > li.active > a,
  .habd-form.habd:not(#habd-reset) .vertical-tabs-list > li.selected > a {
    box-shadow: inset 0 -2px 0 var(--habd-gold-deep);
  }
  .habd-form.habd:not(#habd-reset):has(.field-group-tabs-wrapper) > :is(.form-actions, .form-group) {
    margin-left: 0;
  }
}
@media (max-width: 640px) {
  .habd-form.habd:not(#habd-reset):not(:has(.field-group-tabs-wrapper)) {
    padding: 26px 20px 0;
    border-radius: 18px;
  }
  .habd-form.habd:not(#habd-reset) .form-actions {
    margin: 28px -20px 0;
    padding: 14px 20px;
    border-radius: 0 0 18px 18px;
  }
  .habd-form.habd:not(#habd-reset) .tabbable.tabs-left > .tab-content {
    padding: 24px 18px 6px;
    border-radius: 18px;
  }
  .habd-form.habd:not(#habd-reset) .panel > .panel-heading {
    padding: 16px 16px 0;
  }
  .habd-form.habd:not(#habd-reset) .panel > .panel-body,
  .habd-form.habd:not(#habd-reset) .panel > .panel-collapse > .panel-body {
    padding: 12px 16px 18px;
  }
  .habd-form.habd:not(#habd-reset) .form-actions .habd-btn {
    flex: 1 1 auto;
  }
  .habd-form.habd:not(#habd-reset) .form-actions .habd-form__delete {
    flex: 1 0 100%;
    margin: 0;
    text-align: center;
  }
  /* Wide tables (opening hours, inline forms) scroll sideways inside their
     own box rather than widening the page. */
  .habd-form.habd:not(#habd-reset) :has(> table) {
    max-width: 100%;
    overflow-x: auto;
  }
  .habd-form.habd:not(#habd-reset) table {
    min-width: 0;
  }
  /* Opening hours: each day as a small grid (day; from and to; comment;
     the add, clear and copy links) instead of a five-column row. */
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"],
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > tbody {
    display: block;
    width: 100%;
  }
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > thead {
    display: none;
  }
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > tbody > tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--hf-hair);
  }
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > tbody > tr > td {
    display: block;
    padding: 0;
    border: 0;
  }
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > tbody > tr > td:first-child,
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] > tbody > tr > td:nth-child(n+4) {
    grid-column: 1 / -1;
  }
  .habd-form.habd:not(#habd-reset) table[id*="office-hours"] input {
    max-width: none;
  }
}
