/* My Wage — styles added in v1.4.6, loaded after app.css (kept in their own small file; app.css is unchanged). */

/* Location field (shift sheet and rota review cards): one line of text that wraps, so a long location shows in
   full instead of scrolling sideways. It grows to fit (see js/views/locationField.js). */
textarea.loc-input {
  display: block; resize: none; overflow: hidden;
  min-height: 52px; padding: 14px 20px; line-height: 24px; border-radius: 26px;
  font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.loc-hint { margin: 8px 0 0; padding: 0 6px; }
.loc-hint[hidden] { display: none; }
.loc-field .loc-picks { margin-top: 12px; }

/* Previous locations: each shows its full name, wrapping onto more lines if it has to (never cut off) */
.loc-chip { align-items: stretch; border-radius: 20px; }
.loc-use {
  white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
  overflow-wrap: anywhere; text-align: left; line-height: 1.3; padding-top: 10px; padding-bottom: 10px;
}
.loc-x { height: auto; min-height: 40px; }

/* Annual Leave: "Edit dates" under an open request, and the day sheet's "Add or remove days" */
.lv-req-edit-btn { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px auto; }
.lv-req-edit-btn svg, .lv-req-edit svg { width: 18px; height: 18px; flex: none; }
.lv-req-edit { display: flex; align-items: center; justify-content: center; gap: 8px; }
.lv-day .rp-sub[hidden] { display: none; }

/* v1.4.8 — typing and selecting text, everywhere in the app.
   Every text field: selectable, with the iPhone long-press menu (Select, Copy, Cut, Paste), whatever list or row
   it sits in. Lists that use press-and-hold to select rows switch text selection off for themselves; that must
   never reach a field inside them (before v1.4.8, the hours on each date in Add Annual Leave / Edit dates
   inherited -webkit-touch-callout: none, so long-pressing them showed no Copy / Paste menu).
   Date and time fields are left alone: they open the system picker. Buttons stay unselectable (see .btn). */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="date"]):not([type="time"]),
textarea, [contenteditable="true"], [contenteditable=""] {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
/* The cursor and the selection: the standard iOS blue. On iPhone, Safari colours the selection highlight and its
   drag handles from caret-color, so the dark navy used before (#24589B) gave a dim, greyish highlight. This blue is
   about 4:1 on the white of a focused field (the cursor is clear), and the highlight is the usual light blue with
   the text staying dark (about 8:1). Desktop browsers use the ::selection colours. */
.input, textarea, input { caret-color: #007AFF; }
.input::selection, textarea::selection, input::selection { background: rgba(0, 122, 255, .36); color: var(--ink-strong); }
::selection { background: rgba(0, 122, 255, .3); color: var(--ink-strong); }

/* v1.4.9 — Annual Leave: your leave year, Settings → Leave entitlement & policy, and the unused-leave reminder */
.lp-h { margin: 22px 0 12px; padding-left: 6px; font-size: 14px; font-weight: 800; letter-spacing: .02em; color: var(--ink-strong); }
.lp-est { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; vertical-align: 2px; color: #7A5A12; background: #FFF4D6; }
.lp-preview, .lp-full { margin: 4px 0 6px; }
.lp-facts { margin: 12px 0 0; padding: 0 6px; overflow-wrap: anywhere; }
.lp-edit { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 auto; }
.lp-edit svg { width: 18px; height: 18px; flex: none; }
#lv-year-card .row-label small, #leave-policy .hint { overflow-wrap: anywhere; }
.rem-lead { margin: -4px 0 14px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.rem-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rem-sheet .btn-pink svg { width: 20px; height: 20px; }

/* Add / Edit shift (v1.4.11): the day picker's heading, with arrows to move a week back or forward */
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.dp-head .label { margin: 0; }
.dp-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dp-range { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.dp-arrow { width: 38px; height: 38px; }
.dp-arrow svg { width: 18px; height: 18px; }

/* Payday check (v1.4.11): a recorded check is marked as done */
.pc-done { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #3F7FB8; }
.pc-done svg { width: 16px; height: 16px; }
.pc-done svg { fill: none; stroke: currentColor; stroke-width: 2.6; }

/* v1.5.0 — History: estimate (dashed, a prediction) and actual pay (solid, recorded) side by side, then the difference */
.week-card .wk-pay { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.week-card .wk-pay.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wk-pay > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 14px; }
.wk-pay small { font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
.wk-pay b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wk-pay-est { border: 1.5px dashed #C3CDE0; color: var(--muted); }
.wk-pay-est b { color: var(--ink); font-weight: 700; }
.wk-pay-act { color: #2D5F92; background: linear-gradient(145deg, #EEF4FE, #DDE9FA); box-shadow: var(--raise-xs); }
.wk-pay-diff { color: var(--muted); background: var(--surface); box-shadow: var(--inset-sm); }
.wk-pay-diff b { color: var(--ink-strong); }
.wk-pay-diff.match b { color: #2F6A55; }
.wk-pay-diff.less b { color: #A2405F; }
.wk-pay-diff.more b { color: #2F6A55; }
.week-card .wk-types { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wk-type { padding: 4px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 800; color: var(--ink); background: linear-gradient(145deg, #FAFBFE, #EEF1F8); box-shadow: var(--raise-xs); }
.pc-row-leave { display: inline-flex; }
.pc-type-seg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5em), 1fr)); }
.pc-other-field { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pc-other-field > label { font-size: 13.5px; font-weight: 800; color: var(--ink); padding-left: 6px; }
.pc-other-field[hidden] { display: none; }
.pc-leave svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
