/* =============================================================================
 * operative.css — Ops v4 · A5 · the operative's phone app.
 *
 * A PHONE SURFACE. Big targets, one big button, gloves and daylight. Everything
 * here exists to serve that, and nothing here restyles the shared kit
 * (web/js/ops-v4/kit/lres-ops-v4-kit.js) — the kit's tile, big button, sheet,
 * toast and face are used as they ship. If a variant is ever needed it goes in
 * docs/build/requests/A5.md, not into a second set of yellows here.
 *
 * ── The four colours, and no fifth ──────────────────────────────────────────
 *   --opsv4-green  #009A42  done            "nothing to do"
 *   --opsv4-amber  #F59E0B  needs you       "one tap sorts it"
 *   --opsv4-red    #DC2626  blocked         "can't start until fixed"
 *   --opsv4-grey   #D1D5DB  not yet         "future, nothing expected"
 * The board (Operative.dc.html) draws the leave-site control in a DARKER red than
 * any of the four — a fifth red. CONTRACTS §9 says four colours carry meaning and
 * no more, so this surface uses --opsv4-red for it. Flagged in
 * docs/build/requests/A5.md rather than silently resolved. The darker hex is
 * deliberately not written anywhere in this file: the smoke test greps for it,
 * because "just this once" is how a fifth colour gets in.
 *
 * Everything else is ink, paper and the two date-row washes, which carry no
 * status meaning: they say "day" and "night", exactly as DateTiles option G does.
 * ========================================================================== */

