/* ============================================================
   JARVIS 2.0 · Schiphol board — the bridge to css/jarvis-fab.css
   ============================================================
   css/jarvis-fab.css is the SAME file Poeldijk serves. It expects
   three things from the page that the Schiphol board (index.html)
   does not have, because this board loads neither themes.css nor
   main.css nor components.css:

     1. the app's colour tokens (--bg-*, --text-*, --accent-*, …)
     2. the global reset of main.css (* { margin:0; padding:0 })
     3. the tab-bar trigger (.jarvis-fab-trigger) — here the board's
        own "✦ JARVIS AI" button (.btn-jarvis) is the trigger

   Everything below is scoped to JARVIS' own elements. Nothing on
   the board itself is restyled, and no token is set on :root (the
   board's stylesheets use var(--…, fallback) in places).
   Load AFTER css/jarvis-fab.css.
   ============================================================ */

/* ── 1. Tokens: the values of the app theme (css/themes.css), light = the board's default look ── */
.jarvis-drawer,
.jarvis-preview-bubble,
.jarvis-fab-hint {
    --bg-primary: #f6f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef4f8;
    --bg-hover: #e6f3f8;
    --text-primary: #102033;
    --text-secondary: #33465a;
    --text-muted: #536579;
    --border-color: #d6e2ea;
    --border-highlight: #b9cedb;
    --accent-orange: #c47a14;
    --accent-green: #2c8c62;
    --accent-red: #c94136;
    --accent-blue: #0a5989;
    --accent-yellow: #c47a14;
    --radius-sm: 4px;
    --radius-md: 6px;
    --shadow-md: 0 8px 20px rgba(23, 45, 64, 0.10);
    --shadow-lg: 0 14px 38px rgba(23, 45, 64, 0.14);
}
[data-theme="dark"] .jarvis-drawer,
[data-theme="dark"] .jarvis-preview-bubble,
[data-theme="dark"] .jarvis-fab-hint {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-highlight: #475569;
    --accent-orange: #f97316;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --accent-yellow: #eab308;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}
/* jarvis-fab.css switches its light details on [data-theme="light"]; a page without the attribute is light here */
:root:not([data-theme="dark"]) .jarvis-drawer { --jv-on-accent: #ffffff; box-shadow: -8px 0 24px rgba(16, 32, 51, 0.14); }

/* ── 2. Reset + type, as main.css gives them on Poeldijk (lower specificity than every panel rule) ── */
.jarvis-drawer, .jarvis-preview-bubble, .jarvis-preview-bubble *, .jarvis-fab-hint { box-sizing: border-box; }
.jarvis-drawer *, .jarvis-preview-bubble * { margin: 0; padding: 0; }
.jarvis-drawer, .jarvis-preview-bubble, .jarvis-fab-hint { font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace; }

/* ── 3. The board's own button as the JARVIS trigger (its resting look is untouched) ── */
.cargo-board-root .btn-jarvis { position: relative; }
.cargo-board-root .btn-jarvis .badge-count {
    background: var(--jv-badge, #f97316);
    color: #1a0f00;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    padding: 0 6px;
    border-radius: 8px;
}
.cargo-board-root .btn-jarvis .badge-count[hidden],
.cargo-board-root .btn-jarvis .jarvis-fab-hint[hidden] { display: none; }
.cargo-board-root .btn-jarvis .jarvis-fab-hint { font-weight: 500; text-align: left; }
.cargo-board-root .btn-jarvis.drag-over {
    border-color: #f97316;
    color: #f97316;
    background: rgba(249, 115, 22, 0.14);
    transform: scale(1.04);
}
/* a file is being dragged anywhere on the page: the button lights up, as the Poeldijk trigger does */
body.jarvis-incoming-file .cargo-board-root .btn-jarvis {
    border-color: #f97316;
    color: #f97316;
    box-shadow:
        0 0 0 1px rgba(249, 115, 22, 0.6),
        0 0 24px rgba(249, 115, 22, 0.55),
        0 0 48px rgba(249, 115, 22, 0.25);
    animation: jarvisIncomingPulse 1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    body.jarvis-incoming-file .cargo-board-root .btn-jarvis { animation: none; }
}
