/* ph-notify.css (2026-11-12) - the notification toast at the bottom right of every PH page.
   2026-11-13 | Monique: "Update Notification styling" - redrawn from her "Portal toasts" mockup. One weight of text, a small badge on the face that
   says what kind of news it is, names and records in teal, one teal button plus a quiet second one, and a countdown line in the kind's colour that
   pauses while the pointer is on the card. No coloured edge: the kind shows in the badge and in the line.

   This is NOT the small confirmation toast (ph-toast-dialog.css, "Profile saved"): that one stays as it is, bottom centre, for things the person just did.

   <div class="phn-wrap">                                              one container per page, made by js/ph-notify.js
     <div class="phn phn--mention">                                    the kind: phn--mention / --assign / --overdue / --ok / --warn (none = plain teal)
       <span class="phn-av" style="background:#C2410C">LC<i class="phn-k">@</i></span>      a face with the kind's badge, OR
       <span class="phn-avs" data-n="3"><span>AN</span><span>LC</span><span>JM</span><i class="phn-k">@</i></span>   up to three faces, OR
       <span class="phn-tile">(icon)</span>                            a tinted tile when no person is behind it (saved, overdue, went wrong, the ask card)
       <span class="phn-t"><b>Lize</b> mentioned you on <b>FICA Onboarding</b></span>
       <span class="phn-m">1965 Trust</span>                           the quiet second line
       <span class="phn-q">"Can you check the ID copy before I send it?"</span>             the comment, quoted
       <span class="phn-acts"><button class="phn-act pri">Open task</button><button class="phn-act q">Reply</button></span>
       <button class="phn-x" aria-label="Dismiss">x</button><span class="phn-time">now</span>
       <span class="phn-life"><i></i></span>                           the countdown; its length is --phn-life, set by the script
     </div>
   </div>

   Colours come from ph-tokens.css, so dark mode follows by itself: the tint behind a tile is the kind's colour mixed into the card, and the badge's
   sign and ring are the card's own colour (white on the colour in light, dark on the lighter colour in dark). The z-index matches ph-toast-dialog.css
   on purpose: a notification shows OVER the full-screen popups, never behind them (Monique, 2026-11-12), and the container sits on <body> so
   closing a popup never takes it with it. */

