/* hire.css — the Hire page (js/pages/hire.js). Phone first. */
.hire-wrap { max-width: 1100px; margin: 0 auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.hire-note { color: var(--text-muted); }
.hire-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; }
.hire-bar .btn { min-height: 44px; }
.hire-toggle { display: flex; align-items: center; gap: 0.4rem; min-height: 44px; color: var(--text); }
.hire-synced { font-size: 0.85rem; margin-left: auto; }

.hire-card {
    padding: 0.75rem 1rem; background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.hire-form-head { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--text-strong); }
/* Twelve tracks: two boxes a row on a phone, and on a desktop the widths set
   below, so the whole form is four rows and Save is on screen (#4246). */
.hire-fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.6rem; }
.hire-fields > * { grid-column: span 6; min-width: 0; }
.hire-fields label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--text-muted); min-width: 0; }
.hire-fields input, .hire-fields textarea { min-height: 44px; font-size: 1rem; width: 100%; box-sizing: border-box; }
.hire-fields > .hire-wide { grid-column: 1 / -1; }
/* One-tap picks under a box: what is hired most, and days by button. */
.hire-picks { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.hire-pick {
    min-height: 44px; max-width: 100%; padding: 0 0.8rem; font: inherit; font-size: 0.9rem; cursor: pointer;
    border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hire-pick:hover, .hire-pick:focus-visible { background: var(--accent-soft); }
/* A phone shows the four most hired; the rest are still offered as you type. */
.hire-pick:nth-child(n+5) { display: none; }
/* What the shop hires out is short and all of it shows: the boots and the bag come after the bikes. */
.hire-picks--all .hire-pick:nth-child(n+5) { display: inline-block; }
/* A day and its time side by side, with the day's buttons under both. */
.hire-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.hire-form-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.hire-form-btns .btn { min-height: 44px; flex: 1 1 auto; }

.hire-day { display: flex; flex-direction: column; gap: 0.4rem; }
.hire-day-head { margin: 0.25rem 0 0; font-size: 1rem; color: var(--text-strong); display: flex; align-items: center; gap: 0.5rem; }
.hire-day--side .hire-day-head { color: var(--text-muted); }
.hire-count {
    min-width: 1.5rem; padding: 0 0.4rem; text-align: center; font-size: 0.8rem; font-weight: 600;
    border-radius: 999px; background: var(--accent-soft); color: var(--text);
}
.hire-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.hire-row {
    display: grid; grid-template-columns: 1fr; gap: 0.35rem; padding: 0.6rem 0.75rem;
    background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius);
}
.hire-row--gone { border-left-color: var(--border); opacity: 0.7; }
.hire-row--gone .hire-item { text-decoration: line-through; }
.hire-when { font-weight: 600; color: var(--text-strong); }
.hire-what, .hire-who { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; overflow-wrap: anywhere; }
.hire-item { font-weight: 600; }
.hire-sub { color: var(--text-muted); font-size: 0.85rem; }
.hire-phone { color: var(--accent); min-height: 24px; }
.hire-badge {
    align-self: flex-start; padding: 0.1rem 0.5rem; font-size: 0.75rem; border-radius: 999px;
    background: var(--bg-hover); color: var(--text); border: 1px solid var(--border);
}
.hire-badge--web { background: var(--accent-soft); }
.hire-badge--gone { background: var(--warning-soft); }
.hire-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hire-actions .btn { min-height: 44px; flex: 1 1 auto; }

@media (min-width: 769px) {
    .hire-fields > *, .hire-fields > .hire-wide { grid-column: span 3; }
    .hire-fields > .hire-d2 { grid-column: span 2; }
    .hire-fields > .hire-d5 { grid-column: span 5; }
    .hire-fields > .hire-d6 { grid-column: span 6; }
    .hire-pick { min-height: 34px; padding: 0 0.65rem; font-size: 0.85rem; }
    .hire-pick:nth-child(n+5) { display: inline-block; }
    .hire-form-btns .btn, .hire-actions .btn { flex: 0 0 auto; }
    /* Four fixed tracks, so a row with no buttons lines up with one that has them. */
    .hire-row { grid-template-columns: 11rem minmax(0, 1fr) 14rem 11rem; align-items: start; gap: 0.75rem; }
    .hire-actions { justify-content: flex-end; }
}

/* ── List / Week / Month (#4301) ─────────────────────────────────────────── */
.hire-views { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }
.hire-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hire-tab {
    min-height: 44px; padding: 0 1rem; font: inherit; cursor: pointer;
    background: transparent; color: var(--text); border: 0; border-left: 1px solid var(--border);
}
.hire-tab:first-child { border-left: 0; }
.hire-tab.is-on { background: var(--accent); color: #fff; font-weight: 600; }
.hire-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.hire-nav .btn { min-height: 44px; min-width: 44px; }
.hire-range { margin: 0 0 0 0.25rem; font-size: 1.05rem; color: var(--text-strong); }
.hire-tip { font-size: 0.85rem; margin: 0; }

/* A bike type's colour: a soft fill and a strong edge, from the theme's own tokens. */
.hire-k--road   { --k-fill: var(--info-soft);    --k-ink: var(--ink-blue); }
.hire-k--mtb    { --k-fill: var(--success-soft); --k-ink: var(--ink-green); }
.hire-k--ebike  { --k-fill: var(--purple-soft);  --k-ink: var(--ink-violet); }
.hire-k--hybrid { --k-fill: var(--orange-soft);  --k-ink: var(--ink-orange); }
.hire-k--other  { --k-fill: var(--teal-soft);    --k-ink: var(--ink-teal); }
.hire-k {
    display: inline-block; padding: 0 0.4rem; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
    border-radius: 999px; background: var(--k-fill); color: var(--k-ink);
}
.hire-free { font-size: 0.75rem; color: var(--text-muted); }
/* A size with no bike left (#4301): the shop's fleet against what is booked. */
.hire-short {
    display: inline-block; padding: 0 0.4rem; font-size: 0.72rem; font-weight: 600; white-space: nowrap;
    border-radius: 999px; background: var(--danger-soft); color: var(--ink-red);
}
.hire-wk-count-in { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.2rem; }

/* The week: seven columns, scrolled sideways inside its own box on a phone. */
.hire-cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hire-week {
    display: grid; grid-template-columns: repeat(7, minmax(6.5rem, 1fr)); column-gap: 0; row-gap: 0.3rem;
    min-width: 46rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card);
}
.hire-wk-head {
    display: flex; flex-direction: column; padding: 0.45rem 0.5rem 0; border-left: 1px solid var(--border);
    color: var(--text-strong); z-index: 1;
}
.hire-wk-head:first-child { border-left: 0; }
.hire-wk-day { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.hire-wk-date { font-weight: 600; }
.hire-wk-head.is-today .hire-wk-date { color: var(--accent); }
.hire-wk-count { padding: 0 0.5rem 0.3rem; z-index: 1; }
.hire-wk-cell {
    margin: 0; padding: 0; border: 0; border-left: 1px solid var(--border);
    background: transparent; cursor: copy; min-height: 3rem;
}
.hire-wk-cell:nth-of-type(1) { border-left: 0; }
.hire-wk-cell:hover, .hire-wk-cell:focus-visible { background: var(--bg-hover); }
.hire-wk-cell.is-today { background: var(--accent-soft); }
.hire-wk-cell.is-sunday, .hire-wk-head.is-sunday { background: var(--bg-hover); }
.hire-bar-item {
    position: relative; z-index: 2; margin: 0 0.3rem; padding: 0.25rem 0.45rem; min-height: 44px; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left;
    font: inherit; font-size: 0.8rem; cursor: pointer; color: var(--text);
    background: var(--k-fill); border: 1px solid var(--k-ink); border-left-width: 4px; border-radius: var(--radius);
}
.hire-bar-item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hire-bar-what { font-weight: 600; color: var(--k-ink); }
.hire-bar-mark { font-size: 0.7rem; color: var(--text-muted); }
/* Runs on past the week: the cut side goes square and its edge thins. */
.hire-bar--before { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 1px; border-left-style: dashed; }
.hire-bar--after  { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right-style: dashed; }
.hire-bar--gone { opacity: 0.6; }
.hire-bar--gone .hire-bar-what { text-decoration: line-through; }
.hire-bar--due { box-shadow: inset 0 0 0 2px var(--k-ink); }
.hire-bar-item.is-picked { outline: 3px solid var(--accent); outline-offset: 1px; }
.hire-picked { margin-top: 0.25rem; }

/* The month: a day is a button with how many are out and of what. */
.hire-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
.hire-mo-head { text-align: center; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.hire-mo-day {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; min-height: 4.5rem; min-width: 0;
    padding: 0.3rem 0.35rem; font: inherit; text-align: left; cursor: pointer; color: var(--text);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.hire-mo-day:hover, .hire-mo-day:focus-visible { border-color: var(--accent); }
.hire-mo-day.is-other { opacity: 0.5; }
.hire-mo-day.is-sunday { background: var(--bg-hover); }
.hire-mo-day.is-today { border: 2px solid var(--accent); }
.hire-mo-num { font-weight: 600; color: var(--text-strong); }
.hire-mo-total { font-size: 0.8rem; font-weight: 600; }
.hire-mo-going { font-size: 0.7rem; color: var(--text-muted); }
.hire-mo-kinds { display: flex; flex-wrap: wrap; gap: 0.15rem; }
@media (max-width: 480px) {
    .hire-mo-day { min-height: 3.5rem; padding: 0.2rem; }
    .hire-mo-going { display: none; }
}

/* A hire's dates in the POS basket (js/pages/till-order.js, #3648): two boxes a row,
   so a date is never cut short beside the others. */
#page-till-order .line-edit label.hire-f { flex: 1 1 45%; min-width: 130px; }
#page-till-order .line-edit label.hire-f input { width: 100%; box-sizing: border-box; min-height: 44px; }
