/* Design-system components, translated from the VectorShift DS React sources
   (components/core/{Badge,Button,Card,Tag}.jsx, components/forms/Input.jsx).
   Values below mirror those components exactly; hover/active states that the
   JSX drives with React state are CSS pseudo-classes here. */

/* ---- Button ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition:
    background var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.btn:disabled {
  background: var(--stone-200);
  color: var(--stone-400);
  border-color: var(--stone-200);
  cursor: not-allowed;
}

/* sizes */
.btn--sm {
  gap: 6px;
  padding: 6px 14px;
  font-size: var(--fs-sm);
}

.btn--md {
  gap: 8px;
  padding: 10px 22px;
  font-size: var(--fs-base);
}

.btn--lg {
  gap: 10px;
  padding: 14px 28px;
  font-size: var(--fs-md);
}

/* variants */
.btn--primary {
  background: var(--primary-500);
  color: var(--text-inverse);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-600);
  color: var(--text-inverse);
}

.btn--primary:active:not(:disabled) {
  background: var(--primary-700);
}

.btn--accent {
  background: var(--accent-500);
  color: var(--text-inverse);
}

.btn--accent:hover:not(:disabled) {
  background: var(--accent-600);
  color: var(--text-inverse);
}

.btn--accent:active:not(:disabled) {
  background: var(--accent-700);
}

.btn--secondary {
  background: transparent;
  color: var(--text-heading);
  border-color: var(--border-default);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--bg-sunken);
  border-color: var(--border-strong);
  color: var(--text-heading);
}

.btn--secondary:active:not(:disabled) {
  background: var(--stone-200);
}

.btn--ghost {
  background: transparent;
  color: var(--text-heading);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--bg-sunken);
  color: var(--text-heading);
}

.btn--ghost:active:not(:disabled) {
  background: var(--stone-200);
}

/* Secondary button sitting on the teal ground: the design overrides the
   border, text and background so it reads as an outline on colour. The DS
   hover (a light grey fill) would fight that, so it lifts with a translucent
   white instead. */
.btn--on-primary {
  border-color: var(--primary-300);
  color: var(--stone-0);
  background: transparent;
}

.btn--on-primary:hover:not(:disabled) {
  background: rgb(255 255 255 / 0.12);
  border-color: var(--stone-0);
  color: var(--stone-0);
}

.btn--on-primary:active:not(:disabled) {
  background: rgb(255 255 255 / 0.2);
}

.btn--block {
  width: 100%;
  padding: 14px 24px;
}

/* ---- Badge ---- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: var(--radius-full);
  background: var(--stone-100);
  color: var(--stone-700);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xs);
  line-height: 1.4;
}

/* ---- Tag ---- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-sm);
}

/* ---- Card ---- */

.card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--duration-base) var(--ease-standard),
    border-color var(--duration-base) var(--ease-standard);
}

.card--interactive {
  cursor: pointer;
  display: block;
  color: inherit;
}

.card--interactive:hover,
.card--interactive:focus-visible {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}

/* ---- Field (Input / Textarea) ---- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-heading);
}

.field__control {
  padding: 10px 12px;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  outline: none;
  width: 100%;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.field__control {
  line-height: var(--lh-normal);
  resize: vertical;
  min-height: 84px;
}

.field__control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.field__control:disabled {
  background: var(--bg-sunken);
}

.field--invalid .field__control {
  border-color: var(--error-500);
}

.field--invalid .field__control:focus {
  box-shadow: 0 0 0 3px var(--error-100);
}

.field__message {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.field--invalid .field__message {
  color: var(--error-700);
}

/* Empty message elements should not open a gap in the form rhythm. */
.field__message:empty {
  display: none;
}

/* Honeypot: off-screen rather than display:none, since some bots skip
   hidden inputs. Never announced — the wrapper carries aria-hidden. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
