/* Personalisation and the Assistant on My Day. Tokens only (light and dark come from styles.css). */

/* ---------- Header: live the Assistant, her line, time and weather ---------- */
.pgh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.pgl2 { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 400px; }
.pgl { flex: none; width: 80px; height: 80px; cursor: pointer; display: grid; place-items: center; }
.pgslot, .pgmount.assist { display: block; width: 80px; height: 80px; margin: 0; font-size: 0; line-height: 0; }
.pgtxt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pgbub { position: relative; display: block; max-width: min(560px, 100%); margin: 0 0 0 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--sh-1);
  color: var(--grey-ink); font: inherit; font-size: 0.9375rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.pgbub::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--surface); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); transition: border-color 0.12s ease; }
.pgbub:hover { border-color: var(--input); box-shadow: var(--sh-2); }
.pgbub:hover::before { border-color: var(--input); }
.pgsay { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); margin-right: 4px; }
.pgsay:empty { display: none; }
.pgt { transition: opacity 0.24s ease; }
.pgt.out { opacity: 0; }
.pgside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.pgw { display: grid; grid-template-columns: auto auto auto; column-gap: 8px; row-gap: 3px; align-items: center; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pgwr { display: contents; }
.pgwc { color: var(--muted); }
.pgw b { color: var(--ink); font-weight: 650; text-align: right; }
.pgwx { display: inline-flex; align-items: center; gap: 5px; min-width: 120px; color: var(--grey-ink); white-space: nowrap; }
.pgwx:not(:empty)::before { content: "\00b7"; color: var(--muted); margin-right: 3px; }
.pgwi { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.pgwsrc { grid-column: 1 / -1; font-size: 0.6875rem; color: var(--muted); opacity: 0.85; text-align: right; }
.pgpl { font-size: 0.8125rem; }
.pgpl svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
@media (max-width: 760px) {
  .pgl, .pgslot, .pgmount.assist { width: 64px; height: 64px; }
  .pgl2 { gap: 10px; flex-basis: 100%; }
  .pgside { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
  .pgwsrc { text-align: left; }
  .pgwx { min-width: 0; }
  .pgbub { margin-left: 6px; font-size: 0.875rem; }
}
.day.solo { grid-template-columns: minmax(0, 1fr); max-width: 940px; }

/* ---------- Quick actions ---------- */
.pins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.pin { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--grey-ink); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: background 0.12s ease, border-color 0.12s ease; }
.pin svg { width: 15px; height: 15px; color: var(--muted); }
.pin:hover { background: var(--surface2); border-color: var(--input); color: var(--ink); }

/* ---------- Personalise panel ---------- */
#pgpanel { position: fixed; inset: 0; z-index: 95; }
.pgscrim { position: absolute; inset: 0; background: var(--scrim); animation: fadein 0.14s ease-out; }
.pgp { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-pop); animation: pgin 0.22s ease-out; }
@keyframes pgin { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.pgph { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px; border-bottom: 1px solid var(--divider); }
.pgph > div { flex: 1; min-width: 0; }
.pgph h2 { font-size: 1.125rem; font-weight: 750; color: var(--ink); margin: 0; }
.pgph p { margin: 2px 0 0; }
.pgprev.assist { display: block; flex: none; margin: 0; font-size: 0; line-height: 0; }
.pgpb { flex: 1; overflow-y: auto; padding: 4px 20px 28px; overscroll-behavior: contain; }
.pps { padding: 18px 0; border-top: 1px solid var(--divider); }
.pps:first-child { border-top: 0; }
.pps h3 { font-size: 0.9375rem; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.pps .hint { font-size: 0.8125rem; color: var(--muted); margin: 4px 0 8px; }
.ppseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 8px 0 0; padding: 3px; border: 1px solid var(--input); border-radius: 11px; background: var(--ground); min-width: 0; }
.ppseg label { position: relative; display: block; }
.ppseg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ppseg span { display: block; text-align: center; padding: 8px 4px; border-radius: 8px; font-size: 0.875rem; font-weight: 600; color: var(--grey-ink); }
.ppseg input:checked + span { background: var(--surface); box-shadow: var(--sh-1), 0 0 0 1px var(--line); color: var(--ink); font-weight: 700; }
.ppseg input:focus-visible + span { outline: 2px solid var(--blue-btn); outline-offset: 1px; }
.pplist { list-style: none; margin: 0; padding: 0; }
.pplist.cols { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.ppr { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.ppck { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: 40px; cursor: pointer; font-size: 0.875rem; color: var(--ink); }
.ppck input { width: 18px; height: 18px; flex: none; accent-color: var(--blue-btn); margin: 0; }
.ppck input:disabled + span { color: var(--muted); }
.ppmv { display: inline-flex; gap: 2px; }
.ppmv .iconbtn:disabled { opacity: 0.3; cursor: default; }
.iconbtn.flip svg { transform: rotate(180deg); }
.ppsw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 0.875rem; color: var(--ink); }
.ppsw .switch:disabled { opacity: 0.45; cursor: not-allowed; }
.ppbd { display: grid; grid-template-columns: 1fr 96px; gap: 8px; margin-top: 12px; }
.pps .fld + .fld { margin-top: 0; }
.ppacc { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.acc { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; min-width: 0; }
.acc input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.acc:has(input:checked) { border-color: var(--blue-btn); box-shadow: inset 0 0 0 1px var(--blue-btn); }
.acc:has(input:focus-visible) { outline: 2px solid var(--blue-btn); outline-offset: 2px; }
.acc.locked { background: var(--surface2); cursor: default; }
.acc.locked input { cursor: default; }
.acc b { font-size: 0.8125rem; font-weight: 650; color: var(--ink); margin-top: 6px; }
.acc small { font-size: 0.75rem; line-height: 1.3; color: var(--muted); }
.acc.locked b { color: var(--grey-ink); }
.accb { width: 34px; height: 34px; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; color: var(--grey-ink); border: 1px solid var(--divider); }
.accb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.acc.locked .accb { opacity: 0.6; background: var(--surface); }
@media (max-width: 640px) {
  .pgp { top: auto; left: 0; width: 100%; max-height: 90vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; animation-name: pgup; }
  @keyframes pgup { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .pplist.cols { grid-template-columns: 1fr; }
  .ppacc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- the Assistant in the command bar ---------- */
.kpg { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); }
.kpg.assist { display: block; margin: 0; font-size: 0; line-height: 0; }

/* ---------- Accessories (drawn in js/mascot.js) ---------- */
.pg-ac-hat { fill: #F2B84B; stroke: #B07A1E; stroke-width: 0.7; stroke-linejoin: round; }
.pg-ac-hat2 { fill: #F8D27A; }
.pg-ac-brim { fill: #E3A22F; stroke: #B07A1E; stroke-width: 0.6; }
.pg-ac-band { fill: none; stroke: var(--m-accent); stroke-width: 2.6; stroke-linecap: round; }
.pg-ac-cup { fill: var(--m-accent); stroke: var(--m-edge); stroke-width: 0.6; }
.pg-ac-boom { fill: none; stroke: var(--m-chain); stroke-width: 1.6; stroke-linecap: round; }
.pg-ac-mic { fill: var(--m-chain); }
.pg-ac-tape { fill: #F2B84B; stroke: #B07A1E; stroke-width: 0.5; }
.pg-ac-tick { fill: none; stroke: #3A2A08; stroke-width: 0.6; }
.pg-ac-bow { fill: var(--m-accent); stroke: var(--m-edge); stroke-width: 0.5; stroke-linejoin: round; }
.pg-ac-knot { fill: var(--blue-btn); stroke: var(--m-edge); stroke-width: 0.5; }
.pg-lod-xs .pg-acc, .pg-lod-sm .pg-acc { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pgt, .pgbub, .pgbub::before, .pin { transition: none; }
  .pgp, .pgscrim { animation: none; }
}

/* ---------- Header v2: greeting and date, the Assistant's bubble, two time pills ---------- */
.pgdate { display: block; margin-top: 2px; font-size: 0.875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pgside { flex-direction: row; align-items: center; gap: 8px; }
.pgw { display: flex; flex-wrap: wrap; gap: 6px; }
.pgpill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.8125rem; white-space: nowrap; }
.pgpill .pgwx { min-width: 0; gap: 3px; }
.pgpill .pgwx:not(:empty)::before { margin-right: 1px; }
.pgpill .pgwi { width: 15px; height: 15px; }
.pgpl.iconbtn { width: 32px; height: 32px; min-height: 32px; }
.pgpl.iconbtn svg { width: 16px; height: 16px; margin: 0; }
@media (max-width: 760px) { .pgside { justify-content: flex-start; } .pgpl.iconbtn { margin-left: auto; } }
@media (max-width: 640px) {
  .pgw { flex-wrap: nowrap; gap: 4px; }
  .pgpill { gap: 4px; padding: 0 8px; font-size: 0.75rem; min-height: 28px; }
  .pgpill .pgwx:not(:empty)::before { content: none; }
  .pgpl.iconbtn { display: none; }
}

/* ---------- My Day v3: one header line, one the Assistant hero ---------- */
.dhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 4px 4px 0; }
.dhl { min-width: 0; }
.dhdate { margin: 0 0 2px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.dhead h1 { margin: 0; font-size: 1.875rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.dhead .pgw { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8125rem; color: var(--muted); padding-bottom: 4px; }
.clk { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.clk b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.clk .pgwx { min-width: 0; gap: 3px; color: var(--muted); }
.clk .pgwx:not(:empty)::before { content: none; }
.clk .pgwi { width: 15px; height: 15px; }

.hero { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--sh-1); }
.herotop { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hero .pgl { width: 72px; height: 72px; padding: 0; border: 0; background: transparent; border-radius: 16px; cursor: pointer; flex: none; display: grid; place-items: center; }
.hero .pgslot, .hero .pgmount.assist { width: 72px; height: 72px; }
.herosay { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.herosay .pgsay { font-size: 0.75rem; font-weight: 700; color: var(--muted); margin: 0; }
.herosay .pgt { margin: 0; font-size: 1.0625rem; line-height: 1.45; color: var(--ink); }
.hero .cmdbar { background: var(--ground); border-color: transparent; box-shadow: none; min-height: 46px; }
.hero .cmdbar:hover { border-color: var(--line); }
.hero .pins { margin: 0; gap: 2px 4px; }
.hero .pin { min-height: 32px; padding: 0 10px; border: 0; background: transparent; color: var(--grey-ink); font-weight: 600; border-radius: 8px; }
.hero .pin:hover { background: var(--surface2); }
.hero .pin svg { color: var(--blue-btn); }
.dayfoot { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 4px; }
.dayfoot .link.quiet { font-size: 0.8125rem; }
.dayfoot svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
@media (max-width: 640px) {
  .dhead h1 { font-size: 1.5rem; }
  .dhead .pgw { gap: 2px 14px; }
  .hero { padding: 14px 14px 10px; border-radius: 16px; }
  .hero .pgl, .hero .pgslot, .hero .pgmount.assist { width: 60px; height: 60px; }
  .herosay .pgt { font-size: 0.9375rem; }
}

/* ---------- the Assistant's looks: five alternatives to the classic cream blind ---------- */
.pglook-classic { --m-fabric:#EEE9DF; --m-weave:#E0D9CC; --m-slat-lo:#CFC5B1; --m-rail:#2A2D2B; --m-cap:#4A4F4C; --m-ink:#1E2420; --m-cheek:#F2A7A0; --m-arm:#2A2D2B; --m-edge:rgba(60,46,20,0.32); }
:root[data-assist="blockout"], .pglook-blockout { --m-fabric:#50565C; --m-weave:#454A50; --m-slat-lo:#363A3F; --m-rail:#1E2023; --m-cap:#3A3E42; --m-ink:#F5F1E8; --m-cheek:#E58C84; --m-arm:#7A8087; --m-edge:rgba(0,0,0,0.5); }
:root[data-assist="bowranda"], .pglook-bowranda { --m-fabric:#DDEBF7; --m-weave:#C7DEF1; --m-slat-lo:#A8CAE6; --m-rail:#1480C4; --m-cap:#0F679F; --m-ink:#12324A; --m-cheek:#F2A7A0; --m-arm:#1480C4; --m-edge:rgba(15,70,110,0.3); }
:root[data-assist="sage"], .pglook-sage { --m-fabric:#E4EBE0; --m-weave:#D2DCCD; --m-slat-lo:#B8C8B1; --m-rail:#3E5A47; --m-cap:#567460; --m-ink:#1F2B22; --m-cheek:#EBA79C; --m-arm:#4E6E58; --m-edge:rgba(40,60,40,0.3); }
:root[data-assist="timber"], .pglook-timber { --m-fabric:#DDB283; --m-weave:#C99766; --m-slat-lo:#A6744A; --m-rail:#5A3B22; --m-cap:#7A5232; --m-ink:#2A1A0E; --m-cheek:#E98F7E; --m-arm:#7A5232; --m-edge:rgba(70,40,15,0.45); }
:root[data-assist="coral"], .pglook-coral { --m-fabric:#FBDCCF; --m-weave:#F3C4B2; --m-slat-lo:#EDAD96; --m-rail:#8A3B2B; --m-cap:#A54E3C; --m-ink:#3A1D16; --m-cheek:#E9737A; --m-arm:#A54E3C; --m-edge:rgba(120,50,30,0.3); }
:root[data-assist="timber"] .pg-slat, .pglook-timber .pg-slat { rx: 0.7px; }
.pplooks { border: 0; margin: 8px 0 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pplook { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; min-width: 0; text-align: center; }
.pplook input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pplook:has(input:checked) { border-color: var(--blue-btn); box-shadow: inset 0 0 0 1px var(--blue-btn); }
.pplook:has(input:focus-visible) { outline: 2px solid var(--blue-btn); outline-offset: 2px; }
.pplook .mas { width: 56px; height: 56px; }
.pplook b { font-size: 0.8125rem; font-weight: 650; color: var(--ink); }
.pplook small { font-size: 0.6875rem; color: var(--muted); line-height: 1.3; }

/* ---------- Phase 2: calm My Day ---------- */
/* The assistant is one quiet sentence, not a card */
.hero { padding: 0 4px; border: 0; border-radius: 0; background: none; box-shadow: none; gap: 10px; }
.hero .herosay { display: block; margin: 0; }
.hero .pgsay:empty { display: none; }
.hero .herosay .pgt { display: inline; font-size: 0.9375rem; line-height: 1.5; color: var(--grey-ink); }
.hero .pins { margin: 0; }
@media (max-width: 640px) { .hero { padding: 0 2px; } .herosay .pgt { font-size: 0.9375rem; } }

/* Queue reason text: 14px; one line on desktop, two on phones */
.qs { font-size: 0.875rem; }
@media (max-width: 640px) {
  .qs { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* Customer Service team: larger faces, bold names, a clear status word */
.teamp .tph h2 { font-size: 0.8125rem; color: var(--ink); }
.teamp .tph .muted { font-weight: 600; }
.tmgrid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px 2px; padding: 0; }
.tmtile { padding: 8px 2px 6px; gap: 3px; }
.tmtile .av, .tmtile .av.lg { width: 64px; height: 64px; font-size: 1.25rem; }
.tmtile .av.pic img { width: 100%; height: 100%; object-fit: cover; }
.tmtile .tmav .pdot { width: 16px; height: 16px; right: 1px; bottom: 2px; }
.tmtile b { font-size: 0.9375rem; font-weight: 750; color: var(--ink); }
.tmtile .tmst { font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.tmst.st-active { color: var(--good); }
.tmst.st-busy { color: var(--red); }
.tmst.st-away { color: var(--amber); }
.tmst.st-oncall { color: var(--blue-btn); }
.tmst.st-leave, .tmst.st-offline { color: var(--muted); }
.tpgroup { min-height: 36px; margin-top: 2px; }
@media (max-width: 1099px) { .tmgrid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); } }

/* Waiting on others: collapsed under the queue */
.wait { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.waith { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 16px; border: 0; background: none; color: var(--grey-ink); font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; border-radius: var(--r-card); }
.waith:hover { color: var(--ink); background: var(--row-hover); }
.waith .ic { width: 16px; height: 16px; transition: transform 0.16s ease; }
.waith[aria-expanded="true"] .ic { transform: rotate(180deg); }
.waitl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--divider); }
.waitl li + li { border-top: 1px solid var(--divider); }
.waitl a { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 10px 16px; color: inherit; text-decoration: none; }
.waitl a:hover { background: var(--row-hover); }
.waitl .wt { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 0.9375rem; }
.waitl .wt b { font-weight: 650; }
.waitl .wt .muted, .waitl .ww { font-size: 0.875rem; }
.waitl .ww { color: var(--amber); font-weight: 600; }
