/* Callout of the Unisson documentation model (.callout, .callout.warn, .callout code). Colours through the --pack-*
   tokens only: the model's docs additions --warn, --warnbg and --infobg are mixes of --pack-c4 and --pack-c1. No motion. */
:host {
  --mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* --warn: c4 in dark; in light, c4 a step darker (the model's light warning pink is c4 with 0.072 less lightness, 0.019 less
     chroma, its hue 2.5 degrees further). --warnbg: c4 at 9 % in dark, 7 % in light. */
  --warn: light-dark(oklch(from var(--pack-c4) calc(l - 0.0717) calc(c - 0.0186) calc(h + 2.455)), var(--pack-c4));
  --warnbg: light-dark(color-mix(in oklch, var(--pack-c4) 7%, transparent), color-mix(in oklch, var(--pack-c4) 9%, transparent));
  --infobg: color-mix(in oklch, var(--pack-c1) 7%, transparent);
  display: block;
  color: var(--pack-ink);
  font: 16px / 1.6 var(--sans);
  font-feature-settings: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
:host([hidden]) {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
p {
  margin: 0;
}
.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin-block-start: 22px;
  /* A host stretched by a grid row (the two callouts of bythium-pack-doc-head) is filled, as the model's grid items
     are; anywhere else the host's height is auto and the percentage resolves to nothing. */
  min-block-size: calc(100% - 22px);
  align-content: start;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pack-line2);
  background: var(--infobg);
}
[part="icon"] {
  grid-row: span 2;
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border-radius: 9px;
  color: var(--pack-btnink);
  /* In sRGB: the tokens are oklch, which gradients would otherwise blend in oklab; the model blends its hex in sRGB. */
  background: linear-gradient(in srgb 135deg, var(--pack-btn1), var(--pack-btn2));
}
/* Heading and paragraphs stay in the second column, however many paragraphs follow the icon. */
[part="heading"] {
  grid-column: 2;
  font: 700 13px var(--mono);
  letter-spacing: 0.04em;
  color: var(--pack-ink);
}
[part="text"] {
  grid-column: 2;
  color: var(--pack-ink);
  font-size: 15px;
}
/* As .callout p + p in the model: the text sits 6 px under the heading, and each paragraph under the previous one. */
p + p {
  /* 6 px in documentation.html; a layout may set another gap through --pack-callout-text-gap: 0 in the Playground
     model, whose .callout has no p + p rule, and in the catalogue model (set by bythium-pack-docs layout="catalog"). */
  margin-block-start: var(--pack-callout-text-gap, 6px);
}
/* flush: the Studio pages' callout, set in a grid, with neither the gap above nor the one under the heading. */
:host([flush]) .callout {
  margin-block-start: 0;
}
:host([flush]) p + p {
  margin-block-start: 0;
}
.warn {
  border: 1px dashed var(--warn);
  background: var(--warnbg);
}
.warn [part="icon"] {
  background: transparent;
  color: var(--warn);
  border: 1px solid var(--warn);
}
.warn [part="heading"] {
  color: var(--warn);
}
code {
  font: 600 0.9em var(--mono);
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--pack-panel2);
  border: 1px solid var(--pack-line);
}
@media (forced-colors: active) {
  .callout,
  .warn,
  [part="icon"],
  code {
    border-color: CanvasText;
  }
}
