/* THE ONE EMPTY-STATE SYSTEM (T10, 2026-09-15). Three levels, one file. Tokens only. */

/* ── Level 1 · page empty: one block, centred, in place of every tile ── */
/* Everything the block stands in for is hidden by ATTRIBUTE, and the attribute must win
   over a page's own display:grid / display:flex on its strips and bars (the user-agent
   [hidden] rule loses to any author rule; T3 fell to the same thing on the door). */
[data-ora-empty-hidden]{display:none!important}
.ora-empty{padding:var(--space-xl) var(--space-md);text-align:center;color:var(--text-tertiary)}
.ora-empty-page{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-sm);
  min-height:min(60vh,520px);max-width:440px;margin:0 auto;padding:var(--space-2xl,48px) var(--space-md)}
/* the one illustration style: a FontAwesome glyph in a soft circle, from the set already on the page */
.ora-empty-orb{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:color-mix(in srgb,var(--accent) 12%,var(--surface-raised));color:var(--accent);font-size:28px;margin-bottom:var(--space-xs)}
.ora-empty-title{color:var(--text);font-family:var(--font-heading);font-weight:600;font-size:var(--fs-lg)}
.ora-empty-description{color:var(--text-secondary);font-size:var(--text-sm);line-height:1.5;max-width:36ch}
.ora-empty-actions{display:flex;gap:var(--space-sm);justify-content:center;align-items:center;flex-wrap:wrap;margin-top:var(--space-sm)}
/* T3 (2026-09-20). WHY THE CONTROL IS OFF, READABLE WITHOUT A HOVER. A disabled
   button with the reason only in a tooltip is the same dead end as a silent
   no-op on a touch screen, which has no hover at all. The sentence is the one
   public.ora_page_import_route() returned; this file only places it. */
.ora-empty-why{color:var(--text-tertiary);font-size:var(--text-xs);line-height:1.5;max-width:44ch;margin-top:var(--space-xs);text-align:center}
.ora-empty-upload[aria-disabled="true"]{opacity:.55;cursor:not-allowed}
.ora-empty-connect{color:var(--accent);font-size:var(--text-sm);text-decoration:underline;text-underline-offset:3px}
.ora-empty-connect:hover{color:var(--color-accent-bright,var(--accent))}

/* the mapping sheet, shown before anything is sent */
.ora-empty-map{width:100%;text-align:left;margin-top:var(--space-md)}
.ora-map-head-line{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-tertiary);margin-bottom:var(--space-sm)}
.ora-map{width:100%;border-collapse:collapse;font-size:var(--text-sm)}
.ora-map th{font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--ls-wider);text-transform:uppercase;color:var(--text-tertiary);text-align:left;padding:4px 6px;font-weight:400}
.ora-map td{padding:6px;border-top:1px solid var(--border-subtle);vertical-align:middle}
.ora-map-col{display:flex;flex-direction:column;gap:2px;min-width:0}
.ora-map-head{color:var(--text)}
.ora-map-sample{font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--text-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:18ch}
.ora-map-arrow{color:var(--text-tertiary);width:1ch}
.ora-map-select{width:100%;font:inherit;font-size:var(--text-sm);color:var(--text);background:var(--surface-raised);
  border:1px solid var(--border-strong);border-radius:var(--radius-md);padding:6px 8px}
.ora-map-select:focus-visible{outline:none;box-shadow:var(--focus-ring)}
.ora-map-select[data-clash]{border-color:var(--warn)}
.ora-map-why{color:var(--warn);max-width:none}

/* the read-back: queued › mapping › importing › done, or the exact failure */
.ora-empty-progress{margin-top:var(--space-md);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-secondary);
  display:flex;flex-direction:column;align-items:center;gap:6px}
.ora-empty-steps{display:inline-flex;gap:8px;align-items:center;color:var(--text-tertiary)}
.ora-empty-step.is-current{color:var(--text);font-weight:600}
.ora-empty-step-sep{opacity:.5}
.ora-empty-step-detail{color:var(--text-secondary)}
.ora-empty-progress[data-tone="ok"] .ora-empty-step.is-current{color:var(--ok,var(--accent))}
.ora-empty-progress[data-tone="warn"]{color:var(--warn)}
.ora-empty-progress[data-tone="danger"]{color:var(--danger)}
.ora-empty-failure{font-family:var(--font-body);font-size:var(--text-sm);max-width:44ch;line-height:1.5}
.ora-empty-again{font:inherit;font-size:var(--text-xs);color:var(--text);background:transparent;border:1px solid var(--border-strong);
  border-radius:var(--radius-md);padding:4px 10px;cursor:pointer}
.ora-empty-again:hover{border-color:var(--accent);color:var(--accent)}

