/* denovo-kit / components.css
   Atomic components — device-agnostic. Same shape on desktop + mobile.
   Extracted verbatim (then lightly adapted) from spheric's style.css. */

/* ── Universal box ──
   Base surface for cards, panels, rows — everything with bg-card + border. */
.box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.box--dashed  { border-style: dashed; }
.box--interactive {
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}
.box--interactive:hover {
    border-color: var(--accent-text);
    background: var(--bg-raised);
}

/* ── Universal card ── Higher-level container with padding */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
}
.card + .card { margin-top: var(--space-md); }
.card-title {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--space-xs);
}
.card-meta {
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: var(--space-sm);
}
.card-body {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* ── Pinned bar ──
   Bottom action bars, compose bars, selection trays. */
.pinned-bar {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    background: var(--bg-raised);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

/* ── Buttons ── */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, opacity 0.15s;
    font-family: var(--font-sans);
    letter-spacing: 0.2px;
    display: inline-block;
    text-align: center;
}
.btn-primary {
    background: var(--accent);
    color: var(--ink);
}
.btn-primary:hover { background: var(--accent-light); }
.btn-secondary {
    background: var(--bg-card);
    color: var(--ink-soft);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-raised); color: var(--ink); }
.btn:disabled, .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Inputs ── */
input, textarea, select {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent-text);
    background: var(--bg-raised);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
}
.search-input:focus {
    border-color: var(--accent-text);
    background: var(--bg-raised);
}

/* ── Tab bar (desktop) ── */
.tab-row {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}
.tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-faint);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-sans);
    letter-spacing: 0.2px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--ink-soft); }
.tab-btn.active {
    color: var(--accent-text);
    border-bottom-color: var(--accent-text);
}

/* ── Chips ── */
.chip {
    background: var(--bg-card);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.chip:hover {
    border-color: var(--accent-text);
    color: var(--ink);
}
.chip.active {
    background: var(--accent-muted);
    border-color: var(--accent);
    color: var(--accent-text);
}

/* ── Badges / pills ── */
.badge {
    background: var(--border);
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}
.badge--accent { background: var(--accent-muted); color: var(--accent-text); }
.badge--amber  { background: var(--amber-muted);  color: var(--amber-text); }
.badge--red    { background: var(--red-muted);    color: var(--red); }

.pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--bg-raised);
    color: var(--ink-soft);
    border: 1px solid var(--border);
    letter-spacing: 0.3px;
}
.pill--accent { background: var(--accent-muted); color: var(--accent-text); border-color: var(--accent); }

/* ── Empty state ── */
.empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--ink-faint);
    font-size: 14px;
    font-style: italic;
}

/* ── Page description (subtitle under h1) ── */
.page-desc {
    font-size: 14px;
    color: var(--ink-faint);
    margin-bottom: 24px;
}

/* ── Page actions ──
   Canonical "row of buttons at the end of a page" wrapper. Always includes
   its own top + bottom margin so the primary button never sits flush against
   the page footer (desktop) or the bottom nav (mobile). Use this instead of
   inline margin-top/bottom on the button's wrapper div.

   The bottom margin is --space-2xl (32px) so even when the viewport is tall
   enough to compress the page, there's still an obvious visual gap below
   the button. Combined with <main>'s padding-bottom, the button sits at
   least 64px above any border/footer/nav. */
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
