/* Pigboard / Sunshine, Cobalt, Coral and Mint
 * Pigboard colors on the shared Rovito component and spacing interface.
 * Historical --rv-* names are compatibility aliases, not literal color names.
 */
.pigboard-theme {
  color-scheme: light;
  --pb-sun: #ffe36a;
  --pb-paper: #fffaf0;
  --pb-blue: #244de8;
  --pb-ink: #183159;
  --pb-coral: #ff8c73;
  --pb-mint: #a7e4ca;
  --rv-graphite: var(--pb-paper);
  --rv-white: var(--pb-ink);
  --rv-teal: var(--pb-ink);
  --rv-teal-deep: var(--pb-ink);
  --rv-coral: var(--pb-blue);
  --rv-yellow: var(--pb-sun);
  --rv-bg: var(--pb-paper);
  --rv-surface: #ffffff;
  --rv-surface-raised: #fff0a4;
  --rv-surface-inset: var(--pb-paper);
  --rv-text: var(--pb-ink);
  --rv-text-secondary: #30415b;
  --rv-text-muted: #30415b;
  --rv-border: #929a9d;
  --rv-control-border: var(--pb-ink);
  --rv-link: var(--pb-ink);
  --rv-focus: var(--pb-ink);
  --rv-action: var(--pb-blue);
  --rv-action-hover: #1635b9;
  --rv-action-active: #102987;
  --rv-on-action: #ffffff;
  --rv-success: #164b39;
  --rv-success-bg: var(--pb-mint);
  --rv-warning: var(--pb-ink);
  --rv-warning-bg: var(--pb-sun);
  --rv-danger: #671d1d;
  --rv-danger-bg: var(--pb-coral);
  --rv-info: var(--pb-ink);
  --rv-info-bg: #bdd8ff;
  --rv-font-display: ui-rounded, "Avenir Next", system-ui, sans-serif;
  --rv-font-body: "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rv-font-code: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --rv-text-xs: 0.8125rem;
  --rv-text-sm: 0.875rem;
  --rv-text-base: 1rem;
  --rv-text-lg: 1.125rem;
  --rv-text-xl: 1.5rem;
  --rv-text-2xl: 2rem;
  --rv-text-display: clamp(2rem, 4vw, 3.75rem);
  --rv-leading-body: 1.6;
  --rv-leading-heading: 1.14;
  --rv-radius-sm: 0.5rem;
  --rv-radius-control: 0.75rem;
  --rv-radius-panel: 1.25rem;
  --rv-space-1: 0.25rem;
  --rv-space-2: 0.5rem;
  --rv-space-3: 0.75rem;
  --rv-space-4: 1rem;
  --rv-space-6: 1.5rem;
  --rv-space-8: 2rem;
  --rv-space-12: 3rem;
  --rv-space-16: 4rem;
  --rv-reading-width: 65ch;
  --rv-duration-fast: 140ms;
  --rv-ease: ease-out;
  background: var(--rv-bg);
  color: var(--rv-text);
  font-family: var(--rv-font-body);
  font-size: var(--rv-text-base);
  line-height: var(--rv-leading-body);
}

.pigboard-theme :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--rv-focus);
  outline-offset: 4px;
}

.pigboard-theme ::selection {
  color: var(--rv-on-action);
  background: var(--rv-teal);
}

.pigboard-theme .rv-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rv-space-2);
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border: 2px solid var(--pb-ink);
  border-radius: var(--rv-radius-control);
  background: var(--rv-action);
  color: var(--rv-on-action);
  font: 800 var(--rv-text-sm)/1.3 var(--rv-font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--rv-duration-fast) var(--rv-ease), border-color var(--rv-duration-fast) var(--rv-ease);
}
.pigboard-theme .rv-button:hover { background: var(--rv-action-hover); }
.pigboard-theme .rv-button:active { background: var(--rv-action-active); }
.pigboard-theme .rv-button--secondary {
  color: var(--rv-text);
  background: transparent;
  border-color: var(--rv-control-border);
}
.pigboard-theme .rv-button--secondary:hover { background: var(--rv-surface-raised); }
.pigboard-theme .rv-button:disabled {
  color: var(--rv-text-muted);
  background: var(--rv-surface-raised);
  border-color: var(--rv-border);
  cursor: not-allowed;
}
.pigboard-theme .rv-link {
  color: var(--rv-link);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.pigboard-theme .rv-link:hover { color: var(--rv-white); }
.pigboard-theme .rv-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rv-control-border);
  border-radius: var(--rv-radius-control);
  color: var(--rv-text);
  background: var(--rv-surface-inset);
  font: inherit;
}
.pigboard-theme .rv-input::placeholder { color: var(--rv-text-muted); }
.pigboard-theme .rv-input[aria-invalid="true"] { border-color: var(--rv-danger); }
.pigboard-theme .rv-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--rv-radius-sm);
  font-size: var(--rv-text-sm);
  font-weight: 600;
}
.pigboard-theme .rv-status--success { color: var(--rv-success); background: var(--rv-success-bg); }
.pigboard-theme .rv-status--warning { color: var(--rv-warning); background: var(--rv-warning-bg); }
.pigboard-theme .rv-status--danger { color: var(--rv-danger); background: var(--rv-danger-bg); }
.pigboard-theme .rv-status--info { color: var(--rv-info); background: var(--rv-info-bg); }
.pigboard-theme .rv-code {
  color: var(--rv-text);
  font-family: var(--rv-font-code);
  font-size: var(--rv-text-sm);
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  .pigboard-theme { --rv-duration-fast: 0ms; }
}
