/* Shared HTML app primitives (buttons, notices, badges, cards). */

.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button.button {
  appearance: none;
  margin: 0;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.button-primary {
  background: var(--action-primary);
  color: var(--action-primary-foreground);
}

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

.button-destructive {
  background: var(--state-error);
  color: var(--text-inverse);
}

.button-destructive:hover {
  background: var(--state-error-hover);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.notice {
  margin: 0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.notice[hidden] {
  display: none;
}

.notice-error {
  background: var(--state-error-surface);
  color: var(--text-primary);
}

.notice-success {
  background: var(--state-success-surface);
  color: var(--text-primary);
}

.notice-warning {
  background: var(--state-warning-surface);
  color: var(--text-primary);
}

.notice-body {
  display: grid;
  gap: 0.25rem;
}

.notice-title {
  margin: 0;
  font-weight: 500;
}

.notice-message {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-outline {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.badge-neutral {
  background: var(--surface-menu);
  color: var(--text-primary);
}

.card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.card-body {
  padding: var(--space-6);
}
