/* Driver Portal (public/driver-portal.html) — page-local cloud-light reading
   profile. Scope: only <body class="gr-theme" data-gr-profile="cloud-light"> on
   that page (both public trees serve identical bytes). The page hard-codes its
   dark-theme colours in :root: each alias is rebound to the canonical cloud
   tokens here (the page's own values stay as inherited history only), and every
   class rule that set a colour or a size under 16px is restated with them.
   Status colours keep their meaning (msg error / decline = critical,
   offer banner = info, primary action = brand primary, neutral = muted).
   16px reading floor, 44px controls, visible focus ring from le-foundation.
   No new palette. */

body.gr-theme[data-gr-profile="cloud-light"] {
  --green: var(--gr-cloud-primary);
  --green2: var(--gr-cloud-success);
  --ink: var(--gr-cloud-text);
  --muted: var(--gr-cloud-muted);
  --line: var(--gr-cloud-border);
  --bg: var(--gr-cloud-bg);
  --card: var(--gr-cloud-surface);
  --accent: var(--gr-cloud-info);
  --warn: var(--gr-cloud-critical);
  --warnbg: var(--gr-cloud-critical-soft);
  background: var(--gr-cloud-bg);
  color: var(--gr-cloud-text);
  font-family: var(--gr-operator-font-stack);
  font-size: 16px;
}

/* Header and cards. */
body.gr-theme[data-gr-profile="cloud-light"] header { background: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }
body.gr-theme[data-gr-profile="cloud-light"] .card { background: var(--gr-cloud-surface); border-color: var(--gr-cloud-border); }
body.gr-theme[data-gr-profile="cloud-light"] .card h2 { color: var(--gr-cloud-text); font-size: 16px; }

/* Labels and helper text. */
body.gr-theme[data-gr-profile="cloud-light"] label { color: var(--gr-cloud-muted); font-size: 16px; }
body.gr-theme[data-gr-profile="cloud-light"] .msg { font-size: 16px; }
body.gr-theme[data-gr-profile="cloud-light"] .msg.err { color: var(--gr-cloud-critical); }
body.gr-theme[data-gr-profile="cloud-light"] .item .sub { color: var(--gr-cloud-muted); font-size: 16px; }
/* VF-743: a pickup the farm's order record did not follow reads as a problem, not as muted helper text. */
body.gr-theme[data-gr-profile="cloud-light"] .item .sub.warn-text { color: var(--gr-cloud-critical); font-size: 16px; overflow-wrap: anywhere; }
body.gr-theme[data-gr-profile="cloud-light"] .empty { color: var(--gr-cloud-muted); font-size: 16px; }

/* Controls: 16px text, 44px touch target. Restated hover fills so the shared
   foundation :hover rule cannot put a light fill under light text. */
body.gr-theme[data-gr-profile="cloud-light"] input,
body.gr-theme[data-gr-profile="cloud-light"] button {
  min-height: 44px;
  font-size: 16px;
}
body.gr-theme[data-gr-profile="cloud-light"] input { color: var(--gr-cloud-text); border-color: var(--gr-cloud-control-border); }
body.gr-theme[data-gr-profile="cloud-light"] button {
  background: var(--gr-cloud-primary);
  color: var(--gr-cloud-on-primary);
}
body.gr-theme[data-gr-profile="cloud-light"] button:hover { background: var(--gr-cloud-primary-hover); }
body.gr-theme[data-gr-profile="cloud-light"] button.ghost {
  background: var(--gr-cloud-surface-alt);
  color: var(--gr-cloud-primary);
}
body.gr-theme[data-gr-profile="cloud-light"] button.ghost:hover { background: var(--gr-cloud-surface-alt); color: var(--gr-cloud-primary); }
body.gr-theme[data-gr-profile="cloud-light"] button.warn {
  background: var(--gr-cloud-critical-soft);
  color: var(--gr-cloud-critical);
}
body.gr-theme[data-gr-profile="cloud-light"] button.warn:hover { background: var(--gr-cloud-critical-soft); color: var(--gr-cloud-critical); }

/* Offer banner: information, white text on the info fill (8.7:1). */
body.gr-theme[data-gr-profile="cloud-light"] .banner {
  background: var(--gr-cloud-info);
  color: var(--gr-cloud-on-primary);
  font-size: 16px;
}

/* Tabs: neutral until active; active = brand primary with on-primary text. */
body.gr-theme[data-gr-profile="cloud-light"] .tabs button {
  background: var(--gr-cloud-surface-alt);
  color: var(--gr-cloud-primary);
  font-size: 16px;
}
body.gr-theme[data-gr-profile="cloud-light"] .tabs button:hover { background: var(--gr-cloud-surface-alt); color: var(--gr-cloud-primary); }
body.gr-theme[data-gr-profile="cloud-light"] .tabs button.active {
  background: var(--gr-cloud-primary);
  color: var(--gr-cloud-on-primary);
}
body.gr-theme[data-gr-profile="cloud-light"] .tabs button.active:hover { background: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }

@media (prefers-reduced-motion: reduce) {
  body.gr-theme[data-gr-profile="cloud-light"] button,
  body.gr-theme[data-gr-profile="cloud-light"] input { transition: none; }
}

/* Payout card actions. The shared foundation button rule left these white on white, so the
   main action and the secondary one are restated with the same tokens as every other control. */
body.gr-theme[data-gr-profile="cloud-light"] #payout button.payout-go {
  background: var(--gr-cloud-primary);
  color: var(--gr-cloud-on-primary);
  border: 1px solid var(--gr-cloud-primary);
  width: 100%;
}
body.gr-theme[data-gr-profile="cloud-light"] #payout button.payout-go:hover { background: var(--gr-cloud-primary-hover); }
body.gr-theme[data-gr-profile="cloud-light"] #payout button.payout-check {
  background: var(--gr-cloud-surface);
  color: var(--gr-cloud-primary);
  border: 1px solid var(--gr-cloud-primary);
  width: 100%;
}
