/* styles for pay-ui.js: the Pay run screen, the pay statement drawer and My earnings.
   Every class starts with py- so it cannot collide with another screen's. Colours are the theme's variables only. */

/* ---------- the tabs across the top ---------- */
.py-tabs{display:flex;gap:4px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:3px;width:max-content;max-width:100%;background:var(--s1);margin-bottom:var(--gap)}
.py-tabs button{padding:6px 12px;border-radius:7px;font-size:12px;font-weight:600;color:var(--ink-3);display:flex;align-items:center;gap:6px;white-space:nowrap}
.py-tabs button[aria-selected="true"]{background:var(--s3);color:var(--ink)}
.py-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.py-tabs i{font-style:normal;font-size:10px;font-weight:700;min-width:17px;padding:1px 5px;border-radius:999px;text-align:center;background:var(--warn-soft);color:var(--warn)}
.py-body{min-width:0}
.py-gap{margin-top:var(--gap)}
.py-pad{padding:12px 14px;margin:0}
.py-center{text-align:center;padding:0 14px 18px;margin:0}
.py-ban{display:flex;flex-direction:column;gap:8px;margin-bottom:var(--gap)}
.py-ban .banner{flex-wrap:wrap}
.py-ban:empty{display:none}
.py-hwhy{display:block;margin-top:4px}
.py-late{color:var(--crit);font-weight:600}
.py-fig{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:600;margin-left:6px;white-space:nowrap}
.py-pills{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}

/* ---------- choosing a run, and its state ---------- */
.py-top{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-bottom:var(--gap)}
.py-pick{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:600;color:var(--ink-3);min-width:0;flex:1 1 240px;max-width:440px}
.py-pick select{font:inherit;font-size:13.5px;font-weight:400;padding:8px 10px;border-radius:9px;border:1px solid var(--line-2);background:var(--s1);color:var(--ink);min-width:0;width:100%}
.py-pick select:focus{outline:2px solid var(--accent);outline-offset:1px}
.py-state{padding-bottom:9px}

