/* The AI Asset Store's mock-ups: page layout only. Every colour, size, weight, corner, shadow and space is a
   Signal OSX variable; check-system-values.cjs must pass on this folder (halden-skin.css aside, which holds the
   example brand's colours). Parts any product could use are in the system: the approved ones in
   system/signal-osx/tokens/ (version 0.5), the proposed ones in system/signal-osx/proposed/signal-osx-assets.css. */

html, body { margin: 0; min-height: 100%; }
.sx-app { position: relative; min-height: 100vh; }

.as-crumb { display: inline-flex; align-items: center; gap: var(--sx-space-2); color: var(--sx-text-2) !important; text-decoration: none; font-size: var(--sx-size-ui); min-height: 24px; }
.as-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sx-space-4); }
.as-head__words { display: flex; flex-direction: column; gap: var(--sx-space-2); min-width: 0; flex: 1 1 420px; }
.as-head__words h1 { margin: 0; overflow-wrap: anywhere; }
.as-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2) var(--sx-space-4); margin: 0; font-size: var(--sx-size-label); color: var(--sx-text-2); }
.as-line > span { display: inline-flex; align-items: center; gap: var(--sx-space-1); }
.as-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2); }
.as-row--between { justify-content: space-between; }
.as-stack { display: flex; flex-direction: column; gap: var(--sx-space-3); min-width: 0; }
.as-stack--loose { gap: var(--sx-space-6); }
.as-stack > p { margin: 0; }
.as-label { margin: 0; font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); letter-spacing: var(--sx-tracking-caps); text-transform: uppercase; color: var(--sx-muted); }

/* The Library: search on top, filters, then the grid */
.as-search { flex: 1 1 480px; }
.as-search input { width: 100%; }
.as-row .sx-select { width: auto; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: var(--sx-space-4); margin: 0; padding: 0; list-style: none; }
.as-grid .sx-asset__pic { aspect-ratio: 16 / 9; }

/* The brand selector, open: placed under its switch in the header */
.as-brandmenu { position: absolute; top: calc(var(--sx-header-height) - var(--sx-space-2)); left: 452px; width: 280px; z-index: 5; display: flex; flex-direction: column; gap: var(--sx-space-1); }
.as-brandmenu .sx-input { margin-bottom: var(--sx-space-1); }
.as-brandmenu__list { display: flex; flex-direction: column; gap: var(--sx-space-1); }
.as-menu-child { padding-left: var(--sx-space-8); }

/* An asset: the picture on the left, its record on the right */
.as-asset { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "main side" "more side"; gap: var(--sx-space-6) var(--sx-space-8); align-items: start; }
.as-asset__main { grid-area: main; }
.as-asset__side { grid-area: side; }
.as-asset__more { grid-area: more; }
.as-box { display: flex; flex-direction: column; gap: var(--sx-space-3); padding: var(--sx-space-5); border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card); }
.as-box > h2 { margin: 0; font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); letter-spacing: var(--sx-tracking-caps); text-transform: uppercase; color: var(--sx-muted); }
.as-box > p { margin: 0; }
.as-answer { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-answer .sx-mayuse { font-size: var(--sx-size-body); font-weight: var(--sx-weight-medium); }
.as-answer p { margin: 0; }
.as-section { display: flex; flex-direction: column; gap: var(--sx-space-3); padding-top: var(--sx-space-5); border-top: 1px solid var(--sx-line); }
.as-section > h2 { margin: 0; }
.as-section > p { margin: 0; }

/* Upload */
.as-upload { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sx-space-8); align-items: start; }
.as-drop { min-height: 240px; justify-content: center; }

/* The index page */
.as-index { display: flex; flex-direction: column; gap: var(--sx-space-8); }
.as-index ul { margin: 0; padding-left: var(--sx-space-5); display: flex; flex-direction: column; gap: var(--sx-space-1); }

/* A page that is only a message */
.as-solo { display: flex; justify-content: center; padding-top: var(--sx-space-10); }
.as-solo > div { max-width: 520px; }

@media (max-width: 1279px) {
  .as-asset { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: var(--sx-space-6); }
}
@media (max-width: 1023px) {
  .as-asset, .as-upload { grid-template-columns: minmax(0, 1fr); }
  .as-asset { grid-template-rows: auto; grid-template-areas: "main" "side" "more"; }
}
@media (max-width: 767px) {
  .sx-main { padding: var(--sx-space-5) var(--sx-space-4); }
  .as-head { flex-direction: column; align-items: stretch; }
  .as-head__words { flex-basis: auto; }
  .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sx-space-2); }
  .as-filters { flex-wrap: nowrap; overflow-x: auto; }
  .sx-decide__options { grid-template-columns: minmax(0, 1fr); }
  .sx-decide__option { min-height: 0; }
}

