/* 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: var(--q-raised); --hover: var(--q-hover-soft); --olive-ink: var(--q-olive-ink); --danger-soft: var(--q-danger-soft); --control: var(--q-control); --field: var(--q-field); }

/* ---- 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; }
.q-skeleton-turn { margin-bottom: 30px; }
.q-skeleton-ask { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.q-skeleton-ask .q-skeleton.line { width: min(38%, 300px); height: 2.6em; border-radius: 10px 10px 2px 10px; }
.q-skeleton-turn .q-skeleton-paragraph { max-width: 760px; margin: 0; }
/* 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; } }
/* A select's list of its own (dom/select.js, ADR 0297): the kit's Selector's look (ADR 0286) in the
   panels' tokens. The closed select trades the browser's arrow for the kit's chevron (two strokes
   drawn by gradients, turned while open); `!important` because every page paints its selects'
   background and padding in its own rules. */
select:not([multiple]):is(:not([size]), [size='0'], [size='1']) {
  --q-stroke: transparent calc(50% - .8px), var(--muted) calc(50% - .8px), var(--muted) calc(50% + .8px), transparent calc(50% + .8px);
  appearance: none; padding-right: 30px !important;
  background-image: linear-gradient(45deg, var(--q-stroke)), linear-gradient(135deg, var(--q-stroke)) !important;
  background-position: calc(100% - 16.5px) 50%, calc(100% - 12px) 50% !important; background-size: 5px 5px !important; background-repeat: no-repeat !important;
}
select:not([multiple])[aria-expanded='true'] {
  border-color: var(--olive) !important; box-shadow: 0 0 0 3px var(--q-focus-ring) !important;
  background-image: linear-gradient(135deg, var(--q-stroke)), linear-gradient(45deg, var(--q-stroke)) !important;
}
.q-select-list { position: fixed; inset: auto; margin: 0; display: none; height: auto; min-width: 160px; width: max-content; padding: 6px; scroll-padding-block: 6px; overflow-y: auto; overscroll-behavior: contain; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px var(--q-shadow); font: 13px/1.4 var(--sans); white-space: normal; text-align: start; text-transform: none; letter-spacing: normal; z-index: 1000; }
.q-select-list:popover-open, .q-select-list [role=group] { display: grid; gap: 1px; align-content: start; }
.q-select-option { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 7px 12px 7px 8px; border-radius: 6px; cursor: pointer; user-select: none; --selection: transparent; }
.q-select-tick { display: flex; color: var(--olive); visibility: hidden; }
.q-select-tick .icon { width: 14px; height: 14px; stroke-width: 2; }
.q-select-option[aria-selected='true'] { font-weight: 550; }
.q-select-option[aria-selected='true'] .q-select-tick { visibility: visible; }
.q-select-option.q-select-lit { background: var(--q-hover); }
.q-select-option[aria-disabled='true'] { color: var(--q-disabled); cursor: default; }
.q-select-group { padding: 8px 8px 3px; color: var(--muted); font-size: 11.5px; font-weight: 550; }
.q-select-line { height: 1px; margin: 4px 2px; background: var(--line); }
/* A finger's room on a touch screen, as everything pressed there (phone.css). */
@media (pointer: coarse) { .q-select-option { min-height: 44px; font-size: 15px; } }
@media (forced-colors: active) { .q-select-option.q-select-lit { outline: 2px solid; outline-offset: -2px; } }
