/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ── Brand typography ── */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

body {
  font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
}

/* Tabular numbers for data-heavy columns */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

:root {
  --color-app-bg:       #0b0f1a;
  --color-surface:      #111827;
  --color-surface-raised: #161d2e;
  --color-border:       #1e2633;
  --color-editor-bg:    #1a1f2e;
  --color-text-primary: #e8edf3;
  --color-text-muted:   #8b96a8;
  --color-text-subtle:  #4a5568;
  --color-accent:       #d97a38;
  --color-accent-light: #f0a468;
  --color-accent-bg:    rgba(217, 122, 56, 0.1);
}

/* Wiggle animation for attention-grabbing links */
@keyframes wiggle {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(-4deg); }
  30%  { transform: rotate(4deg); }
  45%  { transform: rotate(-3deg); }
  60%  { transform: rotate(3deg); }
  75%  { transform: rotate(-1deg); }
  90%  { transform: rotate(1deg); }
  100% { transform: rotate(0deg); }
}

.wiggle-periodic {
  display: inline-block;
  animation: wiggle 0.5s ease-in-out;
  animation-iteration-count: 1;
}

/* Fade-in for dynamically inserted content (e.g. Turbo Stream results) */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in 0.2s ease-out both;
}

/* Spinning loader */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 0.75s linear infinite;
}

/* Inline code in dark UI */
.ide-dark code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  background: #1e2633;
  color: #c9d1d9;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  border: 1px solid #2d3748;
}

/* IDE dark reset — applied to html on dark pages */
html.ide-dark {
  background: var(--color-app-bg);
  color: var(--color-text-primary);
}

html.ide-dark body {
  background: var(--color-app-bg);
  color: var(--color-text-primary);
}
