/* What the product adds to the design system, and the system does not have: the pieces that exist
   because the product is server-rendered and has an installation (a customer's logo, an area that
   has no page yet, a menu written in the page). Tokens only; a rule that could serve another
   product belongs in components.css. */

/* `hidden` must win over the display of a component: the palette, the sheet and the popovers are
   written in the page and shown by the script */
[hidden] { display: none !important; }

/* the customer's logo takes the place of the letter mark, inside the same slot: it keeps the
   mark's height and takes its width from its own proportions, capped so a wordmark cannot push
   the name out of the row */
.brand-mark.brand-mark--logo { width: auto; max-width: 88px; }
.brand-mark.brand-mark--logo img.brand-logo { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.auth-brand .brand-mark.brand-mark--logo { max-width: 132px; }

/* a Customer's wordmark drawn for paper disappears on the dark sidebar (`--bg-side`, #1d1e21)
   and on the dark page before sign-in, so in the dark theme it sits on a light plate: a neutral
   surface for a logo, not an icon in a coloured tile (DIRECTION.md:242). Content-box keeps the
   mark's height: the padding goes around the slot instead of eating into it. */
:root[data-theme='dark'] .brand-mark.brand-mark--logo,
:root[data-theme='dark'] .auth-brand .brand-mark.brand-mark--logo {
  background: var(--white);
  padding: 3px 6px;
  border-radius: var(--r-xs);
  box-sizing: content-box;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .brand-mark.brand-mark--logo,
  :root:not([data-theme='light']) .auth-brand .brand-mark.brand-mark--logo {
    background: var(--white);
    padding: 3px 6px;
    border-radius: var(--r-xs);
    box-sizing: content-box;
  }
}

/* the product's own name while there is no product logo: a wordmark in the place of the
   drawn mark, keeping the line's height and taking the width its name needs */
.brand-mark.brand-mark--word { width: auto; align-items: center; font-weight: 650; letter-spacing: -.02em; }
.auth-brand .brand-mark.brand-mark--word { width: auto; }

/* The sidebar's brand row is the mark (the product's name, while it has no logo) and the installation's
   name beside it. Both at 16 px bold did not fit the 228 px of the row and the installation's name
   broke into two lines taller than the row; it is the second voice of the pair: smaller, medium,
   secondary, and a name that still needs two lines keeps both inside the row's height. */
.sidebar .brand { height: auto; min-height: 34px; }
.sidebar .brand-name { min-width: 0; flex: 1; font-size: var(--t-sub); font-weight: var(--w-medium); line-height: 1.15; letter-spacing: 0; color: var(--label-2); overflow-wrap: anywhere; text-wrap: balance; }

/* the vendor's mark at the foot of the navigation, above the version: «Powered by» in small
   secondary text beside the logo, which keeps its own proportions and is capped so it cannot
   widen the sidebar; the alt says what the image is when it carries the vendor's name */
.vendor-mark { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin: var(--s2) 10px 0; }
.vendor-label { font-size: var(--t-foot); color: var(--label-2); }
.vendor-logo { display: block; width: auto; max-width: 132px; max-height: 20px; object-fit: contain; }

/* the version under the vendor's mark, centred like it, and alone when there is no logo */
.version { text-align: center; }

/* an area that has no page yet: quiet, in the list, and it says why when it is chosen. Its name is
   still text a person reads, so it keeps the contrast of body text (WCAG 1.4.3); only the icon is
   muted. */
.nav-link.is-off { color: var(--label-2); cursor: default; }
.nav-link.is-off .icon { color: var(--label-3); }
.nav-link.is-off:hover { background: transparent; }

/* the menu's items that are radios: the check sits where the icon of a command sits */
.popover form { display: contents; }
.popover .menu-item .icon:empty { display: block; }
.popover .menu-item[aria-checked='true'] { font-weight: var(--w-semibold); }
.user-menu-version { margin: 0; padding-top: var(--s2); }

/* the notifications link in the toolbar: the dot shows only when something is unread */
.bell .bell-dot { display: none; }
.bell.has-unread .bell-dot { display: block; }

/* a toast raised by the server is written in the page and read by the script, never shown as is */

/* the sign-in column: a caution notice next to the negative one, and a second form under the first */
.auth-alert--caution { background: color-mix(in srgb, var(--caution) 9%, transparent); }
.auth-alert--caution .icon { color: var(--caution); }
.auth-alert + .auth-form, .auth-sub + .auth-alert { margin-top: var(--s5); }
.auth-form--second { margin-top: var(--s3); }

/* the show/hide button of a password: the open eye while the password is hidden, the crossed one while shown */
[data-ui-reveal] .reveal-off, [data-ui-reveal][aria-pressed='true'] .reveal-on { display: none; }
[data-ui-reveal][aria-pressed='true'] .reveal-off { display: block; }
