/* press-area.css — a bigger place to press, on a phone (2026-11-21).

   The review of a worker's screens, proposal 8: on a phone many buttons were
   pressed on less than 44px of height — "Today" on 28, "Clear all" on 26,
   "Back to the board" on 16, a Team chip on 23. The owner picked option C
   from three drawn options: every button KEEPS ITS LOOK and only the place a
   finger can press grows, wherever there is empty space beside it; a button
   really gets taller only where buttons are packed together — the Team's
   shift chips and Account's "Sign out" list.

   How a press area grows: the button is `position: relative` and carries an
   invisible `::after` that reaches past its edges (the pattern of .toast-x,
   .wk-dayoff, .sec-remove — DESIGN_SYSTEM.md §12.3). The rule that keeps it
   honest: an area grows ONLY INTO EMPTY SPACE. Toward another button, link or
   shift card it stops at half the gap, so no press ever lands on a neighbour.
   Every number below was measured in a browser against that rule
   (tests/test_browser.py re-measures them). An `inset` is counted from
   INSIDE the button's border, so a button with a 1px border reaches 1px
   less than the number written.

   THE SWITCH: this file's one <link> in base.html (id="press-area"). Without
   it every button below is pressed on its drawn box again, and the Team chips
   and "Sign out" are their old height.

   Phones only (≤680px): with a mouse the drawn box is the right target. */

