/* AVERA 0.7.3 · rev229 · stage 1 «Слои». Styles that the layer engine (avera-layers.js) relies on.
   Everything here is scoped to attributes the engine sets on user layers only; admin and login are never marked. */
@property --av-layer-bd{syntax:'<number>';inherits:true;initial-value:1}

/* Backdrop follows the surface on exit and during the swipe. */
dialog[data-av-bd]::backdrop{animation:none!important;opacity:var(--av-layer-bd,1)!important}

/* A leaving layer is painted for its exit only: inert, no hits, already closed for the app. */
[data-av-closing]{pointer-events:none!important}
.roleOverlay[data-av-closing],.notice-center-overlay[data-av-closing],.notice-overlay[data-av-closing],.pak-t-overlay[data-av-closing]{display:flex!important}
.roleOverlay[data-av-closing],.notice-center-overlay[data-av-closing],.notice-overlay[data-av-closing],.pak-t-overlay[data-av-closing],
.roleOverlay[data-av-closing]>*,.notice-center-overlay[data-av-closing]>*,.notice-overlay[data-av-closing]>*,.pak-t-overlay[data-av-closing]>*{animation:none!important}

/* Layer stack: the top layer rises on its own path and lets the lower layer carry the dimming. */
dialog[data-av-stack="top"],dialog[data-av-stack="top"]::backdrop{animation:none!important}
dialog[data-av-stack="top"]::backdrop{background:transparent!important}
dialog[data-av-stack="top"]{box-shadow:0 -14px 40px -22px rgba(8,30,40,.55),var(--av-shadow-modal,0 18px 50px rgba(8,30,40,.22))}
.roleOverlay[data-av-stack="top"],.notice-overlay[data-av-stack="top"],.pak-t-overlay[data-av-stack="top"]{background:transparent!important;animation:none!important}
.roleOverlay[data-av-stack="top"]>*,.notice-overlay[data-av-stack="top"]>*,.pak-t-overlay[data-av-stack="top"]>*{animation:none!important}
dialog[data-av-stack="under"],[data-av-stack="under"]>.roleBox,[data-av-stack="under"]>.notice-center-dialog,[data-av-stack="under"]>.notice-dialog,[data-av-stack="under"]>.pak-t-sheet{transform-origin:50% 0;will-change:transform,filter}

/* Swipe-to-close handle: the sheet header carries a quiet grabber. */
.av-layer-grab{touch-action:none;cursor:grab}
.av-layer-grab::after{content:"";position:absolute;left:50%;top:6px;width:36px;height:4px;margin-left:-18px;border-radius:99px;
  background:color-mix(in srgb,var(--av-text-muted,#7a8e95) 34%,transparent);pointer-events:none}
.av-layer-grab:active{cursor:grabbing}

/* Messages. The toast lives in the top layer (popover) so it is seen above open windows; it never takes taps. */
#toast[popover]{inset:auto auto calc(var(--av-mobile-dock-clearance,100px) + env(safe-area-inset-bottom)) 50%;
  margin:0 0 var(--av-dock-toast,0px);border:0;overflow:visible;pointer-events:none}
#toast[popover]:popover-open{display:block}
/* Until rev228 the toast was the only square surface in the app; it now shares the card radius. */
#toast[popover]{border-radius:14px}
/* Week banner. Up to rev228 it had no styles at all and fell to the end of the page, off screen. It is a quiet card
   above the bottom navigation: what happened, which week, «Посмотреть», close. */
.aw-snackbar{position:fixed;z-index:1100;left:12px;right:12px;bottom:calc(var(--av-mobile-dock-clearance,100px) + env(safe-area-inset-bottom));
  max-width:560px;margin:0 auto;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto 40px;align-items:center;gap:6px 10px;
  padding:12px 10px 12px 16px;border-radius:20px;background:var(--av-surface-1,#fff);color:var(--av-text-primary,#203640);
  box-shadow:var(--av-shadow-modal,0 18px 40px -18px rgba(8,30,40,.45));will-change:transform,opacity}
.aw-snackbar>[role="status"]{display:grid;gap:2px;min-width:0}
.aw-snackbar>[role="status"] b{font-size:14.5px;line-height:1.3;font-weight:700;letter-spacing:-.01em}
.aw-snackbar>[role="status"] span{font-size:13px;line-height:1.3;color:var(--av-text-muted,#5b7280)}
.aw-snackbar [data-aw-view]{min-height:40px;padding:0 14px;border:0;border-radius:12px;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;
  color:var(--av-primary-ink,#fff);background:var(--av-primary-gradient,var(--av-accent,#007f84));box-shadow:var(--av-shadow-primary,none)}
.aw-snackbar [data-aw-dismiss]{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:12px;cursor:pointer;
  color:var(--av-text-muted,#5b7280);background:transparent}
.aw-snackbar [data-aw-dismiss]:focus-visible,.aw-snackbar [data-aw-view]:focus-visible{outline:2px solid var(--av-accent,#007f84);outline-offset:2px}
@media (max-width:340px){.aw-snackbar{grid-template-columns:minmax(0,1fr) 40px}.aw-snackbar [data-aw-view]{grid-column:1/-1;grid-row:2}}
/* Bottom dock: the update offer keeps its place; the week banner and the toast rise above it instead of covering it. */
#averaWeekSnackbar{margin-bottom:var(--av-dock-plaque,0px)}
#averaWeekSnackbar[data-av-msg="leaving"],#avera-update-ready[data-av-msg="leaving"]{pointer-events:none}
#averaWeekSnackbar[data-av-swipe]{touch-action:pan-y}

@media (prefers-reduced-motion:reduce){
  dialog[data-av-stack="top"]{box-shadow:var(--av-shadow-modal,0 18px 50px rgba(8,30,40,.22))}
}
