/* Parent help — floating "?" + bottom sheet (issue #53).
   Phone-first, thumb-reachable; shared by every parent page via _help_sheet.html.
   Palette and type come from registration/crayon.css (gh #78) — every colour here
   is a var() from that one token set. Never hard-code a hex in this file. */

.wwj-help-fab, .wwj-help-sheet { font-family: var(--sans); }

.wwj-help-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--green-dark);
  color: var(--card);
  font-size: 22px;
  font-weight: 700;
  font-family: var(--sans);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wwj-help-fab:active { transform: scale(0.94); }
/* Lift above the parent tab bar when it's present (logged-in portal pages). */
body.has-tabbar .wwj-help-fab { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.wwj-help-overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.wwj-help-overlay.open { opacity: 1; pointer-events: auto; }
.wwj-help-overlay[hidden] { display: block; }

.wwj-help-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.34, 1);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wwj-help-sheet.open { transform: translateY(0); }
/* Rendered [hidden] until JS wires it up; JS drops the attribute and toggles .open. */
.wwj-help-sheet[hidden] { display: flex; }

.wwj-help-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--track-off); margin: 8px auto 0; flex: none; }
.wwj-help-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 10px; border-bottom: 1px solid var(--line); flex: none; }
.wwj-help-head h2 { font-size: 16px; margin: 0; color: var(--ink); }
.wwj-help-close { background: var(--chip-bg); border: none; border-radius: 50%; width: 44px; height: 44px; font-size: 17px; color: var(--muted); cursor: pointer; font-family: var(--sans); margin: -6px -6px -6px 0; }
.wwj-help-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 16px; }
.wwj-help-foot { flex: none; border-top: 1px solid var(--line); padding: 12px 16px; font-size: 13px; color: var(--muted); }
.wwj-help-foot a { color: var(--green-dark); font-weight: 600; }
.wwj-help-all { display: block; margin-top: 6px; min-height: 24px; }

/* Accordions — shared visual with the /help/ page (help.html reuses these). */
.wwj-acc { border-bottom: 1px solid var(--line); }
.wwj-acc:last-child { border-bottom: none; }
.wwj-acc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 12px 2px; background: none; border: none; font: inherit; font-family: var(--sans); font-size: 15px; font-weight: 650; color: var(--ink); text-align: left; cursor: pointer; }
.wwj-acc-h .chev { color: var(--muted); font-size: 13px; transition: transform 0.18s; flex: none; }
.wwj-acc[data-open="1"] .wwj-acc-h .chev { transform: rotate(90deg); }
.wwj-acc-b { display: none; padding: 0 2px 14px; font-size: 14px; line-height: 1.5; color: var(--text); }
.wwj-acc[data-open="1"] .wwj-acc-b { display: block; }
.wwj-acc-b p { margin: 0 0 10px; }
.wwj-acc-b p:last-child { margin-bottom: 0; }
.wwj-sub-hl { background: var(--highlight); border-radius: 3px; box-shadow: 0 0 0 3px var(--highlight); transition: background 1.2s ease, box-shadow 1.2s ease; }

/* Inline "What's this?" contextual entry point, dropped beside confusing UI. */
.wwj-whats-this { display: inline-flex; align-items: center; min-height: 24px; font-size: 12px; font-weight: 600; color: var(--green-dark); text-decoration: none; border-bottom: 1px dashed var(--peach); cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; padding: 2px 0; font-family: var(--sans); }
