/* VF3 P112 – Public-facing form typography. Uses the font selected in Admin.
   Native OS/Firefox popups may ignore CSS fonts: contact form uses a custom menu
   with a real native select preserved as the submitted form field. */
body.auto-master select,
body.auto-master select option,
body.auto-master select optgroup {
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
  font-style: normal;
  font-variant: normal;
  letter-spacing: normal;
}
body.auto-master select option { font-weight: 400 !important; }
body.auto-master select optgroup { font-weight: 600 !important; }

/* Keep labels and required asterisk as one uninterrupted caption.
   The caption and input are the only vertical children of each field. */
body.vf3-hub-page .vf3-hub__field { position: relative; }
body.vf3-hub-page .vf3-hub__field-caption {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: #274860;
  margin: 0;
}
body.vf3-hub-page .vf3-hub__required {
  display: inline !important;
  flex: none;
  font: inherit;
  font-weight: 700;
  color: #dc3344;
  white-space: nowrap;
  line-height: inherit;
}
body.vf3-hub-page .vf3-hub__field input,
body.vf3-hub-page .vf3-hub__field textarea,
body.vf3-hub-page .vf3-hub__field select {
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
}
/* Progressive enhancement: CSS hides the native select only AFTER JS builds the
   fully working, keyboard-navigable dropdown. Without JS, native select remains. */
body.vf3-hub-page .vf3-hub__field select.vf3-hub__select-native--enhanced {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  pointer-events: none;
}
body.vf3-hub-page .vf3-hub__field--dropdown-open { z-index: 70; }
body.vf3-hub-page .vf3-hub__select-ui { width: 100%; min-width: 0; position: relative; }
body.vf3-hub-page .vf3-hub__select-trigger {
  width: 100%; min-height: 44px; padding: 10px 36px 10px 12px;
  border: 1px solid #c7dbe9; border-radius: 9px;
  background: #fff; color: #153854; text-align: left;
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
  font-size: 14px; font-weight: 400; line-height: 1.5;
  display: flex; align-items: center; position: relative;
  cursor: pointer;
}
body.vf3-hub-page .vf3-hub__select-trigger:after {
  content: ''; position: absolute; top: 50%; right: 16px;
  width: 8px; height: 8px; border: solid #386887;
  border-width: 0 1.8px 1.8px 0; transform: translateY(-68%) rotate(45deg);
  pointer-events: none;
}
body.vf3-hub-page .vf3-hub__select-ui.is-open .vf3-hub__select-trigger:after {
  transform: translateY(-25%) rotate(225deg);
}
body.vf3-hub-page .vf3-hub__select-trigger:focus-visible,
body.vf3-hub-page .vf3-hub__select-ui.is-open .vf3-hub__select-trigger {
  outline: 2px solid #85bcf0; outline-offset: 1px; border-color: #397bb3;
}
body.vf3-hub-page .vf3-hub__select-trigger.is-placeholder { color: #718397; }
body.vf3-hub-page .vf3-hub__select-options {
  position: absolute; left: 0; right: 0; top: calc(100% + 5px);
  margin: 0; padding: 5px 0; list-style: none;
  min-width: 100%; max-height: min(310px, 55vh); overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 10px; border: 1px solid #c7dbe9;
  background: #fff; box-shadow: 0 14px 32px rgba(15, 48, 77, .17);
  z-index: 90;
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
}
body.vf3-hub-page .vf3-hub__select-options[hidden] { display: none !important; }
body.vf3-hub-page .vf3-hub__select-ui--dropup .vf3-hub__select-options {
  top: auto; bottom: calc(100% + 5px);
}
body.vf3-hub-page .vf3-hub__select-option {
  display: block; padding: 9px 12px;
  font-family: var(--site-font-family, 'Bebeboo', Arial, sans-serif) !important;
  font-size: 14px; font-weight: 400; line-height: 1.55;
  color: #193e5a; cursor: pointer;
  white-space: normal; overflow-wrap: anywhere;
}
body.vf3-hub-page .vf3-hub__select-option.is-active,
body.vf3-hub-page .vf3-hub__select-option:hover { background: #e8f3ff; color: #084f8f; }
body.vf3-hub-page .vf3-hub__select-option[aria-selected="true"] {
  background: #eff7ff; font-weight: 600;
}
body.vf3-hub-page .vf3-hub__select-option[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed;
}
@media(max-width:530px){
  body.vf3-hub-page .vf3-hub__field-caption { font-size: 12.5px; }
  body.vf3-hub-page .vf3-hub__select-options { max-height: min(270px, 50vh); }
}

/* Master UX safety: contact inputs on iOS stay at 16px; tiny screen labels
   may wrap instead of being clipped by their card/container. */
@media (max-width:767.98px){
  body.vf3-hub-page .vf3-hub__field input:not([type="checkbox"]):not([type="radio"]),
  body.vf3-hub-page .vf3-hub__field textarea,
  body.vf3-hub-page .vf3-hub__field select:not(.vf3-hub__select-native--enhanced),
  body.vf3-hub-page .vf3-hub__select-trigger{
    font-size:16px!important;
  }
}
@media (max-width:420px){
  body.vf3-hub-page .vf3-hub__field-caption{
    white-space:normal;
    flex-wrap:wrap;
    overflow-wrap:anywhere;
  }
}
