/* AVERA 0.7.3 · rev231 · stage 2 «Пространство». Styles the space engine (avera-space.js) relies on.
   Everything here is scoped to classes and attributes the engine sets for the time of a motion; nothing is persistent. */

/* Depth: the live elements travel in place over an opaque floor; the old screen is an inert copy under them (push)
   or over them (back). The container is a stacking context, so copy and floor never cover the live content. */
.av-space-depth{position:relative;overflow:clip;isolation:isolate}
.av-space-depth>.av-space-ghost{position:absolute;left:0;right:0;top:0;box-sizing:border-box;pointer-events:none;z-index:-2;will-change:transform,opacity}
.av-space-depth>.av-space-floor{position:absolute;inset:0;z-index:-1;pointer-events:none;will-change:transform;box-shadow:-18px 0 30px -24px rgba(10,30,40,.5)}
.av-space-depth.av-space-depth--back>.av-space-ghost{z-index:3;box-shadow:-18px 0 30px -24px rgba(10,30,40,.5)}
.av-space-depth.av-space-depth--back>.av-space-floor{box-shadow:none}
.av-space-ghost *{animation:none!important;transition:none!important}
/* nested screens own the horizontal drag (drag back); vertical scroll stays with the page */
.settings-preferences-page{touch-action:pan-y pinch-zoom}

/* A panel that leaves (tab change) is a copy laid over the place it occupied. */
.av-space-anchor{position:relative}
.av-space-ghost--panel{position:absolute;z-index:0;pointer-events:none;box-sizing:border-box}

/* Capsule: one surface slides between tabs; the selected tab lets it carry the background meanwhile. */
/* rev237: the host keeps its own positioning (the KTP tab bar is sticky); only a static host is anchored */
.av-cap-host{isolation:isolate}
.av-cap-anchor{position:relative}
.av-cap{position:absolute;left:0;top:0;z-index:0;pointer-events:none;will-change:transform,width}
.av-cap-host [data-hub-tab],.av-cap-host [data-study-tab],.av-cap-host [data-group-study],.av-cap-host [data-at-range],.av-cap-host [data-help-filter],
.av-cap-host [data-avk-tab],.av-cap-host [data-avk-list-tab],.av-cap-host [data-avk-sem],.av-cap-host [data-mg="mode"],.av-cap-host [data-dp-mode]{position:relative;z-index:1}
/* rev237: the panel that leaves a unified tab change stays where it was on screen, under the sticky bars */
.av-space-ghost--fixed{position:fixed;z-index:1;pointer-events:none;box-sizing:border-box;margin:0;will-change:transform,opacity}
[data-av-cap-sel]{background:transparent!important;background-image:none!important;box-shadow:none!important}

/* Periods: the previous month stays while the next one loads, quietly dimmed after a short moment. */
[data-av-period-busy]>*{transition:opacity 180ms cubic-bezier(.2,.8,.2,1) 160ms}
[data-av-period-busy]>[inert]{opacity:.55}
.at-week-label{overflow:hidden}
.av-roll{font-variant-numeric:tabular-nums}

/* Height: the card clips its content while it grows or shrinks. */
.av-space-grow{overflow:hidden}

/* Attendance marking: the tint flows, the row is pressed under the finger, rows never move. */
.av-mark-live .at-row{transition:background-color 180ms cubic-bezier(.2,.8,.2,1),transform 120ms cubic-bezier(.2,.8,.2,1)}
.av-mark-live .at-row.is-pressing{transform:scale(.985)}
.av-mark-live .at-row .at-avatar{transition:background-color 180ms cubic-bezier(.2,.8,.2,1),color 180ms cubic-bezier(.2,.8,.2,1)}
.av-mark-live .at-row[data-state="A"] .at-avatar{background:color-mix(in srgb,var(--av-danger) 14%,var(--av-surface-elevated));color:var(--av-danger)}
.av-mark-live .at-row[data-state="L"] .at-avatar{background:color-mix(in srgb,var(--av-warning) 14%,var(--av-surface-elevated));color:var(--av-warning)}
.av-mark-live .at-row .at-state{display:inline-block}

@media (prefers-reduced-motion:reduce){
  .av-mark-live .at-row,.av-mark-live .at-row .at-avatar,[data-av-period-busy]>*{transition:none!important}
  .av-mark-live .at-row.is-pressing{transform:none}
}