/* ── Level 2 · a tile with no number: "–", why, (i). No button, ever. ── */
.ora-tile-empty{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-xs);min-height:64px}
.ora-tile-empty-dash{font-family:var(--font-heading);font-size:var(--fs-xl);line-height:1;color:var(--text-tertiary);font-weight:var(--fw-regular)}
.ora-tile-empty-why{font-size:var(--text-xs);color:var(--text-tertiary)}
.ora-tile-empty-how{position:absolute;top:0;right:0}
/* a centred tile (the home cards) centres the three */
.tile-empty .ora-tile-empty{align-items:center;text-align:center;justify-content:center;min-height:128px}
.tile-empty .ora-tile-empty-how{position:static;margin-top:2px}

/* ── Level 3 · the read failed: one quiet line, one Retry, never a picture ── */
.ora-read-failed{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:var(--text-sm);color:var(--text-secondary)}
.ora-read-failed-line{color:var(--text-secondary)}
.ora-read-failed-last{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-tertiary)}
.ora-read-failed-retry{font:inherit;font-size:var(--text-xs);color:var(--text);background:transparent;border:1px solid var(--border-strong);
  border-radius:var(--radius-md);padding:3px 10px;cursor:pointer}
.ora-read-failed-retry:hover{border-color:var(--accent);color:var(--accent)}
.ora-read-failed-retry:focus-visible{outline:none;box-shadow:var(--focus-ring)}

@media (max-width:480px){
  .ora-empty-page{min-height:50vh;padding:var(--space-xl) var(--space-sm)}
  .ora-map-sample{display:none}
}

/* ============================================================
   STUDIO BUSINESSES · THEME-CARRY-2 AMEND-2 (Eri, 29 Oct)
   No takeover: the page's actions sit in its header, each empty card keeps its
   title and says one line and the fields it will hold, muted. Every colour is a
   studio role (lib/studio-theme.js). Inert without html[data-studio-theme].
   ============================================================ */
/* NOTHING MOVES WHEN THE ACTIONS ARRIVE (the filmstrip gate, theme-carry-2-filmstrip.mjs). The row is added after
   the page has painted, and beside the title it widened the left side, wrapped the controls on the right onto a
   second line and pushed the whole page down. It now sits on its own row at every width, and the row is held from
   the first paint (empty-state.js marks the page, the spacer below stands in until the row exists). */
html[data-studio-theme] .ora-page-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-xs) var(--space-sm);flex-basis:100%;margin-left:0;min-height:34px;order:99}
html[data-studio-theme][data-page-actions] .chrome-left:not(:has(.ora-page-actions))::after{content:'';flex-basis:100%;height:34px;order:99}
/* and the left side takes the room left over instead of sizing itself to what it holds, so the actions arriving in it
   can never widen it and wrap the search and range controls onto a second line */
html[data-studio-theme][data-page-actions] .chrome-left{flex:1 1 0;min-width:0}
html[data-studio-theme] .ora-page-actions .ora-empty{display:contents}
html[data-studio-theme] .ora-page-actions [hidden]{display:none!important}
html[data-studio-theme] .ora-page-actions .ora-empty-actions{display:flex;flex-wrap:wrap;gap:var(--space-xs);margin:0}
html[data-studio-theme] .ora-page-actions .btn{min-height:34px;padding:0 14px;border-radius:var(--radius-md);font-size:var(--fs-sm)}
html[data-studio-theme] .ora-page-actions .btn-primary{background:var(--a-accent);color:var(--a-on-accent);border:1px solid var(--a-accent)}
html[data-studio-theme] .ora-page-actions .btn-secondary{background:var(--a-surface);color:var(--a-ink);border:1px solid var(--a-line)}
html[data-studio-theme] .ora-page-connect{display:inline-flex;align-items:center;min-height:34px;padding:0 14px;border-radius:var(--radius-md);border:1px solid var(--a-line);background:var(--a-surface);color:var(--a-ink);font-size:var(--fs-sm);text-decoration:none}
html[data-studio-theme] .ora-page-connect:hover{border-color:var(--a-accent)}
html[data-studio-theme] .ora-page-sandbox{flex-basis:100%;margin:0;text-align:right;color:var(--a-muted);font-size:var(--fs-xs)}
html[data-studio-theme] .ora-card-empty{display:flex;flex-direction:column;gap:var(--space-xs);padding:var(--space-md) 0}
html[data-studio-theme] .ora-card-empty-line{margin:0;color:var(--a-muted);font-size:var(--fs-sm)}
html[data-studio-theme] .ora-card-empty-fields{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
html[data-studio-theme] .ora-card-empty-fields li{padding:2px 9px;border-radius:999px;background:var(--a-chip);color:var(--a-muted);font-size:var(--fs-xs)}
html[data-studio-theme] .ora-watchdog .ora-read-failed{color:var(--a-attn-ink)}
@media (max-width:767px){
  html[data-studio-theme] .ora-page-actions{margin-left:0;flex-basis:100%}
  html[data-studio-theme] .ora-page-sandbox{text-align:left}
}
