/* What a person reads or operates on EVERY page: the wordmark, an icon, a
 * status, a label and its field. One definition, loaded by the console, by the
 * three sign-in pages and by the end user's own page.
 *
 * WHY THIS IS ITS OWN FILE. These lived in components.css, which only the
 * console loads, and each other page carried its own copy of an input and a
 * label (auth.css, enduser.css). The copies had drifted: three heights of
 * text field and two spellings of a muted grey. It is the reason buttons.css
 * exists, one step further: a class a page uses and a stylesheet it loads are
 * two lists nothing compiles together, so there is one stylesheet for the
 * things every page uses.
 *
 * No literal colour. Every value resolves through tokens.css, or is mixed
 * from a token.
 */

:root {
  --tint:       color-mix(in srgb, var(--accent) 7%, var(--ink-2));
  --hover:      color-mix(in srgb, var(--fg) 4%, transparent);
  --shadow-pop: 0 10px 28px color-mix(in srgb, var(--fg) 13%, transparent);
}

.mono { font-size: 12.5px; }
.muted { color: var(--fg-3); }
.nowrap { white-space: nowrap; }

/* Icons. One sprite, drawn once by console/_icons.html; an icon takes its
   colour from the text around it. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor;
     stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 14px; height: 14px; }


/* The wordmark. Michroma, which is for the wordmark, the console's rail and
   the session strip, and for nothing a person reads as a sentence. */
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand img { height: 22px; width: auto; }
.brand .word { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; color: var(--fg); }

/* Status and tags -------------------------------------------------------- */
.st-in-use   { --st: var(--st-in-use); }
.st-idle     { --st: var(--st-idle); }
.st-degraded { --st: var(--st-degraded); }
.st-offline  { --st: var(--st-offline); }
.st-unknown  { --st: var(--st-unknown); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--st, var(--fg-3)); }
/* The word is not optional. Colour is never the only signal. */
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--st, var(--fg-2)); font-size: 13px; font-weight: 600; white-space: nowrap; }
/* A neutral label, for a fact that is not a status. Deliberately not styled
   like .status: how a desktop connects is not a health state. */
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border: 1px solid var(--line-2); border-radius: 5px;
  font-size: 11.5px; font-weight: 500; letter-spacing: 0; color: var(--fg-2);
}

/* Fields ----------------------------------------------------------------- */
/* A visible label above every control, and a hint under it. A placeholder is
   an example, never the label: it is gone the moment somebody types. */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 20px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--fg); }
.field .opt { font-weight: 400; color: var(--fg-3); }
.field .hint { font-size: 12.5px; line-height: 1.45; color: var(--fg-2); }
/* A column stretches its children, and a stretched control reads as a field. */
.field > .seg, .field > .btn { align-self: flex-start; }
.input, .select {
  height: 36px; width: 100%; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background-color: var(--ink-2); color: var(--fg); font: inherit; font-size: 14px;
}
.input.is-mono { font-family: var(--font-mono); font-size: 13px; }
.input::placeholder { color: var(--fg-3); }
.input.is-short { width: 96px; }
/* A pasted certificate or provider metadata: several lines, so it grows. */
.input.is-textarea { height: auto; min-height: 96px; padding: 8px 11px; line-height: 1.45; resize: vertical; }
/* The browser's select, restyled. The chevron is two borders, so it takes its
   colour from a token like everything else. */
.select-wrap { position: relative; display: block; }
.select-wrap.is-inline { display: inline-block; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; }
.select-wrap::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 6px; height: 6px;
  border-right: 1.75px solid var(--fg-2); border-bottom: 1.75px solid var(--fg-2);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.with-unit { display: flex; align-items: center; gap: 8px; }
.with-unit .unit { font-size: 13px; color: var(--fg-2); }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 24px; font-size: 13.5px; color: var(--fg); }
.choice input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.choice .select { height: 32px; width: auto; font-size: 13.5px; }

fieldset.group { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
fieldset.group > legend {
  padding: 0 0 10px; margin: 0 0 16px; width: 100%;
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  border-bottom: 1px solid var(--line);
}
.formfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.formfoot .spacer { flex: 1; }

/* Empty ------------------------------------------------------------------ */
/* An empty state says what is true and what to do next. */
.empty { padding: 26px 16px; text-align: center; font-size: 13px; color: var(--fg-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty b, .empty strong { display: block; color: var(--fg); font-weight: 600; margin-bottom: 2px; }
.empty .btn { margin-top: 12px; }

