/* Additions to the design system for things the mockups do not show.
   styles.css holds the tokens and components (design/styles.css is a copy); this file is app plumbing. */

.skip { position: absolute; left: var(--s2); top: -48px; z-index: 10; background: var(--marigold); color: var(--on-marigold); padding: var(--s2) var(--s3); border-radius: 6px; font-weight: 700; text-decoration: none; }
.skip:focus { top: var(--s2); }
.fine { font-size: 0.85rem; }
.inline-form { display: inline; margin: 0; }
.notice { background: var(--surface-2); border-radius: 12px; padding: var(--s2) var(--s4); font-size: 0.9rem; color: var(--muted); margin-top: var(--s4); }
.notice a { color: var(--text); }

/* Links styled as chips (branch filter, stream filter) */
a.chip { text-decoration: none; display: inline-block; }
a.chip:hover { color: var(--text); border-color: var(--muted); }
a.chip[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
a.chip[aria-current="true"]:hover { color: var(--bg); }
.chip.less { color: var(--down); border-color: currentColor; }
button.chip[aria-pressed="true"].less { background: transparent; color: var(--down); border-color: var(--down); font-weight: 700; }

/* Real art replaces the coloured placeholder */
.cover.has-img { padding: 0; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* Image placeholders. The box is tinted from the name (--ph-h, set on the element) and mixed with the
   theme's own surface so it suits both themes; the image fades in over it once loaded. app.js sets
   data-state="loaded" or "error" on the img. Without JavaScript (no .js on <html>) the image just shows. */
.ph { position: relative; background: color-mix(in oklab, hsl(var(--ph-h, 280) 55% 50%) 26%, var(--surface-2)); }
.cover.has-img.ph { color: var(--text); }
.ph-name { display: block; align-self: flex-end; padding: 6px; font: 900 0.62rem/1.15 var(--body); }
.hero .cover .ph-name { padding: 14px; font-size: 1.1rem; }
.avatar.ph { color: var(--text); }
.ph-img { position: absolute; inset: 0; z-index: 1; }
.js .ph-img { opacity: 0; transition: opacity 0.25s ease-out; }
.js .ph-img[data-state="loaded"] { opacity: 1; }
.js .ph::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--text) 12%, transparent) 50%, transparent 70%) 0 0 / 250% 100%;
}
.js .ph:has(> .ph-img[data-state])::after { display: none; }
@media (prefers-reduced-motion: no-preference) { .js .ph::after { animation: ph-shimmer 1.6s linear infinite; } }
@media (prefers-reduced-motion: reduce) { .js .ph-img { transition: none; } .js .ph::after { display: none; } }
@keyframes ph-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (max-width: 640px) { .hero .cover .ph-name { padding: 8px; font-size: 0.8rem; } }

/* Empty and quiet states */
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-panel); padding: var(--s6) var(--s5); }
.empty h2, .empty h3 { margin-bottom: var(--s2); }
.empty p { color: var(--muted); }
.empty .actions { margin-top: var(--s4); }
.empty.small { padding: var(--s4); }
.empty.small p { font-size: 0.9rem; }
.panel > .empty { margin-top: var(--s2); }

/* Prose pages */
.prose { max-width: 68ch; padding: var(--s6) 0 0; }
.prose h1 { margin-bottom: var(--s4); }
.prose h2 { margin: var(--s6) 0 var(--s2); font-size: 1.3rem; }
.prose p, .prose ul { margin: 0 0 var(--s3); }
.prose ul { padding-left: 1.2em; }

/* Admin queue extras */
.search-results { margin-top: var(--s3); }
.match + .match, .match + .search-results { margin-top: var(--s4); }
.panel.match { margin-top: var(--s4); }

/* Framework error bar */
#blazor-error-ui { color-scheme: light only; background: #fff3cd; color: #2a1a10; bottom: 0; box-shadow: 0 -1px 2px rgb(0 0 0 / 0.2); box-sizing: border-box; display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Something on this page went wrong."; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }

/* Admin tables: small covers beside a name */
.cover.tiny { width: 34px; font-size: 0; flex: none; }
/* Safety net: if app.js never marks an image (blocked or failed script), show it anyway after a few seconds. */
.js .ph-img:not([data-state]) { animation: ph-reveal 0s 6s forwards; }
@keyframes ph-reveal { to { opacity: 1; } }

/* Blazor moves focus to the h1 after navigation for screen readers; that programmatic focus needs no ring. */
h1[tabindex="-1"]:focus { outline: none; }