/* A choice set inside a section, and a single button under it */
.as-section fieldset { margin: 0; padding: 0; border: 0; }
.as-section > .sx-button { align-self: flex-start; }

/* A link with an icon (a document, or a piece that opens in Content Studio): space the icon from the words */
.as-section a:has(> svg) { display: inline-flex; align-items: center; gap: var(--sx-space-1); }
/* A message in the record column: its buttons go under the words when the column is too narrow for both */
.as-asset__side .sx-message { flex-wrap: wrap; }
.as-asset__side .sx-message__text { flex: 1 1 70%; }
.as-asset__side .sx-message > .sx-button, .as-asset__side .sx-message > .sx-actions { margin-left: auto; }

/* Versions, keywords by where they came from, and the text read from the picture */
.as-stack--tight { gap: var(--sx-space-1); }
.as-stack--tight > .sx-button { align-self: flex-start; }
.as-attention { color: var(--sx-attention-text); }
.as-kwgroup { gap: var(--sx-space-1); }
.as-textlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-textlist li { display: flex; flex-direction: column; gap: var(--sx-space-1); }
.as-textlist__text { color: var(--sx-text); }

/* The second batch (P05 Review queue, P01 Signed out, P06 Brand kit) */
.as-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.as-measure { max-width: 72ch; margin: 0; }
.as-centre { margin: 0; text-align: center; }
.as-flush { margin: 0; }
.as-batch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sx-space-3) var(--sx-space-6);
  padding: var(--sx-space-4) var(--sx-space-5); border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card); }
.as-batch > .as-stack { flex: 1 1 420px; }
.as-batch__title { font-weight: var(--sx-weight-medium); }
.as-queue td { vertical-align: top; }
.as-pickcell { width: 1%; }
.as-qasset { display: flex; align-items: flex-start; gap: var(--sx-space-3); color: inherit; text-decoration: none; min-width: 0; }
.as-qasset__title { color: var(--sx-text); font-weight: var(--sx-weight-medium); overflow-wrap: anywhere; }
.as-qasset:hover .as-qasset__title { text-decoration: underline; }
.as-qpic { flex: 0 0 112px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--sx-radius-box); background: var(--sx-well); }
.as-qpic > svg { display: block; width: 100%; height: 100%; }
.as-flags { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-flags li { display: flex; align-items: flex-start; gap: var(--sx-space-2); }
.as-flags li > svg { flex: none; margin-top: var(--sx-space-1); color: var(--sx-attention-mark); }
.as-headlink { font-size: var(--sx-size-ui); }
.as-kitgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.as-kititem { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-kititem > .as-row { gap: var(--sx-space-1); }

/* The later pages (P07 to P15, DWO-20261116-064) */
.as-gap { display: inline-flex; align-items: center; min-width: 24px; justify-content: center; color: var(--sx-muted); }
.as-qpic--plain { display: flex; align-items: center; justify-content: center; color: var(--sx-muted); }
.as-qpic--plain > svg { width: 20px; height: 20px; }
.as-pieces { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-pieces li { display: flex; flex-direction: column; gap: var(--sx-space-1); }
.as-pieces a { display: inline-flex; align-items: center; gap: var(--sx-space-1); }
.as-strong { color: var(--sx-text); font-weight: var(--sx-weight-medium); }
.as-find { flex: 1 1 360px; max-width: 520px; }
.as-find input { width: 100%; }
.as-dialog { width: 560px; }
.as-drop--small { min-height: 0; }
.as-start { align-self: flex-start; }
/* What waits for me: two columns of boxes */
.as-desk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sx-space-5); align-items: start; }
.as-desklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-4); }
.as-desklist > li { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.as-more { display: inline-flex; align-items: center; gap: var(--sx-space-1); font-size: var(--sx-size-ui); white-space: nowrap; }
.as-setup { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-3); max-width: 880px; }
.as-setup__step { flex-direction: row; align-items: center; gap: var(--sx-space-5); }
.as-setup__step > .as-stack { flex: 1 1 auto; }
.as-setup__n { flex: none; width: 32px; height: 32px; border-radius: var(--sx-radius-pill); display: flex; align-items: center; justify-content: center;
  background: var(--sx-selected); color: var(--sx-text); font-weight: var(--sx-weight-medium); }