.phn-wrap {
  position: fixed; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: calc(var(--ph-z-toast, 1100) + 400);
  display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 32px); pointer-events: none;
}
.phn {
  --phn-c: var(--acc, #0E7C86);
  --phn-tint: color-mix(in srgb, var(--phn-c) 13%, var(--card, #fff));
  pointer-events: auto; position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 14px 12px 14px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 22px rgba(18, 52, 59, .12); font: 400 14px/1.4 var(--font); color: var(--ink); text-align: left;
  animation: phnIn .35s cubic-bezier(.2, .8, .2, 1);
}
.phn b, .phn strong { font-weight: 400; }
/* 2026-12-02 | Monique (the timer pop-up sat half behind the help button): with the Help Centre's round button on the page, the cards sit above it */
body:has(#phHelpFab) .phn-wrap { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }                    /* one weight of text: a name is picked out by colour, not by bold */

/* the kinds */
.phn--mention { --phn-c: #6C4FD6; }
.phn--assign  { --phn-c: var(--acc, #0E7C86); }
.phn--overdue { --phn-c: var(--red, #A63D3D); }
.phn--ok      { --phn-c: var(--green, #2F7A4D); }
.phn--warn    { --phn-c: var(--amber, #B07A00); }
.phn--update  { --phn-c: var(--acc, #0E7C86); }   /* 2026-11-13 "A new version is ready" (ph-update.js): teal tile with the reload sign, stays until closed */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phn--mention { --phn-c: #A592F0; } }
:root[data-theme="dark"] .phn--mention { --phn-c: #A592F0; }

/* the face, and its badge */
.phn-av {
  position: relative; grid-column: 1; grid-row: 1 / span 3; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; background: var(--rail); background-size: cover; background-position: center;
}
.phn-k {
  position: absolute; right: -4px; bottom: -4px; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--card, #fff); background: var(--phn-c); color: var(--card, #fff);
  display: flex; align-items: center; justify-content: center; font-style: normal;
}
.phn-k svg { display: block; width: 10px; height: 10px; }
/* several people at once: up to three, overlapping */
.phn-avs { position: relative; grid-column: 1; grid-row: 1 / span 3; width: 66px; height: 40px; }
.phn-avs > span {
  position: absolute; top: 4px; box-sizing: border-box; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card, #fff);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; background: var(--rail); background-size: cover; background-position: center;
}
.phn-avs > span:nth-child(1) { left: 0; z-index: 1; }
.phn-avs > span:nth-child(2) { left: 18px; z-index: 2; }
.phn-avs > span:nth-child(3) { left: 36px; z-index: 3; }
.phn-avs .phn-k { left: 50px; right: auto; top: 24px; bottom: auto; z-index: 4; }
.phn-avs[data-n="2"] { width: 48px; }
.phn-avs[data-n="2"] .phn-k { left: 32px; }
/* no person behind it: a tinted tile with the kind's sign */
.phn-tile {
  grid-column: 1; grid-row: 1 / span 3; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; background: var(--phn-tint); color: var(--phn-c);
}
.phn-tile svg { display: block; width: 20px; height: 20px; }
/* 2026-11-30: a caller's own picture (ev.art, the badge medal) - no tint, the picture fills the 40px */
.phn-tile.phn-art { background: none; border-radius: 0; }
.phn-tile.phn-art svg { width: 40px; height: 40px; }

/* the words */
.phn-t { grid-column: 2; font-size: 14.5px; line-height: 1.4; padding-top: 1px; overflow-wrap: anywhere; }
.phn-t b, .phn-m b { color: var(--acc-ink, #0B5C64); }
.phn-cnt {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 4px; border-radius: 999px; vertical-align: 1px;
  background: var(--phn-tint); color: var(--phn-c); font-size: 12px; white-space: nowrap;
}
.phn-m { grid-column: 2; font-size: 13px; line-height: 1.4; color: var(--ink-muted); overflow-wrap: anywhere; }
.phn-q {
  grid-column: 2; margin-top: 4px; padding: 6px 10px; border-left: 2px solid var(--border); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--paper-alt, #EAEFEE) 45%, var(--card, #fff)); color: var(--ink);
  font-size: 13px; line-height: 1.45; overflow-wrap: anywhere;
}

/* the buttons: the first is teal, the second is quiet text. Never more than two. */
.phn-acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.phn-act {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--card); color: var(--ink);
  font: 400 13px/1 var(--font); cursor: pointer;
}
.phn-act:hover { border-color: var(--acc, #0E7C86); background: var(--acc-lite, var(--paper-alt)); }
.phn-act.pri { background: #0E7C86; border-color: #0E7C86; color: #fff; }      /* fixed, not the token: white words need the deep teal in dark mode too */
.phn-act.pri:hover { background: #0B5C64; border-color: #0B5C64; }
.phn-act.q { border-color: transparent; background: none; color: var(--ink-muted); padding: 0 8px; }
/* 2026-12-02 | Monique (the timer pop-up: "use our site's colors"): Stop in the site's red; the running clock in the warn colour's tint */
.phn-act.stop { background: var(--red, #A63D3D); border-color: var(--red, #A63D3D); color: #fff; }
.phn-act.stop:hover { background: color-mix(in srgb, var(--red, #A63D3D) 85%, #000); border-color: color-mix(in srgb, var(--red, #A63D3D) 85%, #000); }
.phn-tclk { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: var(--phn-tint); color: var(--phn-c); font-size: 12px; line-height: 18px; white-space: nowrap; }
.phn-tclk i { width: 6px; height: 6px; border-radius: 50%; background: var(--phn-c); animation: phnBlink 1.4s ease-in-out infinite; }
@keyframes phnBlink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .phn-tclk i { animation: none; } }
.phn:has(.phn-tclk) .phn-acts { grid-column: 2 / 4; }   /* the timer card has four buttons: they use the room under the time too */
.phn-act.q:hover { border-color: transparent; background: var(--paper-alt); color: var(--ink); }
.phn-act:focus-visible, .phn-x:focus-visible { outline: 2px solid var(--acc, #0E7C86); outline-offset: 1px; }

/* close, and how long ago */
.phn-x {
  grid-column: 3; grid-row: 1; width: 28px; height: 28px; margin: -4px -2px 0 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: none; color: var(--ink-faint); cursor: pointer;
}
.phn-x:hover { background: var(--paper-alt); color: var(--ink); }
.phn-x svg { display: block; width: 14px; height: 14px; }
.phn-time { grid-column: 3; grid-row: 2; font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; text-align: right; }

/* the countdown: a pale track, and a line in the kind's colour that runs out. A card that stays until it is closed has none. */
.phn-life { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--border); }
.phn-life i { display: block; width: 100%; height: 100%; background: var(--phn-c); transform-origin: left; animation: phnLife var(--phn-life, 6s) linear forwards; }
.phn.is-hold .phn-life i { animation-play-state: paused; }
.phn.is-out { opacity: 0; transform: translateX(24px); transition: opacity .25s ease, transform .25s ease; }

@keyframes phnIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes phnLife { to { transform: scaleX(0); } }

@media (max-width: 480px) {
  .phn-wrap { left: calc(16px + env(safe-area-inset-left, 0px)); width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .phn { animation: none; }
  .phn.is-out { transition: none; }
  .phn-life { display: none; }
}

/* 2026-11-19 | Monique ("people forgets to turn it on" - "Yes, header too"): a Turn on notifications nudge in the header bar (js/ph-notify.js hdrBuild,
   drawn first by PhHeaderItems.ascx). Shown until this browser may show notifications, then gone. Not on a phone (the phone header is laid out by
   hand) and not in the installed app with the title bar on, which has its own up there (js/ph-titlebar.js).
   2026-11-26 | Monique ("the turn on notifications should be somewhere else maybe as a icon not the text"): no amber text pill any more - a bell-off
   icon in the same square as the bell, right before it. Its own look (size, corners, background) comes from .ph-hdr .ph-right .ph-hbtn; only the
   sun-coloured icon and a small sun dot are its own. Blocked = a paler icon, no dot. The words stay in its tooltip and aria-label. */
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt { position: relative; padding: 0; gap: 0; justify-content: center; color: var(--spot, #F2B705); }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt > span { display: none; }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt > svg { width: 18px; height: 18px; flex: none; }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--spot, #F2B705); }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt.is-blocked { color: #FFE08A; opacity: .8; }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt.is-blocked:hover { opacity: 1; }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt.is-blocked::after { display: none; }
.ph-hdr .ph-right .ph-hbtn.ph-hdr-nt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ph-hdr .ph-hdr-nt[hidden], html.ph-m .ph-hdr-nt { display: none !important; }
@media (max-width: 760px) { .ph-hdr-nt { display: none !important; } }
@media (display-mode: window-controls-overlay) { html:not(.in-popup) .ph-hdr .ph-hdr-nt { display: none !important; } }

/* 2026-11-19 | Monique's Settings > Notifications mockup: the "Know the moment work lands" pop-up (ph-notify.js askPop). Shown once to the people an
   administrator asks (Settings > Notifications > Browser pop-ups), and from Settings' "Preview pop-up". Colours from ph-tokens.css, so dark mode follows. */
.phn-ap-ovl { position: fixed; inset: 0; z-index: calc(var(--ph-z-toast, 1100) + 300); display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; overflow: auto; background: rgba(18, 52, 59, .5); animation: phnApIn .16s ease-out; }
.phn-ap-ovl.is-out { opacity: 0; transition: opacity .16s; }
@keyframes phnApIn { from { opacity: 0; } to { opacity: 1; } }
.phn-ap { width: 100%; max-width: 460px; background: var(--card, #fff); border-radius: 20px; box-shadow: 0 24px 60px rgba(18, 52, 59, .3); overflow: hidden;
  font: 400 14px/1.45 var(--font, 'IBM Plex Sans', system-ui, sans-serif); color: var(--ink, #12343B); text-align: left; }
.phn-ap * { font-weight: 400; box-sizing: border-box; }
.phn-ap-h { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px 20px 20px; color: #fff;
  background: linear-gradient(135deg, #0E7C86, #0B5C64); }
.phn-ap-x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .2); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.phn-ap-x:hover { background: rgba(255, 255, 255, .3); }
.phn-ap-bell { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; }
.phn-ap-ht h2 { margin: 0; font: 400 22px/1.2 var(--font-display, 'Bricolage Grotesque', system-ui, sans-serif); color: #fff; }
.phn-ap-ht p { margin: 2px 0 0; font-size: 13px; opacity: .92; }
.phn-ap-b { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.phn-ap-b[hidden] { display: none; }
.phn-ap-gets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.phn-ap-gets li { display: flex; gap: 12px; align-items: flex-start; }
.phn-ap-gets li > div { display: flex; flex-direction: column; }
.phn-ap-gt { font-size: 14px; color: var(--ink, #12343B); }
.phn-ap-gets li > div > span:not(.phn-ap-gt) { font-size: 13px; color: var(--ink-muted, #4F6A70); }
.phn-ap-i { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--acc-lite, #E3F1F2); color: var(--acc, #0E7C86); }
.phn-ap-i.is-red { background: color-mix(in srgb, var(--red, #A63D3D) 14%, var(--card, #fff)); color: var(--red, #A63D3D); }
.phn-ap-i.is-sun { background: color-mix(in srgb, #F2B705 22%, var(--card, #fff)); color: #7A5B00; }
.phn-ap-i.is-green { background: color-mix(in srgb, var(--green, #2F7A4D) 16%, var(--card, #fff)); color: var(--green, #2F7A4D); }
.phn-ap-st .phn-ap-i { width: 34px; height: 34px; flex-basis: 34px; }
.phn-ap-fine { font-size: 12.5px; color: var(--ink-muted, #4F6A70); }
/* 2026-11-19: the same list in the shared centred popup (ph-notify.js askPop -> PHPop.live) */
.phn-ap-pb { display: flex; flex-direction: column; gap: 16px; }
/* 2026-11-19 | Monique ("Bottom sheet"): on a phone it slides up from the bottom instead of sitting in the middle - full width, rounded top corners,
   a handle on top, the two buttons big above the phone's home bar. .phn-ap-sheet (in its body) also keeps it out of the phone shell's
   "every popup is full screen" rules (ph-phone-shell.css, ph-form-phone.css: :not(:has(.tas, .phn-ap-sheet)), the same way as the timer's Stop sheet). */
@media (max-width: 760px) {
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) { align-items: flex-end !important; justify-content: stretch !important; padding: 0 !important; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box {
    width: 100% !important; max-width: none !important; height: auto !important; max-height: 88dvh !important; margin: 0 !important;
    border-radius: 22px 22px 0 0 !important; box-shadow: 0 -12px 40px rgba(18, 52, 59, .25) !important; animation: phnSheetUp .22s ease-out; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box::before { content: ""; display: block; flex: none; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2, var(--sd5dedd)); margin: 8px auto 0; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box > .ph-pp-head { padding-top: 12px; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box > .ph-pp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box > .ph-pp-foot { border-radius: 0 !important; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box > .ph-pp-foot .ph-btn { min-height: 48px; border-radius: 12px; font-size: 15px; }
  html body .ph-centerpop.ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box > .ph-pp-foot .ph-btn--primary { flex: 1 1 auto; justify-content: center; }
}
@keyframes phnSheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html body .ph-centerpop:has(.phn-ap-sheet) > .ph-centerpop-box { animation: none !important; } }
.phn-ap-st { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 0; }
.phn-ap-mt { font: 400 17px/1.3 var(--font-display, 'Bricolage Grotesque', system-ui, sans-serif); }
.phn-ap-mu { color: var(--ink-muted, #4F6A70); font-size: 13px; }
.phn-ap-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border, #E1E8E7);
  background: color-mix(in srgb, var(--card, #fff) 96%, var(--ink, #12343B)); }
.phn-ap-link { background: transparent; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--acc-ink, #0B5C64); text-decoration: underline; cursor: pointer; }
.phn-ap-link[hidden] { display: none; }
.phn-ap-btn { margin-left: auto; height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--acc, #0E7C86); color: var(--on-acc, #fff); font: inherit; font-size: 13px; cursor: pointer; }
.phn-ap-btn:hover { background: #0A6B74; }
.phn-ap-btn:disabled { opacity: .6; cursor: default; }
.phn-ap :focus-visible { outline: 2px solid var(--acc, #0E7C86); outline-offset: 2px; }
.phn-ap-h :focus-visible { outline-color: var(--sffffff); }
@media (max-width: 600px) { .phn-ap-ovl { align-items: flex-end; padding: 0; } .phn-ap { border-radius: 20px 20px 0 0; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .phn-ap-ovl { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phn-ap-i.is-sun { color: #F2C94C; } }
:root[data-theme="dark"] .phn-ap-i.is-sun { color: #F2C94C; }
