input[type="submit"],
button[type="submit"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border: none;
  border-radius: var(--radius);
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: var(--btn-primary-shadow);
  transition: background 160ms var(--ease), box-shadow 160ms var(--ease), transform 100ms var(--ease);
  outline: none;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.btn:hover {
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg-hover);
  box-shadow: var(--btn-primary-shadow-hover);
}

input[type="submit"]:focus-visible,
button[type="submit"]:focus-visible,
.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="submit"]:active,
button[type="submit"]:active,
.btn:active {
  transform: scale(0.98);
}

input[type="submit"]:disabled,
button[type="submit"]:disabled,
.btn:disabled {
  color: var(--bg);
  background: var(--accent-dim);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn--large {
  min-height: 44px;
  padding: 11px 20px;
  white-space: nowrap;
}

.btn.btn--small {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 12px;
}

input[type="submit"][hidden],
button[type="submit"][hidden],
.btn[hidden] {
  display: none;
}

.btn--with-icon {
  gap: 8px;
}

.btn--icon {
  width: var(--control-height);
  min-width: var(--control-height);
  padding: 0;
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

@media (max-width: 640px) {
  .btn--large {
    width: 100%;
  }
}

.btn.btn--ghost {
  min-height: 29px;
  padding: 5px 12px;
  color: var(--text-secondary);
  background: none;
  border: 1px solid var(--border);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.btn.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-hover);
  box-shadow: none;
}

.btn.btn--ghost:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn--danger {
  min-height: 29px;
  padding: 6px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.btn--danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
  box-shadow: 0 0 10px var(--danger-glow);
}

.btn--danger:focus-visible {
  box-shadow: 0 0 0 3px var(--danger-soft);
}
