/* Button: three kinds at one height. Primary is the one main action on a screen, secondary is every
   other action, ghost is a light text action. On a dark fill, inverse is the ghost (Toast, the signed-out
   pages) and light is the main action (the signed-out pages).
   Done and selected are states, not more kinds. An icon-only ghost (close, remove) is quiet ink until hovered. */
.ui-button { display:inline-flex; align-items:center; justify-content:center; gap:var(--space-2); min-height:var(--control-height); min-width:var(--touch-target); padding:0 var(--space-5); border:var(--rule-width) solid transparent; border-radius:var(--radius-pill); background:transparent; color:var(--ink); font:var(--weight-semibold) var(--text-secondary)/1 var(--font-heading); text-decoration:none; text-align:center; cursor:pointer; }
.ui-button svg { flex:none; width:var(--icon-size); height:var(--icon-size); fill:none; stroke:currentColor; stroke-width:var(--icon-stroke); }
.ui-button-icon { width:var(--control-height); height:var(--control-height); padding:0; }
.ui-button-fill { width:100%; }
/* fill-phone: an add action at the foot of a list on the page (Add exercise, New routine): fills on phones, hugs on desktop. */
.ui-button-fill-phone { width:100%; }
@media(min-width:800px) { .ui-button-fill-phone { width:auto; } }
.ui-button-grow { flex:1 1 auto; }
.ui-button-equal { flex:1 1 0; min-width:0; }
.ui-button-primary { border-color:var(--accent); background:var(--accent); color:var(--accent-ink); }
.ui-button-primary:hover:not(:disabled) { border-color:var(--accent-hover); background:var(--accent-hover); }
.ui-button-primary:active:not(:disabled) { border-color:var(--accent-press); background:var(--accent-press); }
.ui-button-secondary { background:var(--fill); color:var(--accent); }
.ui-button-secondary:hover:not(:disabled) { background:var(--fill-strong); }
.ui-button-secondary:active:not(:disabled) { background:var(--state-press); }
.ui-button-ghost { padding-inline:var(--space-3); color:var(--accent); }
.ui-button-ghost:hover:not(:disabled) { background:var(--state-hover); }
.ui-button-ghost:active:not(:disabled) { background:var(--state-press); }
.ui-button-ghost.ui-button-icon { color:var(--ink-subtle); }
.ui-button-ghost.ui-button-icon:hover:not(:disabled) { color:var(--ink); }
.ui-button-inverse { padding-inline:var(--space-2); color:var(--brand-ink); text-decoration:underline; text-underline-offset:var(--underline-offset); }
.ui-button-inverse:hover:not(:disabled) { background:var(--inverse-hover); }
.ui-button-inverse:active:not(:disabled) { background:var(--inverse-press); }
/* Ring: a round action that fills when done (add to today). Draws the round size (the done disc's size) in a 44px target; used by Add and the current set's log button. */
.ui-button-ring { position:relative; border:0; color:var(--accent); }
.ui-button-ring::before { content:''; position:absolute; inset:calc((var(--touch-target) - var(--round-size)) / 2); border:var(--rule-strong) solid var(--accent); border-radius:50%; background:var(--surface-raised); }
.ui-button-ring svg { position:relative; }
.ui-button-ring:hover:not(:disabled)::before { background:var(--accent-tint); }
.ui-button-ring:active:not(:disabled)::before { background:var(--accent); }
.ui-button-ring:active:not(:disabled) { color:var(--accent-ink); }
/* Light: the one main action on the accent ground (the signed-out pages), a white button. */
.ui-button-light { border-color:var(--brand-ink); background:var(--brand-ink); color:var(--accent); }
.ui-button-light:hover:not(:disabled) { border-color:var(--accent-tint); background:var(--accent-tint); }
.ui-button-light:active:not(:disabled) { border-color:var(--accent-tint-hover); background:var(--accent-tint-hover); }
/* Destructive tone: removing or deleting. Red fill only on the final yes; red text on a way in that asks first. */
.ui-button-primary.ui-button-destructive { border-color:var(--danger); background:var(--danger); }
.ui-button-primary.ui-button-destructive:hover:not(:disabled) { border-color:var(--danger-hover); background:var(--danger-hover); }
.ui-button-primary.ui-button-destructive:active:not(:disabled) { border-color:var(--danger-press); background:var(--danger-press); }
.ui-button-secondary.ui-button-destructive,.ui-button-ghost.ui-button-destructive { color:var(--danger); }
/* A destructive icon button (the bin at a row's end) is quiet grey until hovered or focused, then red. */
.ui-button-ghost.ui-button-icon.ui-button-destructive { color:var(--ink-subtle); }
.ui-button-ghost.ui-button-icon.ui-button-destructive:hover:not(:disabled),.ui-button-ghost.ui-button-icon.ui-button-destructive:focus-visible { color:var(--danger); }
/* Done: an action that has happened ("Added", "In today"). Quiet text with a tick, no box. */
.ui-button.is-done,.ui-button.is-done:disabled { padding-inline:var(--space-2); border-color:transparent; background:transparent; color:var(--ink-subtle); font-weight:var(--weight-bold); opacity:1; pointer-events:none; }
/* Selected: the one look for every choose-one or choose-many control. */
.ui-button.is-selected { background:var(--accent-tint); color:var(--accent-press); }
.ui-button:focus-visible { outline:var(--focus-width) solid var(--accent); outline-offset:var(--focus-offset); }
.ui-button-light:focus-visible,.ui-button-inverse:focus-visible { outline-color:var(--brand-ink); }
.ui-button:disabled { cursor:default; opacity:var(--disabled-opacity); }
