/* Critique fixes 2026-11-28 (layout, sizes, focus): points 13, 14, 24, 54, 55, 56, 59, 60, 62.
 * FOX MODE ONLY: every rule starts with html[data-contact-mode="fox"], so the offline preview looks exactly as before.
 * This file is the LAST stylesheet on the landing page, the account page and the team admin page.
 * No new colours, fonts or components: only sizes, overflow, focus and order. */

/* ---- 14: inputs are at least 16 px on touch screens and narrow screens (iOS does not zoom the page on focus) ---- */
@media (pointer:coarse), (max-width:640px) {
  html[data-contact-mode="fox"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]) { font-size: 16px; }
}

/* ---- 56: the one-time key is shown whole: monospace, 16 px, wraps instead of being cut (the field is a read-only textarea, see contact-fox-billing.js) ---- */
html[data-contact-mode="fox"] .key-dialog #new-key-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; line-height: 1.45;
  text-overflow: clip; overflow-wrap: anywhere; word-break: break-all; white-space: pre-wrap;
  resize: none; overflow: hidden; display: block; min-height: 0; height: calc(3 * 1.45em + 28px);
}
html[data-contact-mode="fox"] .key-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; box-sizing: border-box; }

/* ---- 13 / 54, changed by Mikko's site notes 2026-11-30: the review dialogs scroll as a whole; the action row (made by contact-fox-billing.js)
   sits right under the summary list, so the buy button is seen without scrolling and the details follow below it ---- */
html[data-contact-mode="fox"] dialog.fox-framed[open] { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
/* On a short screen the summary can be taller than the window: the row then sticks to the bottom edge until it scrolls into its place
   (critique-style d600 / phoneShort, 1.12), so the buy button is always seen without scrolling. */
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot { margin: 18px 0 4px; position: sticky; bottom: -1px; z-index: 1; padding: 10px 0; background: var(--surface, #191918); box-shadow: 0 -10px 12px -8px rgba(0,0,0,.45); }
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot .button { width: 100%; justify-content: center; }
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot #billing-pack-status,
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot #custom-credits-status { margin: 8px 0 0; min-height: 0; }
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot #billing-pack-status:empty,
html[data-contact-mode="fox"] dialog.fox-framed .fox-dialog-foot #custom-credits-status:empty { display: none; }

/* ---- 59: pack buttons: the 12 px radius wins over the pill, text is not cut ---- */
html[data-contact-mode="fox"] .ember-account.ember-design .billing-pack-options .button { border-radius: 14px; }

/* ---- 60 / 24: the heading that the script focuses shows no ring; the return card takes the focus quietly ---- */
html[data-contact-mode="fox"] .ember-account #workspace-title:focus { outline: none; }
html[data-contact-mode="fox"] #fox-checkout-card:focus { outline: none; }
html[data-contact-mode="fox"] #fox-expiry-free { margin-top: 6px; }

/* ---- 55 / 62: touch targets at least 40 px high, at least 8 px apart (phone) ---- */
@media (max-width: 640px) {
  html[data-contact-mode="fox"] .terms-check { font-size: 14px; min-height: 44px; align-items: center; margin-top: 12px !important; }
  html[data-contact-mode="fox"] .terms-check input { width: 22px; height: 22px; flex: none; margin: 0; }
  html[data-contact-mode="fox"] .terms-check a { padding-block: 14px; } /* inline: grows the tap area, not the line */
  html[data-contact-mode="fox"] .admin-main .terms-check,
  html[data-contact-mode="fox"] .admin-radio { min-height: 44px; align-items: center; }
  html[data-contact-mode="fox"] .admin-main input[type="radio"],
  html[data-contact-mode="fox"] .admin-main input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: none; }
  html[data-contact-mode="fox"] .admin-radio { margin: 8px 0; }
  html[data-contact-mode="fox"] .admin-main .workspace-tabs { gap: 8px; }
  html[data-contact-mode="fox"] .admin-main .workspace-tabs button { min-height: 44px; }
  html[data-contact-mode="fox"] .admin-main .admin-actions { gap: 10px; }
  html[data-contact-mode="fox"] summary { padding-block: 10px; min-height: 40px; box-sizing: border-box; }
  html[data-contact-mode="fox"] .account-exit,
  html[data-contact-mode="fox"] .text-link,
  html[data-contact-mode="fox"] .auth-back,
  html[data-contact-mode="fox"] .csv-help a,
  html[data-contact-mode="fox"] .key-guide a,
  html[data-contact-mode="fox"] .quickstart-links a,
  html[data-contact-mode="fox"] .auth-intro > a,
  html[data-contact-mode="fox"] .ember-footer a {
    display: inline-flex; align-items: center; min-height: 40px; box-sizing: border-box;
  }
  html[data-contact-mode="fox"] .auth-back { display: flex; width: fit-content; margin-inline: auto; padding-inline: 10px; }
  html[data-contact-mode="fox"] .account-exit { padding-inline: 8px; }
  html[data-contact-mode="fox"] #use-sample,
  html[data-contact-mode="fox"] #fox-payments-more,
  html[data-contact-mode="fox"] .button.small { min-height: 40px; }
  html[data-contact-mode="fox"] .quickstart-links { gap: 8px 22px; flex-wrap: wrap; }
  html[data-contact-mode="fox"] .ember-footer { gap: 8px 18px; flex-wrap: wrap; }
  html[data-contact-mode="fox"] .ember-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
  html[data-contact-mode="fox"] dialog .close { width: 40px; height: 40px; }
  html[data-contact-mode="fox"] .ember-account .workspace-tabs { gap: 8px; }
}

/* ---- round 5, S1: the fixed example balance (20 / 50, 30 left) is not the person's account: never shown in fox mode (the script also sets hidden) ---- */
html[data-contact-mode="fox"] .quota-preview,
html[data-contact-mode="fox"] .workspace-credit { display: none !important; }

/* ---- a job the adapter stopped because no machine became free (state "stopped"): the badge keeps the default look, the note uses the existing warning tone (#e8c5a5 of job-row-issues) ---- */
html[data-contact-mode="fox"] .job-stopped { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: #e8c5a5; }
html[data-contact-mode="fox"] p.job-stopped { font-size: 14px; margin: 14px 0 0; }
