/* The app's stylesheet: tokens first, then one file per area of the screen. All styling lives in these files (see
   "Visual design" in the Web CLAUDE.md); components use their class names and never inline colors. */
@import url("fonts.css");
@import url("tokens.css");
@import url("shell.css");
@import url("controls.css");
@import url("panels.css");
@import url("stage.css");
@import url("editor.css");
@import url("projects.css");
@import url("legal.css");

/* ---------- Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    /* No ligatures: JetBrains Mono would draw <= as ≤ and != as ≠, so code wouldn't show what was typed. */
    font-variant-ligatures: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.mono {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

/* The decimal shown next to (or under) every hex value. */
.dec {
    margin-left: 0.4em;
    color: var(--text-muted);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.dec::before {
    content: "(";
}

.dec::after {
    content: ")";
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.muted {
    color: var(--text-muted);
}

.empty {
    margin: 0;
    padding: 12px;
    color: var(--text-muted);
}

kbd {
    display: inline-block;
    min-width: 20px;
    padding: 0 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-family: var(--mono);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

/* ---------- Blazor's loading and error UI ---------- */
.loading-progress {
    position: absolute;
    display: block;
    width: 64px;
    height: 64px;
    inset: 40vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border);
    stroke-width: 4px;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: calc(40vh + 76px) 0 auto 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 8px 12px;
    border-top: 1px solid var(--danger);
    background: var(--surface-2);
    color: var(--text);
}

#blazor-error-ui .reload {
    color: var(--info);
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 12px;
    top: 8px;
    cursor: pointer;
}