/* Collections */
.as-colls { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sx-space-4); }
.as-coll { display: flex; flex-direction: column; gap: var(--sx-space-2); padding: var(--sx-space-3); border-radius: var(--sx-radius-card);
  background: var(--sx-raised); box-shadow: var(--sx-shadow-card); color: inherit; text-decoration: none; }
.as-coll:hover .as-coll__name { text-decoration: underline; }
.as-coll__pics { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--sx-space-1); aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--sx-radius-box); }
.as-coll__pics > span { background: var(--sx-well); overflow: hidden; }
.as-coll__pics > span:first-child { grid-row: span 2; }
.as-coll__pics svg { display: block; width: 100%; height: 100%; }
.as-coll__name { color: var(--sx-text); font-weight: var(--sx-weight-medium); }
.as-order { display: inline-flex; min-width: 24px; justify-content: center; color: var(--sx-text-2); }
/* People and roles */
.as-person { display: flex; align-items: center; gap: var(--sx-space-3); min-width: 0; overflow-wrap: anywhere; }
.as-person .sx-avatar { flex: none; }
.as-rolerow { display: grid; grid-template-columns: minmax(0, 1fr) 180px 32px; align-items: center; gap: var(--sx-space-2); }
/* Settings */
.as-boxfoot { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-3); padding: var(--sx-space-4) var(--sx-space-5); }
.as-child { color: var(--sx-muted); margin-right: var(--sx-space-2); }
.as-chanlist { display: flex; flex-wrap: wrap; gap: var(--sx-space-2); padding: var(--sx-space-4) var(--sx-space-5); border-bottom: 1px solid var(--sx-line-row); }
.as-short { width: 220px; }
/* A partner's upload page */
.as-quote { margin: 0; padding: var(--sx-space-3) var(--sx-space-4); border-left: 2px solid var(--sx-line-box); display: flex; flex-direction: column; gap: var(--sx-space-1); color: var(--sx-text); overflow-wrap: anywhere; }
/* Connections */
.as-conn__mark { display: inline-flex; color: var(--sx-text-2); }
.as-conn h3 { overflow-wrap: anywhere; }
/* Notifications: the panel under the bell, and the bell's count */
.as-notes { position: absolute; top: calc(var(--sx-header-height) - var(--sx-space-2)); right: var(--sx-space-4); width: 420px; z-index: 5; padding: 0; gap: 0; }
.as-notes__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-3); padding: var(--sx-space-3) var(--sx-space-4); border-bottom: 1px solid var(--sx-line); }
.as-notes__list { margin: 0; padding: var(--sx-space-1); list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-1); }
.as-note { display: flex; align-items: flex-start; gap: var(--sx-space-3); padding: var(--sx-space-3); border-radius: var(--sx-radius-control); color: inherit; text-decoration: none; }
.as-note:hover { background: var(--sx-selected); }
.as-note > svg { flex: none; margin-top: var(--sx-space-1); color: var(--sx-text-2); }
.as-note--unread { background: var(--sx-selected); }
.as-note__text { color: var(--sx-text-2); overflow-wrap: anywhere; }
.as-notes__empty { display: flex; align-items: flex-start; gap: var(--sx-space-3); padding: var(--sx-space-5) var(--sx-space-4); color: var(--sx-text-2); }
.as-notes__empty p { margin: 0; }
.as-notes__foot { padding: var(--sx-space-3) var(--sx-space-4); border-top: 1px solid var(--sx-line); font-size: var(--sx-size-ui); }
.as-bell { position: absolute; top: 8px; right: 12px; z-index: 6; min-width: 18px; height: 18px; padding: 0 var(--sx-space-1); border-radius: var(--sx-radius-pill);
  display: inline-flex; align-items: center; justify-content: center; background: var(--sx-text); color: var(--sx-surface); font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); }
.as-faded { opacity: 0.5; }

/* Later pages on a phone (rule R1, studio issue 242 point 4): What waits for me in one column, an asset's line
   wraps under its title, and the notifications panel runs gutter to gutter. Kept last so it wins over the rules above. */
@media (max-width: 767px) {
  .as-desk { grid-template-columns: minmax(0, 1fr); }
  .as-qasset .as-row { flex-wrap: wrap; }
  .as-notes { left: var(--sx-space-4); right: var(--sx-space-4); width: auto; }
}
