/*
 * Shared demo primitives (generic looks reused across multiple demos).
 *
 * Each demo's demo.css holds only that component's own styling; the generic
 * classes used across components are defined here exactly once. This structurally
 * prevents drift from hand-copying into each demo (e.g. forgetting a button style).
 *
 * These are published as code on the "shared styles" page (/foundation) alongside
 * variables.css, so users can copy them verbatim when taking a demo into their app.
 */

/* Demo trigger / action button (the same plain button look as the dialog etc. demos). */
.demo-trigger {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.demo-trigger:hover {
  border-color: var(--accent);
}

.demo-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Demo text inputs (input[type=text/search/...] / textarea). Same plain border and
   radius as the trigger button, unifying the look across the input demos (input_mask /
   auto_submit / nested_form / reset_before_cache, etc.) in one place. Each demo.css
   adds only its state selectors (e.g. [data-mask-complete] / [data-auto-submit-pending]);
   the base look stays here to prevent drift from hand-copying. */
.demo-input {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.demo-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Card surface (background, border, radius, padding, shadow). A shared surface so
   the calendar / date_range_picker demos sit in the same framing. Per-demo layout
   like width / display stays in each demo.css (only the surface is centralized here,
   to prevent drift from hand-copying). */
.demo-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Visually hidden but still read by screen readers (used for accessible labels, etc.). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
