/**
 * Default styles for @adamarant/contact-form.
 *
 * Optional — import only if you use the built-in class names (`acf-*`).
 * Design-system consumers can skip this file and pass `classNames` instead
 * to map fields onto their own classes (e.g. `ds-input`, `ds-btn`).
 *
 *   import '@adamarant/contact-form/styles'
 *
 * This package is standalone (no design-system dependency): everything is
 * tuned via the local variables below. Override them in your own CSS —
 * including pointing `--acf-weight-medium` at your DS weight token if you have one.
 */
.acf-form {
  --acf-gap: 1rem;
  --acf-radius: 8px;
  --acf-border: #d4d4d8;
  --acf-border-focus: #09090b;
  --acf-bg: #ffffff;
  --acf-fg: #18181b;
  --acf-muted: #71717a;
  --acf-accent: #09090b;
  --acf-accent-fg: #ffffff;
  --acf-error: #dc2626;
  --acf-error-bg: #fef2f2;
  --acf-success: #16a34a;
  --acf-success-bg: #f0fdf4;
  --acf-weight-medium: 500;

  display: flex;
  flex-direction: column;
  gap: var(--acf-gap);
}

.acf-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.acf-label {
  font-size: 0.875rem;
  font-weight: var(--acf-weight-medium);
  color: var(--acf-fg);
}

.acf-required {
  color: var(--acf-error);
}

.acf-input,
.acf-textarea,
.acf-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--acf-fg);
  background: var(--acf-bg);
  border: 1px solid var(--acf-border);
  border-radius: var(--acf-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.acf-textarea {
  resize: vertical;
  min-height: 6rem;
}

.acf-input:focus,
.acf-textarea:focus,
.acf-select:focus {
  outline: none;
  border-color: var(--acf-border-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--acf-border-focus) 15%, transparent);
}

.acf-button {
  appearance: none;
  cursor: pointer;
  padding: 0.6875rem 1.25rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: var(--acf-weight-medium);
  color: var(--acf-accent-fg);
  background: var(--acf-accent);
  border: none;
  border-radius: var(--acf-radius);
  transition: opacity 0.15s ease;
}

.acf-button:hover:not(:disabled) {
  opacity: 0.9;
}

.acf-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.acf-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--acf-radius);
  font-size: 0.875rem;
  line-height: 1.5;
}

.acf-alert--error {
  color: var(--acf-error);
  background: var(--acf-error-bg);
}

.acf-alert--success {
  color: var(--acf-success);
  background: var(--acf-success-bg);
}

/* Visually hidden but still submitted + reachable by bots (not display:none). */
.acf-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
