/* Parkmed WorkOS 0.20: one accent colour, chosen by each person and kept with their account (D-041), and folding sections.
   D-041 supersedes D-012 for THIS FILE ONLY: hue appears here and nowhere else.
   The accent is used for two things only: outlines (keyboard focus, a drop target) and priority (High, Urgent).
   Everything else stays salt and pepper: buttons, the menu, segments, today, now, unread. Late stays filled ink.
   Every colour meets WCAG 2.2 AA in both modes (tools/accent_palette.py): the shade on every surface >= 4.6:1, and the
   tag's text on the shade >= 4.5:1. The set is the two Parkmed colours plus three more spread round the colour wheel,
   so no two look alike; no red (it reads as an error).
   Load after wos.css (User Interface > CSS File URLs). WOS_UI writes data-accent on the page (the person's choice),
   wos-ux.js copies it to <html> for the menu and dialogs, and draws the picker. */

/* 1. Tokens. No data-accent = Parkmed blue, the default. Each choice: a dark shade for Light, a light shade for Dark. */
:root, [data-accent]{ --hue-l:#2A62A9; --hue-d:#579BF5; }                       /* blue (Parkmed) 5.5:1 /  6.0:1 */
[data-accent="green"]{ --hue-l:#00742C; --hue-d:#55AE65; }                       /* green (Parkmed) 5.3 / 6.2 */
[data-accent="violet"]{ --hue-l:#581B9D; --hue-d:#D1BDFF; }                      /* violet  9.1 / 10.1 */
[data-accent="magenta"]{ --hue-l:#B02A83; --hue-d:#EC7ABE; }                     /* magenta 5.3 /  6.6 */
[data-accent="amber"]{ --hue-l:#8B5900; --hue-d:#DB910F; }                       /* amber   5.3 /  6.5 */
[data-accent="graphite"]{ --hue-l:#000000; --hue-d:#FFFFFF; }                    /* no colour: 0.19.8's look */

:root, [data-accent]{ --hue:var(--hue-l); --hue-ink:#FFFFFF; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]), :root:not([data-theme="light"]) [data-accent]{ --hue:var(--hue-d); --hue-ink:#000000; } }
:root[data-theme="dark"], :root[data-theme="dark"] [data-accent]{ --hue:var(--hue-d); --hue-ink:#000000; }
:root{ --ut-focus-outline-color:var(--hue); }

/* 2. Focus: every keyboard outline in the accent ("html" lifts these just above wos.css) */
html :focus-visible, html #t_Body_nav :focus-visible, html .wos :focus-visible, html .wos-theme :focus-visible,
html .wos-qa-trigger:focus-visible, html .wos-qa-fab:focus-visible, html .wos-rt-day input:focus-visible+span{ outline-color:var(--hue); }

/* 3. Priority, in the existing line language: dashed = High, heavy/solid = Urgent */
html .wos-chk.wos-hi:not(.wos-on){ border:1.5px dashed var(--hue)!important; }
html .wos-chk.wos-urg:not(.wos-on){ border:2.5px solid var(--hue)!important; }
html .wos-dot.wos-hi:not(.wos-on), html .wos-dot.wos-urg:not(.wos-on){ border-color:var(--hue); }
html .wos-card.wos-p-urgent:not(.wos-closed){ border-color:var(--hue); }
html .wos-card.wos-p-high:not(.wos-closed){ border:1px dashed var(--hue); }
html .wos-tag.wos-t-urg{ background:var(--hue); color:var(--hue-ink); border:1px solid var(--hue); }
html .wos-tag.wos-t-hi{ background:transparent; color:var(--hue); border:1px solid var(--hue); }
html .wos-pc-t .wos-tag.wos-t-hi, html .wos-pc-t .wos-tag.wos-t-urg{ margin-left:6px; }

/* 4. Drop target outline while dragging */
html .wos-zone.wos-over{ outline-color:var(--hue); }

/* 5. The picker, under Appearance in the menu (wos-ux.js) */
.wos-acc{ display:flex; flex-wrap:wrap; gap:8px; padding:6px 2px 0; }
.wos-acc-sw{ position:relative; width:22px; height:22px; padding:0; border-radius:50%; border:2px solid var(--surface); background:var(--sw-l); box-shadow:0 0 0 1px var(--line); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.wos-acc-sw::before{ content:''; position:absolute; inset:-5px; }                                                  /* 32px target */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .wos-acc-sw{ background:var(--sw-d); } }
:root[data-theme="dark"] .wos-acc-sw{ background:var(--sw-d); }
.wos-acc-sw[aria-checked="true"]{ box-shadow:0 0 0 2px var(--ink); }
.wos-acc-sw[aria-checked="true"]::after{ content:''; width:4px; height:8px; border:solid var(--sw-ink, #FFFFFF); border-width:0 2px 2px 0; transform:rotate(45deg) translate(-1px,-1px); }   /* not colour alone */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .wos-acc-sw[aria-checked="true"]::after{ border-color:#000000; } }
:root[data-theme="dark"] .wos-acc-sw[aria-checked="true"]::after{ border-color:#000000; }
.wos-acc-sw:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }
@media (pointer:coarse){ .wos-acc{ gap:8px; } .wos-acc-sw{ width:24px; height:24px; } .wos-acc-sw::before{ inset:-4px; } }   /* six in one row, 32px apart */

/* 6. Folding section headings (wos-ux.js adds the chevron; data-coll on the heading) */
.wos-sh[data-coll-on]{ cursor:pointer; user-select:none; }
.wos-coll-b{ position:relative; flex:none; align-self:center; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; margin:0 -4px 0 -6px; padding:0; border:0; border-radius:6px; background:transparent; color:var(--wos-muted); cursor:pointer; }
.wos-coll-b::before{ content:''; position:absolute; inset:-4px; }                                                 /* 30px target */
.wos-coll-b:hover{ background:var(--wos-sunk); color:var(--wos-ink); }
.wos-coll-b svg{ transform:rotate(90deg); transition:transform .15s; }
.wos-coll-shut>.wos-coll-b svg{ transform:none; }
.wos-coll-hid{ display:none!important; }
/* a folded drop zone stays a thin strip, so dragging onto it still works */
.wos-zone.wos-coll-hid{ display:flex!important; min-height:30px; border:1px dashed var(--wos-line); align-items:center; justify-content:center; }
.wos-zone.wos-coll-hid>*{ display:none!important; }
.wos-zone.wos-coll-hid::before{ content:'Folded'; font-size:12px; color:var(--wos-muted); }
@media (pointer:coarse){ .wos-coll-b::before{ inset:-9px; } }
@media (prefers-reduced-motion: reduce){ .wos-coll-b svg{ transition:none; } }

/* 7. A task's More details (Source and Created) */
.wos .wos-pr-more>summary{ list-style:none; display:flex; align-items:center; gap:8px; margin:0; padding:8px 0; font-size:14px; font-weight:500; color:var(--wos-muted); text-decoration:none; cursor:pointer; }
.wos .wos-pr-more>summary::-webkit-details-marker{ display:none; }
.wos .wos-pr-more>summary::before{ content:''; flex:none; width:6px; height:6px; margin:0 4px 0 2px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); transition:transform .15s; }
.wos .wos-pr-more[open]>summary::before{ transform:rotate(45deg); }
@media (prefers-reduced-motion: reduce){ .wos details>summary::before{ transition:none; } }

/* 8. Long runs of activity in an item fold to "Show n more changes" (wos-ux.js) */
.wos-ev-more{ align-self:flex-start; margin-left:22px; padding:2px 10px; border:1px dashed var(--wos-line); border-radius:999px; background:transparent; color:var(--wos-muted); font:500 12.5px/1.6 var(--sans); cursor:pointer; }
.wos-ev-more:hover{ color:var(--wos-ink); border-color:var(--wos-muted); }
