/* Reusable, opt-in AirVoice components. Requires airvoice-tokens.css.
   Use real <button>, <a>, <label>, <input>, <select>, and <textarea> elements.
   Labels still require for/id associations; CSS does not create semantics. */
.av-button,
.av-input,
.av-card {
  box-sizing: border-box;
}

.av-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--av-space-2);
  min-height: 44px;
  max-width: 100%;
  padding: var(--av-space-3) var(--av-space-5);
  border: 1px solid transparent;
  border-radius: var(--av-radius-sm);
  background: var(--av-primary);
  color: var(--av-on-primary);
  font: 600 1rem/1.35 var(--av-font-body);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.av-button:hover:not(:disabled) {
  background: var(--av-primary-hover);
}
.av-button--secondary {
  border-color: var(--av-border);
  background: var(--av-surface);
  color: var(--av-text);
}
.av-button--secondary:hover:not(:disabled) {
  border-color: var(--av-primary);
  background: var(--av-surface-raised);
}
.av-button:disabled,
.av-input:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.av-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: var(--av-space-3) var(--av-space-4);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-sm);
  background: var(--av-surface);
  color: var(--av-text);
  font: 400 1rem/1.5 var(--av-font-body);
}
.av-input::placeholder {
  color: var(--av-text-muted);
  opacity: 1;
}
textarea.av-input {
  min-height: 120px;
  resize: vertical;
}
.av-button:focus-visible,
.av-input:focus-visible {
  outline: 3px solid var(--av-focus);
  outline-offset: 3px;
}

.av-card {
  padding: var(--av-space-5);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-md);
  background: var(--av-surface);
  color: var(--av-text);
  font-family: var(--av-font-body);
}
.av-card--raised {
  background: var(--av-surface-raised);
}
.av-title {
  margin: 0;
  color: var(--av-text);
  font-family: var(--av-font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-style: normal;
  font-weight: 700;
  font-synthesis: none;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.av-title--small {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}
.av-text {
  margin: 0;
  color: var(--av-text);
  font: 400 1rem/1.6 var(--av-font-body);
  overflow-wrap: anywhere;
}
.av-text--muted {
  color: var(--av-text-muted);
}
.av-label {
  display: block;
  margin-bottom: var(--av-space-2);
  color: var(--av-text);
  font: 600 .9375rem/1.5 var(--av-font-body);
}

@media (prefers-reduced-motion: reduce) {
  .av-button { transition: none; }
}
@media (forced-colors: active) {
  .av-button,
  .av-input,
  .av-card { border-color: CanvasText; }
  .av-button:focus-visible,
  .av-input:focus-visible { outline-color: Highlight; }
}
