/* ----------------------------------------------------------------------------
   controls.css — Form controls — buttons (incl. .primary / .ghost / .icon-btn), inputs,
   selects and textareas.
   Slice 4 of 16 (see css/tokens.css for the full load order).
   ------------------------------------------------------------------------- */
/* ------------------------------------------------------------ controls */
input,
select {
  height: var(--control-h);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

input::placeholder {
  color: var(--muted);
}

input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

button,
.btn {
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, filter 0.15s ease;
}

button:hover:not(:disabled),
.btn:hover {
  border-color: var(--border-strong);
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

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

button.small {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.primary {
  background: var(--primary-bg);
  border-color: transparent;
  color: var(--primary-text);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.primary:hover:not(:disabled) {
  filter: brightness(1.1);
  border-color: transparent;
}

.ghost {
  background: transparent;
  border-color: transparent;
}

.ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: transparent;
}

.ghost.danger {
  color: var(--danger-text);
}

.icon-btn {
  height: 30px;
  width: 30px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 15px;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border: none;
}

.icon-btn.danger:hover {
  color: var(--danger-text);
}

