/*
 * Proof 3, the time logs: an admin's window with a week of days as cells, the log of one day under them, the totals in
 * tall numerals and the payroll file; then the worker's own phone. The band is mint; the window and the phone wear the
 * Poster look. Colors are base.css tokens.
 */
.hr { display: grid; gap: 44px; max-width: 940px; margin-inline: auto; }
.hr [hidden] { display: none !important; }
.hr-win { width: 100%; padding-bottom: 16px; }
.hr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 10px; }
.hr-head > span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hr-head .ui-badge { margin-top: 3px; }

.hr-meter { display: grid; gap: 6px; padding: 0 16px 14px; }
.hr-bar { display: block; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.hr-bar i { display: block; height: 100%; background: var(--ok-solid); transform: scaleX(0); transform-origin: 0 50%; transition: transform 140ms linear; }
[dir='rtl'] .hr-bar i { transform-origin: 100% 50%; }
.hr-count { font: 500 12px/16px var(--mono); color: var(--text-2); }

/* A week as cells: one row a person, one cell a day. */
.hr-grid { display: grid; grid-template-columns: minmax(76px, 1.25fr) repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0 12px; }
.hr-gh { font: 500 11px/16px var(--sans); color: var(--text-3); text-align: center; padding-bottom: 2px; }
.hr-who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hr-who b { font: 600 13px/16px var(--sans); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font: 500 11px/13px var(--mono); white-space: nowrap; transition: background 160ms, border-color 160ms, color 160ms, box-shadow 160ms; }
.hr-cell:hover { border-color: var(--line-control); }
.hr-cell i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px dashed currentColor; display: grid; place-items: center; }
.hr-cell.is-ok, .hr-cell.is-mine { background: var(--ok-tint); border-color: transparent; color: var(--ok); }
.hr-cell.is-ok i, .hr-cell.is-mine i { border: 0; background: var(--ok-solid); }
.hr-cell.is-ok i::after, .hr-cell.is-mine i::after { content: ''; width: 6px; height: 3px; border: solid var(--surface); border-width: 0 0 1.5px 1.5px; transform: translateY(-0.5px) rotate(-45deg); }
.hr-cell.is-check { background: var(--warn-tint); border-color: var(--warn); color: var(--warn); animation: hr-ask 1.7s var(--ease-in-out) infinite; }
.hr-cell.is-check i { border: 0; background: var(--warn); }
.hr-cell.is-check i::after { content: '!'; color: var(--surface); font: 700 10px/13px var(--sans); }
.hr-cell.sel { box-shadow: 0 0 0 2px var(--accent); }
.hr-cell.pop { animation: hr-pop 340ms var(--ease-spring); }
.hr-cell.is-check.pop { animation: hr-pop 340ms var(--ease-spring), hr-ask 1.7s 340ms var(--ease-in-out) infinite; }
@keyframes hr-pop { 0% { transform: scale(0.82); } 60% { transform: scale(1.1); } }
@keyframes hr-ask { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 55%, transparent); } 60% { box-shadow: 0 0 0 9px transparent; } }
.hr-cell.is-check.sel { animation: none; box-shadow: 0 0 0 2px var(--warn); }

/* The log of the day that is picked. Its height holds still while Siby runs through the week. */
.hr-log { display: grid; gap: 7px; align-content: start; min-height: 150px; margin: 14px 12px 0; padding: 12px 14px 13px; border-radius: 14px; background: var(--sunken); }
.hr-log-top { display: flex; align-items: center; gap: 8px; }
.hr-log-top b { flex: 1; min-width: 0; font: 600 14px/20px var(--sans); color: var(--text); }
.hr-punches { display: flex; flex-wrap: wrap; gap: 6px 18px; font: 500 13px/18px var(--mono); color: var(--text); }
.hr-punches span { display: flex; flex-direction: column; }
.hr-punches i { font: 400 11px/14px var(--sans); color: var(--text-3); }
.hr-line { font: 400 13px/18px var(--sans); color: var(--text-2); }
.hr-why { font: 600 13px/18px var(--sans); }
.hr-why.ok, .hr-answer.ok { color: var(--ok); }
.hr-why.warn, .hr-answer.warn { color: var(--warn); }
.hr-what { display: grid; gap: 5px; padding: 11px 12px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--warn); animation: hr-open 380ms var(--ease-spring); }
.hr-what b { font: 600 12px/16px var(--sans); color: var(--text-3); }
.hr-what p { font: 500 15px/21px var(--sans); color: var(--text); }
.hr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
@keyframes hr-open { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }

/* The totals, in tall numerals. */
.hr-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 16px 4px; }
.hr-totals > div { min-width: 0; }
.hr-t-label { display: block; font: 600 12px/16px var(--sans); color: var(--text-3); }
.hr-tall { display: block; margin-top: 3px; font: 400 14px/1.05 var(--sans); color: var(--text-2); white-space: nowrap; }
.hr-tall b { font: 700 34px/1 var(--sans); letter-spacing: -0.04em; color: var(--text); }
.hr-totals .ui-sub { margin-top: 5px; }
.hr-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px 0; }
.hr-save .ui-sub { flex: 1; min-width: 170px; }
.hr-nudge { justify-self: start; color: var(--mark); }
.hr-nudge.rest::before { animation: none; }

/* The worker's phone, rising from under the window. */
.hr-worker { display: grid; gap: 14px; justify-items: center; margin-top: 6px; }
.hr-cap { max-width: 21em; text-align: center; font: 400 15px/21px var(--sans); color: var(--fg-2); }
.hr-cap b { display: block; margin-bottom: 3px; font: 500 11px/16px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--mark); }
.hr-crop { height: 486px; overflow: hidden; padding: 4px 26px 0; margin-inline: -26px; }
.hr-crop .phone { transform: rotate(2deg); transform-origin: 50% 0; }
/* Spanish: the two answers stand one above the other and the receipt's last sentence takes a third line, so more of the phone shows. */
:lang(es) .hr-crop { height: 546px; }
.hr-confirm b { font: 600 14px/19px var(--sans); color: var(--text); }
.hr-yn { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-answer { font: 500 13px/18px var(--sans); }
.hr-answer:empty { display: none; }
.hr-receipt { gap: 3px !important; font: 400 12px/17px var(--sans); color: var(--text-2); animation: hr-open 380ms var(--ease-spring); }
.hr-receipt b { font: 600 13px/18px var(--sans); color: var(--text); }
.hr-receipt-n { font: 700 24px/28px var(--sans); letter-spacing: -0.03em; color: var(--text); }

@media (min-width: 700px) {
  .hr-grid { grid-template-columns: minmax(110px, 1.3fr) repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0 16px; }
  .hr-cell { flex-direction: row; gap: 7px; font-size: 12px; height: 40px; }
  .hr-log { margin-inline: 16px; }
  .hr-tall b { font-size: clamp(40px, 3.9vw, 58px); }
  .hr-worker { grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: start; gap: 22px; }
  .hr-cap { text-align: start; }
}
