/* ════════════════════════════════════════════════════════════════
   Field help — the "(i)" trigger and its popover.
   Shared by the order form, the order summary, and the form-builder
   preview. Colours are explicit so it renders identically whether the
   host page defines design tokens or not.
   ════════════════════════════════════════════════════════════════ */

.field-help {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  margin-inline-start: 5px;
  background: transparent;
  color: #3b82f6;
  font-size: .9em;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  transition: color .15s;
}
.field-help:hover,
.field-help:focus-visible { color: #2563eb; }

/* ── Popover ───────────────────────────────────────────────────── */
.field-help-pop {
  position: fixed;
  z-index: 1080;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  overflow-y: auto;
  padding: 14px;
  background: #ffffff;
  color: #1f2430;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .14s, transform .14s, visibility .14s;
}
.field-help-pop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.field-help-close {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: #5a6072;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-help-close:hover { background: rgba(0, 0, 0, .12); }

.field-help-text {
  margin: 0;
  margin-inline-end: 26px;
  margin-bottom: 10px;
  font-size: .9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.field-help-text:last-child { margin-bottom: 0; }

.field-help-fig { margin: 0 0 10px; }
.field-help-fig:last-child { margin-bottom: 0; }
.field-help-fig img {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .1);
}
.field-help-fig figcaption {
  margin-top: 5px;
  font-size: .82rem;
  color: #5a6072;
  text-align: center;
  overflow-wrap: break-word;
}

/* ── Mobile backdrop + centered-modal variant ──────────────────── */
.field-help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1075;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s, visibility .15s;
}
.field-help-backdrop.show { opacity: 1; visibility: visible; }

/* On phones the popover is a centered modal card — never an edge-anchored
   sheet — so short content stays mid-screen and tall content scrolls. */
.field-help-pop--modal {
  top: 50% !important;
  left: 50% !important;
  width: calc(100vw - 32px);
  max-width: 440px;
  max-height: 85vh;
  border-radius: 16px;
  transform: translate(-50%, -50%) scale(.96);
}
.field-help-pop--modal.show { transform: translate(-50%, -50%) scale(1); }
