/* The look that holds on EVERY screen (Joey's onboarding test, 4 Dec 2026: "'Everywhere' means every screen."). Loaded by
   static/theme.js in every page's <head>, with static/everywhere.js. Colours from tokens.css (a page without them falls back). */

/* ---------- time boxes (#17–#21): a browser time box turned into the app's own (static/everywhere.js) ---------- */
.pb-tbox { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
html .pb-tbox input.pb-tin { width: 72px; min-width: 0; flex: none; min-height: 36px; padding: 6px 8px; border: 1px solid var(--field-edge, var(--separator, #C6C6C8)); border-radius: 8px;
  background: var(--surface, #fff); color: var(--label, #000); font: inherit; text-align: center; font-variant-numeric: tabular-nums; margin: 0; }
html .pb-tbox.bad input.pb-tin { border-color: var(--red-text, #E9152D); }
.pb-tbox .ampm { display: inline-flex; border-radius: 8px; background: var(--track, var(--fill, #E9E9EB)); padding: 2px; }
.pb-tbox .ampm button { min-width: 36px; min-height: 32px; border: 0; border-radius: 6px; background: none; color: var(--label, #000); font: inherit; cursor: pointer; }
.pb-tbox .ampm button[aria-pressed="true"] { background: var(--surface, #fff); box-shadow: var(--shadow-2, 0 1px 3px rgba(0,0,0,.15)); font-weight: var(--semibold, 600); }
@media (max-width: 699px) { html .pb-tbox input.pb-tin { min-height: 44px; } .pb-tbox .ampm button { min-height: 40px; min-width: 44px; } }
/* a box's own words: red when it's wrong (#21), green when a 24-hour time was changed (#20) */
.pb-tsay, .tnote { display: block; margin: 4px 0 0; font-size: 13px; line-height: 18px; font-weight: normal; }
.pb-terr { color: var(--red-text, #E9152D); }
.pb-tnote, .tnote { color: var(--green-text, #008932); }

/* ---------- two-button pop-ups (#10): Cancel left, the main action right, the same size, side by side, lined up ---------- */
html .pb-pair { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 12px !important; align-items: stretch !important; justify-content: stretch !important; }
html .pb-pair > .pb-cancel, html .pb-pair > .pb-main { width: 100% !important; min-width: 0 !important; max-width: none !important; margin: 0 !important; flex: none !important; order: 0 !important;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: normal; box-sizing: border-box; }
html .pb-pair > .pb-cancel-plain { background: var(--btn-2, #F0F0F0) !important; color: var(--on-btn-2, #1F1F1F) !important; border: 0 !important; text-decoration: none !important;
  border-radius: var(--pb-pair-r, var(--r-btn, 10px)) !important; padding: 0 16px; min-height: 44px; font-weight: var(--semibold, 600); cursor: pointer; }
html .pb-pair > .pb-cancel-plain:hover { background: var(--fill-hover, #E4E4E4) !important; }

/* ---------- dropdown keys (#11): the choice ↑ ↓ moved to, in any list ---------- */
html .pb-hi { background: var(--fill-hover, #E4E4E4) !important; outline: none; }

/* ---------- switches (#14): a switch that is on is the app's green, on every screen ---------- */
html input.switch:checked, html input[type="checkbox"][role="switch"]:checked { background-color: var(--green, #34C759) !important; }
html [role="switch"][aria-checked="true"] > .tr { background: var(--green, #34C759) !important; }

/* ---------- tick boxes (#15): purple (the accent) on every screen; a switch is not a tick box (#14) ---------- */
html input[type="checkbox"]:not(.switch):not([role="switch"]) { accent-color: var(--accent-fill, #723CD6); }

/* ---------- toasts (#13): fade out after about 3 s (static/everywhere.js PBFade); with Reduce motion they just go ---------- */
html .pb-fading { opacity: 0 !important; transition: opacity 400ms ease-out !important; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html .pb-fading { transition: none !important; } }
