/* Phone mode (data-phone="on"): consult. Every rule here is prefixed :root[data-phone="on"] so nothing leaks to desktop. */

/* ── Consent gate: Start fixed above the bar ─────────────────────────────────
   The read-aloud script plus the legal footnote put "start recording" below the
   fold on a phone, so the vet finished reading to the owner and then had to
   scroll to find the button. Same placement contract as the Review action row
   in app.css: z 60 (over content, under the bar at 100 and overlays at 1000+),
   4.9rem clears the bar's raised Record slot. */
:root[data-phone="on"] .live-consult-consent-actions {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: calc(4.9rem + var(--phone-bar-float) + env(safe-area-inset-bottom));
    z-index: 60;
    flex-wrap: nowrap;
    align-items: center;
    padding: 0.5rem;
    background: var(--ed-paper);
    border: 1px solid var(--ed-hairline-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

/* The last in-flow content (the alt-intake buttons) must scroll clear of the
   fixed row: row height (~4.5rem with a wrapped label) + its offset. */
:root[data-phone="on"] .live-consult-consent {
    padding-bottom: 6.5rem;
}

:root[data-phone="on"] .live-consult-consent-start {
    /* min-width: 0 + a zero basis: a flex child refuses to shrink below its text,
       so the long label pushed the button out of the fixed row (seen 2026-09-19). */
    flex: 1 1 0;
    min-width: 0;
    min-height: 3rem;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: normal;
}

/* Cancel demoted to a text "Not now": beside a same-size primary it was an
   equal-weight target under the thumb. Still a 44px hit area. */
:root[data-phone="on"] .live-consult-consent-cancel {
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding: 0.4rem 0.7rem;
    border-color: transparent;
    background: transparent;
    color: var(--ed-mute);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

:root[data-phone="on"] .live-consult-consent-alt-buttons .btn {
    min-height: 2.75rem;
}

/* ── Recording / Paused ───────────────────────────────────────────────────── */
:root[data-phone="on"] .live-consult-timer {
    font-size: 4rem;
    margin: 1rem 0 0.75rem;
}

:root[data-phone="on"] .live-consult-bigbutton {
    min-height: 4rem;
    font-size: 1.2rem;
}

:root[data-phone="on"] .live-consult-stop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
}

/* Batch state in words. .phone-mode-only turns inline in the mode; this is a
   line of its own. */
:root[data-phone="on"] .live-consult-batch-state {
    display: block;
    margin-top: 0.85rem;
    font-size: 0.9rem;
    text-align: center;
    color: var(--ed-mute);
}

:root[data-phone="on"] .live-consult-awake {
    display: block;
    margin-top: 0.35rem;
    text-align: center;
}

/* The wrong-patient notice while recording (QoL 2026-10-04, phone#11). With its
   four-line hint it was 240px tall and pushed Stop & review to y 730-785, under
   the bar (top 747) — mid-consult, the hint telling the vet to stop. The hint
   restates what Review offers ("Save to another patient…"), so it goes: 152px,
   and Stop at 642-697 (measured at 375x812 with these sheets). The line and Keep
   recording stay stacked: side by side, the button left the line a 105px column
   eight lines tall, and flowed inline it never fits the last line. Review's
   notice, with its two buttons, is left as it is. */
:root[data-phone="on"] .pm-notice--recording .pm-hint {
    display: none;
}

/* The meter is confirmation, not content: shorter, so Pause and Stop share the
   first screen with it. */
:root[data-phone="on"] .live-consult-amplitude-wrapper {
    padding: 0.6rem 0.7rem 0.5rem;
}

/* ── Saved screen ─────────────────────────────────────────────────────────────
   The summary just saved is one line until opened (taps#2, QoL 2026-10-04). It is
   the note the vet read on Review a moment ago, and Next up and the tools used to
   sit a screen or two below it. app.css keeps this copy hidden outside the mode,
   where the open panel shows instead. */
:root[data-phone="on"] .live-consult-saved-fold {
    display: block;
    padding-block: 0;
}

:root[data-phone="on"] .live-consult-saved-full {
    display: none;
}

/* The whole line is the target: 44 px with its padding, the native marker kept. */
:root[data-phone="on"] .live-consult-saved-fold > summary {
    padding-block: 0.7rem;
}

:root[data-phone="on"] .live-consult-saved-fold[open] {
    padding-bottom: 0.85rem;
}

/* The Next up card (text#3 / W5, QoL 2026-10-04). Measured at 375x812 with "09:30
   Princess Fifi — Lame right hind, recheck radiographs": the button came to 352 px in
   a 253 px card and widened the page to 415 px, "NEXT UP" split over two lines and the
   patient was a 128 px column 134 px tall. It is a three-column grid (auto 1fr auto)
   and every .btn takes min-width: fit-content, so the columns' narrowest contents —
   "NEXT", the reason's longest word, "Start consult →" unbroken — added up past the
   card. Two columns, the label on a row of its own, and nothing that insists on its
   own width: a word longer than its column breaks inside it. With the page's "Start →"
   and the tighter padding, gap and type below, "09:30 Max — Vomiting recheck" is two
   lines in a 102 px button and the long reason four, with no sideways scroll at 320. */
:root[data-phone="on"] .live-consult-next-cta {
    grid-template-columns: 1fr auto;
    row-gap: 0.2rem;
    column-gap: 0.6rem;
    padding-inline: 0.85rem;
    min-width: 0;
}

:root[data-phone="on"] .live-consult-next-label {
    grid-column: 1 / -1;
}

:root[data-phone="on"] .live-consult-next-patient {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
}
