/* The pages' own look, ported from the old product (engine/public loader.css, wiki.css,
   experience.css, admin.css; ADR 0029). The shell (sidebar, header) is workspace.css, Rozmowa chat.css.
   Values are the old product's, not re-derived. This file has the loaders and the motion; Wiedza
   is wiki.css and the panel pages' frame, Superagent and Archiwum panels.css, linked after it. */

:root { --raised: #f1f0e9; --hover: #e9e8e0; --olive-ink: #505b37; --danger-soft: #f6e9e4; --control: #cbcdbd; --field: #fffef8; }

/* ---- Loading, progress and failure (loader.css, loading.js) ---- */
.q-spinner { display: inline-block; width: 1em; height: 1em; flex: none; vertical-align: -.15em; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--olive); animation: q-spin .8s linear infinite; }
.q-skeleton { display: block; min-height: .9em; margin: .35em 0; border-radius: 6px; color: transparent; background: linear-gradient(90deg, var(--raised) 25%, var(--sage) 50%, var(--raised) 75%) 0 0/200% 100%; animation: q-shimmer 1.4s ease-in-out infinite; }
.q-skeleton.title { height: 1.4em; width: 45%; }
.q-skeleton.line { height: .9em; }
.q-skeleton.line:last-child { width: 70%; }
.q-skeleton.line.q-skeleton-medium { width: 58%; }
.q-skeleton.line.q-skeleton-short { width: 30%; }
.q-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 96px; padding: 24px; color: var(--muted); }
.q-loading .q-spinner { width: 22px; height: 22px; border-width: 3px; }
.q-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.q-error { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 16px 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 7px; background: var(--surface); color: var(--ink); }
.q-error p { margin: 0; font-size: 14px; line-height: 1.55; }
.q-error button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; min-height: 34px; padding: 5px 13px; font: 600 13px/1.5 var(--sans); }
.q-error button:hover { background: var(--sage); border-color: var(--olive); }
.q-placeholder { width: 100%; padding-top: 4px; }
.q-placeholder-article { min-height: 360px; }
.q-skeleton-paragraph { margin: 18px 0 26px; }
.q-skeleton-feature { max-width: 720px; padding: 12px 0 14px; }
.q-skeleton-rows > div { padding: 12px 0; border-top: 1px solid var(--line); }
.q-skeleton-cards { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.q-skeleton-cards > div { border: 1px solid var(--line); border-radius: 8px; background: var(--raised); padding: 24px; }
/* Placeholders and the area spinner show only after 150 ms (ADR 0034): a read that answers sooner
   shows none, and the space they keep stays reserved. Content that replaces them fades in. */
.q-placeholder, .q-loading { animation: q-appear 200ms ease 150ms both; }
.q-arrive { animation: q-arrive 180ms var(--ease) both; }
@keyframes q-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes q-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.q-enter { animation: q-enter 200ms var(--ease) both; }
.q-pop { animation: q-pop 180ms var(--ease) both; }
@keyframes q-spin { to { transform: rotate(360deg); } }
@keyframes q-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes q-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes q-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
/* A popover going (dom.js popShown): the reverse of q-pop, taking no press while it goes. */
.q-unpop { animation: q-unpop 140ms var(--ease) both; pointer-events: none; }
@keyframes q-unpop { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes q-reveal { from { opacity: .68; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .q-skeleton-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .q-spinner { animation-duration: 2.4s; } .q-skeleton { animation: none; } .q-enter, .q-pop, .q-unpop, .wk-view, .q-arrive { animation: none; } .q-placeholder, .q-loading { animation-duration: 1ms; } }