.opsv4-op {
    /* The four. */
    --opsv4-green: #009A42;
    --opsv4-amber: #F59E0B;
    --opsv4-red: #DC2626;
    --opsv4-grey: #D1D5DB;

    /* Ink and paper. No meaning attached to any of these. */
    --opsv4-ink: #0F1419;
    --opsv4-muted: #6B7280;
    --opsv4-line: #E5E7EB;
    --opsv4-paper: #F4F5F7;
    --opsv4-card: #FFFFFF;
    --opsv4-day-row: #FFF7D6;
    --opsv4-night-row: #E8F0FA;
    --opsv4-weekend: #1F4E79;
    --opsv4-green-wash: #E6F4EC;
    --opsv4-green-ink: #064A23;
    --opsv4-red-wash: #FEF2F2;
    --opsv4-red-ink: #991B1B;
    --opsv4-amber-wash: #FEF3C7;
    --opsv4-amber-ink: #92400E;

    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--opsv4-ink);
    background: var(--opsv4-paper);

    /* The phone frame. On a real phone this is the whole viewport; on a desktop
       preview inside the staff SPA it is a 390px column, which is the width the
       board is drawn at, so nothing is ever laid out at a size nobody uses. */
    max-width: 390px;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.opsv4-op * {
    box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.opsv4-op__head {
    padding: 18px 20px 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.opsv4-op__who {
    font-size: 13px;
    color: var(--opsv4-muted);
}

.opsv4-op__title {
    font-size: 22px;
    font-weight: 800;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.opsv4-op__body {
    flex-grow: 1;
    min-height: 0;
    padding: 6px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.opsv4-op__card {
    background: var(--opsv4-card);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opsv4-op__kicker {
    font-size: 12px;
    font-weight: 800;
    color: #007A34;
    letter-spacing: 0.3px;
}

.opsv4-op__lead {
    font-size: 18px;
    font-weight: 800;
}

.opsv4-op__sub {
    font-size: 13px;
    color: var(--opsv4-muted);
}

.opsv4-op__label {
    font-size: 13px;
    font-weight: 800;
    color: var(--opsv4-muted);
    padding: 0 4px;
}

/* ── The shift tick rows — step 9, "tick the shifts you can do" ──────────── */
/* 12px padding on a 28px box gives a 52px row; the whole row is the target, not
   just the box, because a gloved thumb does not aim. */
.opsv4-op__shift {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    background: var(--opsv4-card);
    border: 2px solid var(--opsv4-line);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.opsv4-op__shift[aria-pressed="true"] {
    border-color: var(--opsv4-green);
}

.opsv4-op__shift[disabled] {
    cursor: default;
    opacity: 0.75;
}

.opsv4-op__shift-hours {
    flex-grow: 1;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
}

.opsv4-op__box {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    border: 2px solid var(--opsv4-grey);
    flex-shrink: 0;
}

.opsv4-op__shift[aria-pressed="true"] .opsv4-op__box {
    background: var(--opsv4-green);
    border-color: var(--opsv4-green);
    color: #FFFFFF;
}

/* The day / night wash. These say when, not how it is going. */
.opsv4-op__tag {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 8px;
    color: #374151;
    background: var(--opsv4-day-row);
    flex-shrink: 0;
}

.opsv4-op__tag--night {
    background: var(--opsv4-night-row);
}

.opsv4-op__tag--weekend {
    box-shadow: inset 0 3px 0 var(--opsv4-weekend);
}

/* ── Chips (why not / leaving site) ──────────────────────────────────────── */
.opsv4-op__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.opsv4-op__chip {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid var(--opsv4-line);
    background: var(--opsv4-card);
    cursor: pointer;
}

.opsv4-op__chip[aria-pressed="true"] {
    border-color: var(--opsv4-green);
    background: var(--opsv4-green-wash);
}

.opsv4-op__chip--danger[aria-pressed="true"] {
    border-color: var(--opsv4-red);
    background: var(--opsv4-red-wash);
}

/* ── The bundle card (travel / hotel / kit / before) ─────────────────────── */
.opsv4-op__bundle {
    background: var(--opsv4-card);
    border-radius: 16px;
    padding: 12px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── My shifts ───────────────────────────────────────────────────────────── */
.opsv4-op__row {
    background: var(--opsv4-card);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opsv4-op__row-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opsv4-op__row-job {
    font-size: 15px;
    font-weight: 800;
    flex-grow: 1;
}

.opsv4-op__badge {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    background: #F1F3F5;
    color: var(--opsv4-muted);
    flex-shrink: 0;
}

.opsv4-op__badge--accepted {
    background: var(--opsv4-green-wash);
    color: var(--opsv4-green-ink);
}

.opsv4-op__badge--declined {
    background: var(--opsv4-red-wash);
    color: var(--opsv4-red-ink);
}

.opsv4-op__badge--pencilled {
    background: var(--opsv4-amber-wash);
    color: var(--opsv4-amber-ink);
}

/* ── Clock ───────────────────────────────────────────────────────────────── */
.opsv4-op__nudge {
    background: var(--opsv4-ink);
    color: #FFFFFF;
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.opsv4-op__nudge-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--opsv4-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.opsv4-op__clock {
    background: var(--opsv4-card);
    border-radius: 22px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.opsv4-op__clock-big {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
}

.opsv4-op__clock-where {
    font-size: 13px;
    font-weight: 700;
    color: #007A34;
}

.opsv4-op__clock-where--out {
    color: var(--opsv4-red);
}

.opsv4-op__clock-foot {
    font-size: 12px;
    color: var(--opsv4-muted);
}

/* The one big button on the clock screen is taller than the 56px floor, not
   shorter: it is pressed in gloves, outdoors, sometimes in the dark. */
.opsv4-op__clock-btn {
    width: 100%;
    min-height: 64px;
    border-radius: 18px;
    border: none;
    font: inherit;
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    background: var(--opsv4-green);
    cursor: pointer;
}

.opsv4-op__clock-btn--off {
    background: var(--opsv4-ink);
}

.opsv4-op__clock-btn[disabled] {
    background: var(--opsv4-grey);
    color: #6B7280;
    cursor: not-allowed;
}

.opsv4-op__leave-btn {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    border: 2px solid var(--opsv4-red);
    background: var(--opsv4-card);
    color: var(--opsv4-red);
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.opsv4-op__leave {
    background: var(--opsv4-card);
    border-radius: 22px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 3px solid var(--opsv4-red);
}

.opsv4-op__leave-note {
    font-size: 12px;
    color: var(--opsv4-muted);
}

.opsv4-op__leave-send {
    min-height: 56px;
    border-radius: 14px;
    border: none;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    background: var(--opsv4-red);
    color: #FFFFFF;
    cursor: pointer;
}

.opsv4-op__leave-send[disabled] {
    background: var(--opsv4-grey);
    color: #6B7280;
    cursor: not-allowed;
}

/* ── Hours ───────────────────────────────────────────────────────────────── */
.opsv4-op__hrs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--opsv4-paper);
    font-size: 13px;
    width: 100%;
    border: none;
    font-family: inherit;
    text-align: left;
    min-height: 44px;
    cursor: pointer;
}

.opsv4-op__paid {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 800;
    padding: 4px 2px;
}

/* ── Footer and nav ──────────────────────────────────────────────────────── */
.opsv4-op__foot {
    padding: 8px 16px 6px;
}

.opsv4-op__nav {
    display: flex;
    padding: 6px 10px 20px;
    gap: 4px;
    background: var(--opsv4-card);
    border-top: 1px solid var(--opsv4-line);
}

.opsv4-op__tab {
    flex-grow: 1;
    min-height: 48px;
    border-radius: 12px;
    border: none;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    background: transparent;
    color: var(--opsv4-muted);
    cursor: pointer;
}

.opsv4-op__tab[aria-current="page"] {
    background: var(--opsv4-ink);
    color: #FFFFFF;
}

/* ── Plain states ────────────────────────────────────────────────────────── */
.opsv4-op__empty {
    background: var(--opsv4-card);
    border-radius: 20px;
    padding: 28px 18px;
    text-align: center;
    color: var(--opsv4-muted);
    font-size: 14px;
}

.opsv4-op__error {
    background: var(--opsv4-red-wash);
    border: 2px solid var(--opsv4-red);
    color: var(--opsv4-red-ink);
    border-radius: 16px;
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
}

.opsv4-op button:focus-visible {
    outline: 3px solid var(--opsv4-green);
    outline-offset: 2px;
}