/* ---------- the cycle a run is for ---------- */
.py-cyc{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--s2)}
.py-cyc div{padding:10px 14px;min-width:0}
.py-cyc div+div{border-left:1px solid var(--line)}
.py-cyc dt{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
.py-cyc dd{margin:3px 0 0;font-size:12.5px;font-weight:600;color:var(--ink)}

/* ---------- one person in a run: a line that opens to show what is behind it ---------- */
.py-p{border-bottom:1px solid var(--line)}
.py-p:last-child{border-bottom:0}
.py-p summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:minmax(0,1.3fr) auto minmax(150px,auto);grid-template-areas:"who amt st" "why why why";gap:4px 16px;align-items:center;padding:12px 14px}
.py-p summary::-webkit-details-marker{display:none}
.py-p summary:hover{background:var(--s2)}
.py-p summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.py-p[open] summary{background:var(--s2)}
.py-who{grid-area:who;display:flex;align-items:center;gap:10px;min-width:0}
.py-nm{display:flex;flex-direction:column;min-width:0}
.py-nm b{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.py-nm small{font-size:11.5px;color:var(--ink-3)}
.py-amt{grid-area:amt;font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:14px;font-weight:600;text-align:right;white-space:nowrap}
.py-amt small{display:block;font-size:11px;font-weight:400;color:var(--ink-3)}
.py-st{grid-area:st;justify-self:end}
.py-why{grid-area:why;font-size:11.5px;color:var(--ink-2);line-height:1.45;padding-left:37px;text-wrap:pretty}
.py-why:empty{display:none}
.py-why em{display:block;font-style:normal;color:var(--warn)}
.py-p[data-st="held"] .py-amt{color:var(--ink-3)}
.py-in{padding:2px 14px 14px 51px}
.py-rows{list-style:none;margin:0;padding:0;font-size:12.5px}
.py-rows li{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:6px 0;border-bottom:1px dashed var(--line)}
.py-rows li span{min-width:0;color:var(--ink);overflow-wrap:anywhere}
.py-rows li small{display:block;font-size:11px;color:var(--ink-3);margin-top:1px}
.py-rows li b{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500;white-space:nowrap;text-align:right}
.py-rows li.py-tot{border-bottom:0;border-top:1px solid var(--line-2);margin-top:-1px}
.py-rows li.py-tot span,.py-rows li.py-tot b{font-weight:700}
.py-rows li.py-wh{border-bottom:0}
.py-rows li.py-wh b{color:var(--warn)}
.py-acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.py-modal{margin:0 0 6px;max-height:38vh;overflow-y:auto}
.py-pick-jobs{display:flex;flex-direction:column;gap:2px;margin:0 0 8px;max-height:36vh;overflow-y:auto}
.py-pick-jobs .fchk{padding:7px 0;border-bottom:1px dashed var(--line);align-items:flex-start}
.py-pick-jobs .fchk span{flex:1;min-width:0}
.py-pick-jobs .fchk b{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:500;white-space:nowrap}

/* ---------- the yearly report ---------- */
.py-rep th:nth-child(n+4){text-align:right}
.py-reptot td{border-top:1px solid var(--line-2);font-weight:700}
.py-notes{margin:0;padding:12px 14px 14px 30px;font-size:11.5px;color:var(--ink-3);line-height:1.6}

/* ---------- settings ---------- */
.py-set{max-width:760px}
.py-form{padding:4px 14px 14px;display:flex;flex-direction:column;gap:12px}
.py-form .hint{margin:0;line-height:1.55;font-size:11.5px}
.py-form .fld small{line-height:1.45}
.py-save{margin:var(--gap) 0 0}

/* ---------- the statement drawer ---------- */
.py-part{margin-top:12px}
.py-part .py-rows{padding:4px 13px 8px}
.py-partwhy{margin:0;padding:10px 13px 0;font-size:12px;color:var(--ink-2);line-height:1.5;text-wrap:pretty}
.py-part[data-st="held"] h4{color:var(--crit)}
.py-part .py-rows+.py-partwhy{padding:0 13px 11px}
.py-partact{padding:8px 13px 11px}
.py-partact:empty{padding:0 0 4px}
.py-part .py-rows.py-pad{padding:4px 13px 0}
.py-part .py-rows li b{font-family:var(--ui)}

/* ---------- phone width ---------- */
@media(max-width:760px){
  .py-tabs{width:100%}
  .py-tabs button{flex:1 1 auto;justify-content:center}
  .py-cyc{grid-template-columns:repeat(2,minmax(0,1fr))}
  .py-cyc div:nth-child(3){border-left:0}
  .py-cyc div:nth-child(n+3){border-top:1px solid var(--line)}
  .py-p summary{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who amt" "st st" "why why";gap:6px 12px}
  .py-st{justify-self:start;padding-left:37px}
  .py-in{padding-left:14px}
  .py-acts .btn{min-height:36px}
  .py-top .btn{flex:1 1 100%}
  .py-rep{min-width:0;display:block}
  .py-rep thead{display:none}
  .py-rep tbody{display:block}
  .py-rep tr{display:block;padding:11px 14px;border-bottom:1px solid var(--line)}
  .py-rep td{display:flex;justify-content:space-between;gap:14px;padding:2px 0;border:0;text-align:right;white-space:normal}
  .py-rep td:empty{display:none}
  .py-rep td::before{content:attr(data-l);color:var(--ink-3);font-family:var(--ui);font-weight:400;text-align:left}
  .py-reptot td{border-top:0}
}
/* a long word with no spaces (a pasted reference, a reason typed without a break) wraps inside its card */
.py-body .li>span:first-child{min-width:0}
.py-body .li .lb,.py-body .li .de,.py-body .py-why,.py-hwhy{overflow-wrap:anywhere}
