/* Every page is laid out by the design system and the build packs' page layout (design/asset-store.css). What
   follows is the little the product still places itself, each on the system's variables only: a stored picture where
   the system places only a drawing (waiting on the design studio's issue 220), a radio's look the system gets wrong,
   menus opened under their control, and the notices. */

/* A stored picture in an asset tile: placed as the system places a drawing there (".sx-asset__pic > svg"), covering
   the tile as the drawings' "xMidYMid slice" does. Waiting on the design studio's issue 220, which asks for this rule
   in Signal OSX itself; it carries no colour, size or spacing of its own. */
.sx-asset__pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The review queue's picture (.as-qpic, the pack's page layout) holds the stored picture the same way (issue 220). */
.as-qpic > img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A collection card's three pictures (.as-coll__pics, P09) hold the stored pictures the same way. */
.as-coll__pics img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.sx-button { text-decoration: none; }
/* A radio group with nothing chosen yet matches :indeterminate, which the system's form sheet (v0.4) fills like a ticked
   box, so every choice looked chosen. Until the studio settles it in the system, an unchosen radio keeps its empty look. */
.sx-check input[type="radio"]:indeterminate:not(:checked) { border-color: var(--sx-line-field); background-color: transparent; }
/* A menu item that is a button (the brand picker, sign-out) loses the browser's own button look; the system's hover
   and current marks still apply. */
button.sx-menu__item { width: 100%; border: 0; background: transparent; text-align: left; }

.aam-anchor { position: relative; display: inline-flex; }
.aam-menu--below { position: absolute; top: calc(100% + var(--sx-space-1)); left: 0; z-index: 30; min-width: 220px; max-height: 60vh; overflow: auto; }
.aam-menu--end { left: auto; right: 0; }

/* Notices, bottom right, above the page. */
.aam-notices { position: fixed; right: var(--sx-space-6); bottom: var(--sx-space-6); z-index: 50; display: flex; flex-direction: column; gap: var(--sx-space-2); max-width: 420px; }
.aam-notices .sx-message { box-shadow: var(--sx-shadow-menu); }

/* A menu row that holds a control (the language), with the control at the end. */
.aam-menu-row { justify-content: space-between; cursor: default; }
.aam-menu-row:hover { background: transparent; }

/* The product box and focal point (AAM-012), until the studio draws them (studio issue 222): the box is the system's
   preview box; the point is one drawn small and round about its centre; while marking, the picture takes the pointer
   (no scrolling under a finger) and the keyboard. */
.aam-point { width: var(--sx-space-3); height: var(--sx-space-3); border-radius: var(--sx-radius-pill); transform: translate(-50%, -50%); }
.aam-point > .sx-preview__label { left: var(--sx-space-3); top: var(--sx-space-3); white-space: nowrap; }
.aam-marking { cursor: crosshair; touch-action: none; user-select: none; }
/* While marking, the model's own boxes step aside, so only the marks being placed are on the picture. */
.aam-marking > .sx-preview__box:not(.aam-mark):not(.aam-point) { display: none; }

/* On a phone the brand menu runs gutter to gutter under the header (studio issue 219, settled in build pack v3), and so
   does the notifications panel, whose 420px ran off the screen's left edge (design check, issue 70 point 15). */
@media (max-width: 640px) {
  .as-brandmenu, .as-notes { left: var(--sx-space-4); right: var(--sx-space-4); width: auto; }
}