@media (max-width: 680px) {

  /* ---- 1. The look stays; the place to press grows --------------------- */

  .wk-openday, .focus-opt, .wk-fold, .wk-add, .wk-others > summary,
  .add-btn, .day-timeoff-btn, .icon-btn, .notif-clear,
  .board-back, .board-post-btn, .lang-btn, .tz-save,
  .app-header > .btn-ghost { position: relative; }

  .wk-openday::after, .focus-opt::after, .wk-fold::after, .wk-add::after,
  .wk-others > summary::after, .add-btn::after, .day-timeoff-btn::after,
  .icon-btn::after, .notif-clear::after, .board-back::after,
  .board-post-btn::after, .lang-btn::after, .tz-save::after,
  .app-header > .btn-ghost::after, .bell-btn::after {
    content: ""; position: absolute; inset: 0;
  }

  /* The Week's day line — "Today", "Open this day" (28px drawn → 44).
     Upward into the empty strip under the top bar; only 2px downward, where
     the next-shift line's own press area begins. */
  .wk-openday::after { inset: -16px 0 -3px; }

  /* "My shifts / Everyone" (32 → 44). 2px upward (the next-shift line's
     area ends 3px above it), the rest downward into the strip above the
     first phase. */
  .focus-opt::after { inset: -2px 0 -10px; }

  /* The fold arrow in a phase's header (34 → 44), inside the header's own
     padding. */
  .wk-fold::after { inset: -5px; }

  /* Inside a phase's cell the buttons sit 6px apart: each takes its half.
     "N more" and "+ Request" are the full width of the phone, pressed on 38. */
  .wk-add::after, .wk-others > summary::after { inset: -4px 0; }

  /* The top bar's round buttons — search, light / dark, the bell (40 → 44). */
  .bell-btn::after { inset: -3px 0; }

  /* A window's "×" (38 → 44). */
  .icon-btn::after { inset: -4px; }

  /* The day window: "+ Request" (33 → 44; a shift row sits 7px above it,
     so 3px up and the rest down), "Request this day off" (38 → 44). */
  .add-btn::after { inset: -4px 0 -10px; }
  .day-timeoff-btn::after { inset: -3px 0; }

  /* Notifications: "Clear all" (26 → 44); a row's "×" (pressed on 40 → 44,
     upward only — the next row begins 7px under it). */
  .notif-clear::after { inset: -10px -4px; }
  .notif-del::after { inset: -14px -10px -6px; inset-inline-start: -5px; }

  /* The message board: "Back to the board" (16 → 44), "Post" (34 → 44; the
     text box is 11px above it), a message's "×" (pressed on 33 → 44, upward
     only — the message's own link is 4px under it). */
  .board-back::after { inset: -14px -6px; }
  .board-post-btn::after { inset: -4px 0 -6px; }
  .board-del::after { inset: -23px -12px -3px; }

  /* Account: "Back to board" (36 → 44), "Save" and "Delete my account"
     (36 → 44), the language button (34 → 44). */
  .app-header > .btn-ghost::after { inset: -4px 0; }
  .tz-save::after { inset: -6px 0; }
  .lang-btn::after { inset: -6px 0; }

  /* ---- 2. Packed together: these really get taller --------------------- */

  /* The Team's shift chips (23 → 34 drawn, pressed on 44). Two chips of one
     day sat 6px apart; they sit 10px apart now, and each takes 5px of the
     space above and below it. */
  .team-cell { gap: 10px; }
  .team-cell .chip { position: relative; min-height: 34px; box-sizing: border-box; }
  .team-cell .chip::after { content: ""; position: absolute; inset: -6px 0; }

  /* Account's devices: "Sign out" on every row (29 → 34 drawn, pressed on
     40 — the rows are too close for more). */
  .device-row .btn-xs { position: relative; min-height: 34px; }
  .device-row .btn-xs::after { content: ""; position: absolute; inset: -4px 0; }

  /* ---- 3. The manager's buttons (2026-11-22) ---------------------------- */

  /* The same rule, for the buttons only a manager has. The owner saw the
     measurements (about 30 kinds pressed on under 44px) and picked option A
     of four drawn for the one packed place — the foot of a phase on the Week. */

  /* 3a. The foot of a phase on the Week: the coverage chip, the limit chip
     and the round × share ONE row (the coverage chip had a row of its own);
     the chips are 32px high (20 and 19 before), the × is 28 (22). The row
     keeps 12px above and below it, so each button takes 6 of them: all are
     pressed on 44. "+ Add" keeps its look and takes its own 6. */
  .wk-band:not(.folded) .wk-cell > .cov-chip { display: none; }
  .wk-cell-tools { justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin-block: 6px; }
  .wk-cell-tools .cov-chip.in-tools { display: inline-flex; align-self: center; }
  .wk-cell-tools .cap-chip, .wk-cell-tools .cov-chip {
    position: relative; box-sizing: border-box; min-height: 32px; margin: 0;
    padding-inline: 12px; font-size: var(--fs-small, 12px);
  }
  .wk-cell-tools .cap-chip::after, .wk-cell-tools .cov-chip::after { content: ""; position: absolute; inset: -7px 0; }
  .wk-cell-tools .wk-dayoff-form { margin-inline-start: auto; }
  .wk-cell-tools .wk-dayoff { width: 28px; height: 28px; }
  .wk-cell-tools .wk-dayoff::after { inset: -9px; inset-inline-end: -11px; }
  .wk-cell-tools ~ .wk-add::after { inset: -6px 0 -8px; }

  /* 3b. The look stays; the place to press grows. */

  /* Team: a worker's name opens their window (16 → 44). */
  a.tnc-link { position: relative; }
  a.tnc-link::after { content: ""; position: absolute; inset: -14px 0; }

  /* A window's small buttons — "Choose", "Approve", "Decline" in Requests to
     approve, "Send to the whole list" in the day window (32–36 → 44). */
  .overlay .btn-sm { position: relative; }
  .overlay .btn-sm::after { content: ""; position: absolute; inset: -6px 0; }

  /* The day window. "Assign" (30 → 44) and the tick beside a suggested
     worker (18 → 44; a tick box of ours is drawn by the page, so it can
     carry a press area). */
  .overlay .suggest-row .suggest-btn::after { inset: -8px 0; }
  .suggest-pick { position: relative; }
  .suggest-pick::after { content: ""; position: absolute; inset: -14px -15px -15px; }
  /* "N more workers" (22 → 44). */
  .suggest-more > summary { position: relative; }
  .suggest-more > summary::after { content: ""; position: absolute; inset: -12px 0 -10px; }
  /* The − / + beside "limit" and "needed" (30 → 44). The two halves carry
     the round corners themselves, so the box need not clip them — a clipped
     box would cut the press area off too. */
  .stepper { overflow: visible; }
  .stepper .step:first-of-type { border-radius: var(--rad-xl, 16px) 0 0 var(--rad-xl, 16px); }
  .stepper .step:last-of-type { border-radius: 0 var(--rad-xl, 16px) var(--rad-xl, 16px) 0; }
  .stepper .step::after { content: ""; position: absolute; inset: -7px 0; }
  /* The day window's round × on a phase (26; pressed on 42 → 44). */
  .sec-remove::after { inset-block: -10px; }
  /* "End applying" / "Reopen" (38 → 44), "Reset to default" (40 → 44). */
  .day-applying-btn, .dl-actions .btn-block { position: relative; }
  .day-applying-btn::after { content: ""; position: absolute; inset: -4px 0; }
  .dl-actions .btn-block::after { content: ""; position: absolute; inset: -3px 0; }

  /* The new-shift form and Settings. "Restore default" (26 → 44). */
  .restore-btn { position: relative; }
  .restore-btn::after { content: ""; position: absolute; inset: -10px 0; }
  /* "exact minute" really is taller (26 → 36; the owner's option A of three
     drawn, 2026-11-23). It sits 8px under the hour boxes and, in the
     new-shift form, 10px above a switch row, so an invisible area alone
     reached 34. At 36 it takes 4px above and 4 below: pressed on 44, in the
     new-shift form, a shift's "edit hours" and Settings alike. */
  .time-exact-toggle { position: relative; min-height: 36px; box-sizing: border-box; }
  .time-exact-toggle::after { content: ""; position: absolute; inset: -5px 0; }
  /* Settings' "Save settings" and "Cancel" (42 → 44). */
  .settings-actions > .settings-save, .settings-actions > .btn-ghost { position: relative; }
  .settings-actions > .settings-save::after, .settings-actions > .btn-ghost::after { content: ""; position: absolute; inset: -2px 0; }
  /* A switch (28 → 44). In a window the row that is one switch grows as a
     whole (Settings' own switch rows are tall already — theirs would reach
     into each other); a switch alone grows by itself (its ::after is the
     knob, so ::before). */
  .overlay label.switch-row { position: relative; }
  .overlay label.switch-row::after { content: ""; position: absolute; inset: -6px 0 -8px; }
  input.switch::before { content: ""; position: absolute; inset: -8px -6px; }
}
