/*
 * Buttons, text boxes, selects and the pill group for switching views. Used by the home page's
 * button and by every control inside the dialog.
 * Colours, fonts and spacing come from the custom properties in tokens.css; this file
 * never writes a colour value (StyleRulesTests). More in
 * docs/ADR-010-the-palette-borrowed-from-theyard.md.
 */

/* #region controls */
.button,
button {
  font: inherit;
  font-weight: var(--weight-semibold);
  height: var(--control-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-accent);
  background: var(--color-surface);
  color: var(--color-accent);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

button:hover {
  background: var(--color-accent-soft);
}

button.primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

button.primary:hover {
  background: var(--color-accent-hover);
}

button.small {
  height: var(--pill-height);
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

button.danger {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

button.danger:hover {
  background: var(--color-danger-soft);
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

input[type='search'],
input[type='text'],
select {
  font: inherit;
  height: var(--control-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  min-width: 0;
}

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-surface);
}

.seg button {
  height: var(--pill-height);
  border: 0;
  padding: 0 var(--space-4);
  font-weight: var(--weight-medium);
}

.seg button[aria-pressed='true'] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
/* #endregion controls */
