/* ============================================================
   FOAM Portal : in-page help ("?")
   Same look and layout as the All is Well help (Classes, 29 Sep 2026),
   in FOAM navy. Flat colour, no gradients. Replaces /help/explainer.css.
   ============================================================ */
:root{
  --help-brand:#0F2C5C;--help-brand-deep:#091C3D;--help-accent:#5B7DB1;
  --help-tint:#EEF3F9;--help-tint-2:#E1E9F3;--help-line:#D5DFEB;--help-bg-off:#F4F7FB;
  --help-ink:#1E293B;--help-ink-soft:#475569;
  --warn:#9A6206;--bad:#B3261E;--ok:#1E7A48;
  --help-font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* ---- the "?" button ---- */
.help-trigger{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;margin-left:8px;border-radius:50%;
  background:var(--help-tint,#EEF3F9);color:var(--help-brand,#0F2C5C);
  border:1.5px solid var(--help-accent,#5B7DB1);
  font-family:var(--help-font);font-size:13px;font-weight:700;line-height:1;
  cursor:pointer;vertical-align:middle;user-select:none;
  transition:background .15s,transform .15s,border-color .15s;
}
h1 .help-trigger{width:26px;height:26px;font-size:15px;margin-left:10px;position:relative;top:-2px}
.help-trigger:hover{background:var(--help-brand,#0F2C5C);color:#fff;border-color:var(--help-brand,#0F2C5C);transform:scale(1.08)}
.help-trigger:focus-visible{outline:2px solid var(--help-brand,#0F2C5C);outline-offset:2px}

/* ---- the popup ---- */
.help-backdrop{
  position:fixed;inset:0;z-index:9500;
  background:rgba(15,44,92,.35);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  display:flex;align-items:center;justify-content:center;padding:20px;
  animation:help-fade .18s ease-out;
}
@keyframes help-fade{from{opacity:0}to{opacity:1}}
.help-modal{
  background:#fff;border-radius:16px;border-top:4px solid var(--help-brand,#0F2C5C);
  width:100%;max-width:680px;max-height:86vh;overflow-y:auto;position:relative;
  box-shadow:0 18px 50px rgba(9,28,61,.28);
  animation:help-rise .22s ease-out;
}
@keyframes help-rise{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.help-head{
  position:sticky;top:0;z-index:1;background:#fff;
  display:flex;align-items:center;gap:12px;padding:18px 26px 14px;
  border-bottom:1px solid var(--help-line,#D5DFEB);
}
.help-head .help-icon{
  width:36px;height:36px;flex-shrink:0;border-radius:10px;
  background:var(--help-brand,#0F2C5C);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:700;
}
.help-head h3{flex:1;margin:0;font-size:18px;font-weight:600;letter-spacing:-.01em;color:var(--help-ink,#1E293B);line-height:1.3}
.help-head .help-kicker{display:block;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--help-ink-soft,#475569);margin-bottom:2px}
.help-close{
  width:32px;height:32px;border-radius:8px;flex-shrink:0;
  background:var(--help-tint,#EEF3F9);border:1px solid var(--help-line,#D5DFEB);
  color:var(--help-ink-soft,#475569);font-size:18px;font-weight:600;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.help-close:hover{background:var(--help-tint-2,#E1E9F3);color:var(--help-brand,#0F2C5C)}
.help-body{padding:18px 26px 24px;font-size:14.5px;line-height:1.65;color:var(--help-ink,#1E293B)}
.help-body h4{
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  color:var(--help-brand,#0F2C5C);margin:18px 0 6px;
}
.help-body h4:first-child{margin-top:0}
.help-body p{margin:0 0 10px}
.help-body ul,.help-body ol{margin:6px 0 12px 22px}
.help-body li{margin-bottom:5px}
.help-body strong,.help-body b{color:var(--help-ink,#1E293B);font-weight:600}
.help-body code{
  background:var(--help-tint,#EEF3F9);border:1px solid var(--help-line,#D5DFEB);
  padding:1px 6px;border-radius:4px;font-size:12.5px;color:var(--help-brand,#0F2C5C);
}
.help-body .help-callout{
  background:var(--help-tint,#EEF3F9);border-left:3px solid var(--help-brand,#0F2C5C);
  padding:10px 14px;border-radius:0 8px 8px 0;margin:12px 0;font-size:13.5px;
}
.help-body .help-callout.warn{background:#FBF4E6;border-left-color:var(--warn,#9A6206)}
.help-body .help-callout.danger{background:#FCEDEC;border-left-color:var(--bad,#B3261E)}
.help-body .help-callout.ok{background:#EAF6EE;border-left-color:var(--ok,#1E7A48)}
.help-body table{width:100%;border-collapse:collapse;font-size:13.5px;margin:8px 0 14px}
.help-body th{background:var(--help-brand,#0F2C5C);color:#fff;text-align:left;padding:7px 10px;font-weight:600;font-size:12px;letter-spacing:.04em;text-transform:uppercase}
.help-body td{padding:7px 10px;border-bottom:1px solid var(--help-line,#D5DFEB);vertical-align:top}
.help-body .help-kbd{display:inline-block;border:1px solid var(--help-line);border-bottom-width:2px;border-radius:4px;padding:0 6px;font-size:12px;background:#fff}
.help-foot{
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  padding:14px 26px 18px;border-top:1px solid var(--help-line,#D5DFEB);background:var(--help-bg-off,#F4F7FB);
  font-size:13px;color:var(--help-ink-soft,#475569);
}
.help-foot a{color:var(--help-brand,#0F2C5C);font-weight:600;text-decoration:none}
.help-foot a:hover{text-decoration:underline}
.help-foot .help-manual-btn{
  display:inline-block;padding:8px 14px;border-radius:8px;background:var(--help-brand,#0F2C5C);color:#fff;font-weight:600;
}
.help-foot .help-manual-btn:hover{background:var(--help-brand-deep,#091C3D);text-decoration:none}

/* ---- floating "Help" button (bottom-right, every tab) ---- */
.help-fab{
  position:fixed;right:18px;bottom:18px;z-index:9000;
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 16px;border-radius:8px;border:none;cursor:pointer;
  background:var(--help-brand,#0F2C5C);color:#fff;font-family:var(--help-font);font-size:14px;font-weight:600;
  box-shadow:0 8px 24px rgba(9,28,61,.30);
}
.help-fab:hover{background:var(--help-brand-deep,#091C3D)}
.help-fab .q{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--help-brand,#0F2C5C);font-weight:700;font-size:14px}
@media print{.help-trigger,.help-fab,.help-backdrop{display:none!important}}
@media (max-width:600px){
  .help-modal{border-radius:14px;max-height:92vh}
  .help-head{padding:14px 18px 12px}
  .help-body{padding:16px 18px 20px;font-size:14px}
  .help-fab{right:12px;bottom:12px;padding:9px 13px;font-size:13px}
}

/* ---- how-to videos inside the popup (help/videos.js, 28 Sep 2026) ---- */
.help-trigger{position:relative}
.help-trigger.has-video::after{
  content:"";position:absolute;right:-5px;bottom:-4px;width:12px;height:12px;border-radius:50%;
  background:var(--help-brand,#0F2C5C) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3.2v5.6L9 6z' fill='%23fff'/%3E%3C/svg%3E") center/100% no-repeat;
  border:1.5px solid #fff;box-sizing:content-box;
}
.help-video{margin:0 0 18px;border:1px solid var(--help-line,#D5DFEB);border-radius:10px;overflow:hidden;background:var(--help-bg-off,#F4F7FB)}
.help-vhead{display:flex;align-items:center;gap:9px;padding:9px 12px;font-size:13.5px}
.help-vhead b{flex:1;font-weight:600;color:var(--help-ink,#1E293B);line-height:1.3}
.help-vnote{font-size:11.5px;color:var(--help-ink-soft,#475569);white-space:nowrap}
.help-vplay{
  flex:none;display:inline-block;width:18px;height:18px;border-radius:50%;
  background:var(--help-brand,#0F2C5C) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4.5 3.2v5.6L9 6z' fill='%23fff'/%3E%3C/svg%3E") center/100% no-repeat;
}
.help-vframe{background:#0B1A33;aspect-ratio:16/9;line-height:0}
.help-vframe video{display:block;width:100%;height:100%;background:#0B1A33}
.help-vmore{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:10px 12px}
.help-vmore > span{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--help-ink-soft,#475569);margin-right:4px}
.help-vchip{
  display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 6px;border-radius:6px;cursor:pointer;
  border:1px solid var(--help-line,#D5DFEB);background:#fff;color:var(--help-brand,#0F2C5C);
  font-family:var(--help-font);font-size:12.5px;font-weight:600;line-height:1.2;text-align:left;
}
.help-vchip .help-vplay{width:15px;height:15px;background-color:var(--help-accent,#5B7DB1)}
.help-vchip:hover{background:var(--help-tint,#EEF3F9)}
.help-vchip.on{border-color:var(--help-brand,#0F2C5C);background:var(--help-tint,#EEF3F9)}
.help-vchip.on .help-vplay{background-color:var(--help-brand,#0F2C5C)}


/* ---- additions for the FOAM Portal (React app) ---- */
/* an empty marker where there is no heading; help.js puts the "?" inside it */
.help-slot{display:inline-flex;align-items:center;vertical-align:middle}
.help-slot:empty{display:none}
/* corner placement inside a card that is itself a button (Command Center cards) */
.help-slot.corner{position:absolute;top:18px;right:18px;z-index:20}
.help-slot.corner .help-trigger{margin-left:0}
/* on dark headers and menus */
.help-slot.on-dark .help-trigger{background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.55)}
.help-slot.on-dark .help-trigger:hover{background:#fff;color:var(--help-brand);border-color:#fff}
/* a number in a table cell that opens its explanation (Monthly Reports "Auto" lines) */
.help-cell{display:block;width:100%;background:transparent;border:0;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;cursor:help}
.help-cell:focus-visible{outline:2px solid var(--help-brand);outline-offset:2px}
/* the FOAM Portal Assistant bubble sits bottom-right: the Help button sits just above it */
.help-fab{bottom:92px;right:24px}
.help-body .help-callout.tip{background:var(--help-tint)}
@media (max-width:600px){.help-fab{bottom:84px;right:16px}}
/* the portal loads Tailwind, which removes list bullets and numbers: put them back inside the pop-up */
.help-body ul{list-style:disc}
.help-body ol{list-style:decimal}
.help-body li::marker{color:var(--help-brand)}
/* keep the Help button out of the way: hidden while the Assistant chat is open, and on the
   father-facing pages (check-in, assessment, progress), which are not staff screens */
body:has([role="dialog"][aria-label="FOAM Portal Assistant"]) .help-fab{display:none}
#root[data-help-view="father"] ~ .help-fab{display:none}
