/* ── Keymono shared components ────────────────────────────────────────────
   Styles for the components in common:vaadin. Separate from
   keymono-brand.css, which answers what the brand is; this file answers how
   our components are built. Both apps load both.

   Everything here is a class the Java side attaches by name. Java sets no
   style properties of its own — appearance is decided here, state is decided
   there.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Buttons ──
   A button that reads as text (Buttons.text): tertiary already removes background and border,
   this removes the space a standalone button reserves around its label, and keeps it as wide
   as its label in a column. Aura has no theme variant for it; `tertiary-inline` exists as a
   Lumo name only. */
vaadin-button.km-text-button {
  /* Aura's small variant sets padding itself, so the variable alone does not reach it. */
  --vaadin-button-padding: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  vertical-align: baseline;
  align-self: flex-start;
}

/* ── Recurring text and surface shapes ──
   Named once here because both applications reach for them; a view that wants
   quiet text asks for the class, not for a colour. */

.km-text-secondary {
  color: var(--vaadin-text-color-secondary);
}

.km-text-strong {
  font-weight: var(--aura-font-weight-semibold);
}

.km-text-danger {
  color: var(--aura-red-text);
}

/* Text that arrived with its own line breaks — API descriptions, model output. */
.km-text-preserve-lines {
  white-space: pre-wrap;
}

/* ── BaseCardView ── */

/* The scroller gives the content its height; without border-box the padding
   is added on top of it and the last field ends up beyond the scroll range.
   The padding is the page gutter, so a card on a phone keeps 16px from the edge. */
.km-card-content {
  box-sizing: border-box;
  padding: max(var(--vaadin-padding-l), 1rem);
}

/* ── Forms ── */

.km-form-error {
  color: var(--aura-red-text);
  text-align: center;
}

.km-form-note {
  color: var(--vaadin-text-color-secondary);
  font-size: var(--aura-font-size-s);
}

.km-form-note-warn {
  color: var(--k-yellow);
}

.km-form-actions {
  margin-top: var(--vaadin-gap-l);
}

/* The pieces of a form — fields, notes, errors, actions — one gap apart, whatever container holds
   them. A stack with its own gap cannot also rely on the children's margins. */
.km-form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--vaadin-gap-l);
}

/* A label, its hint and its field: closer than the fields of a form are to one another. */
.km-field-stack {
  display: flex;
  flex-direction: column;
  gap: var(--vaadin-gap-xs);
}

/* A card whose body is a form (BaseCardView, a setup step, a link builder): the card's content part
   is a column with the form gap, so every child is spaced alike and a hidden one takes no space. The
   head's own bottom margin is dropped because the gap supplies it. */
vaadin-card.km-card-form::part(content) {
  display: flex;
  flex-direction: column;
  gap: var(--vaadin-gap-l);
}

.km-card-form > .km-head {
  margin-bottom: 0;
}

/* The gap alone spaces a stack's paragraphs and its action bar. */
:is(.km-form-stack, .km-field-stack, .km-card-form, .km-view) > p {
  margin: 0;
}

:is(.km-form-stack, .km-card-form, .km-view) > .km-form-actions {
  margin-top: 0;
}

/* ── Pagination ── */

/* Arrows, page numbers and the current page: one square box, the small button's height. The
   doubled selector outweighs the text button's own height rules. */
.pagination vaadin-button,
.pagination vaadin-button.km-text-button {
  --vaadin-button-padding: 0;
  padding: 0;
  min-width: 1.875rem;
  min-height: 1.875rem;
  height: auto;
  align-self: center;
}

.km-pagination-group {
  gap: 2px;
}

.km-pagination-info {
  white-space: nowrap;
  color: var(--vaadin-text-color-secondary);
  font-size: var(--aura-font-size-s);
}

/* ── Table cells ── */

.km-cell-tags {
  flex-wrap: wrap;
  gap: 4px;
}

.km-cell-image-round {
  border-radius: 50%;
}

/* A value in the mono face: an identifier or a figure that is read character by character. */
.km-mono { font-family: var(--font-mono); }

/* ── Money ──
   An amount drawn by Money: the digits line up in tabular numerals, the sign
   carries the colour. Right alignment is the column's, not the span's, so the
   same amount also sits inline in a tile or a sentence. */

.km-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.km-amount-pos { color: var(--k-green); }
.km-amount-neg { color: var(--k-coral); }

/* ── HoverImage ──
   The picture keeps the size its caller's class gives it. The overlay is one
   element in the body, shared by every picture; its position follows the
   cursor and is set from JavaScript, its appearance is here. The backdrop is
   white because product art arrives as transparent PNGs that vanish against
   the dark canvas. A missing picture is the placeholder and does not enlarge. */

.km-hover-thumbnail {
  cursor: zoom-in;
}

.km-hover-thumbnail[data-missing] {
  cursor: default;
}

.km-hover-enlarged {
  display: block;
  max-width: 400px;
  max-height: 300px;
  object-fit: contain;
}

.km-hover-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: white;
  border: 1px solid var(--vaadin-border-color);
  border-radius: var(--vaadin-radius-m);
  box-shadow: var(--aura-shadow-m);
  padding: var(--vaadin-gap-s);
}

.km-hover-overlay-visible {
  display: block;
}

/* ── EmptyState ── */

.km-empty-state {
  min-height: 200px;
}

/* ── Layout vocabulary ──
   A view is a column of sections (Aura cards); a section has a head; grids and fields sit on the
   card's surface; long grids are bounded and scroll inside; columns stack when narrow; an editor's
   decision stays in reach. The Java side is keymono.common.vaadin.ui.layout. */

/* The view, and a column inside one. min-width 0 lets a column shrink below its widest grid. */
.km-view {
  display: flex;
  flex-direction: column;
  gap: var(--vaadin-gap-l);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* A section spans whatever contains it; min-width 0 lets it shrink inside a grid column. */
vaadin-card[data-section] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* A card whose form is open wears the accent border; one that needs action, the warn colour. */
vaadin-card[data-section][data-state="editing"] {
  --vaadin-card-border-color: oklch(from var(--k-coral) l c h / 0.7);
}

vaadin-card[data-section][data-state="warn"] {
  --vaadin-card-border-color: oklch(from var(--k-yellow) l c h / 0.6);
}

/* The row of a card's form buttons, under a rule. */
.km-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--vaadin-gap-s);
  margin-top: var(--vaadin-gap-m);
  padding-top: var(--vaadin-gap-m);
  border-top: 1px solid var(--vaadin-border-color-secondary);
}

/* Fields that belong in one row: two equal columns, or 1fr/2fr (postal code and city); one column
   when narrow. */
.km-form-grid {
  --km-form-columns: repeat(2, minmax(0, 1fr));
  display: grid;
  grid-template-columns: var(--km-form-columns);
  gap: var(--vaadin-gap-l);
}

.km-form-grid-narrow-first {
  --km-form-columns: minmax(0, 1fr) minmax(0, 2fr);
}

.km-form-grid-wide-first {
  --km-form-columns: minmax(0, 2fr) minmax(0, 1fr);
}

@media (max-width: 600px) {
  .km-form-grid {
    --km-form-columns: minmax(0, 1fr);
  }
}

/* Label and value side by side; stacked when narrow. A key and its value are siblings, in pairs;
   a .km-kv-pair wrapping both takes no box of its own. */
.km-kv {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  font-size: 15px;
}

.km-kv > *,
.km-kv-pair > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.km-kv-pair {
  display: contents;
}

.km-kv-key {
  color: var(--vaadin-text-color-secondary);
  font-size: 14px;
}

@media (max-width: 480px) {
  .km-kv {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .km-kv-key {
    margin-top: 8px;
  }

  .km-kv > :first-child,
  .km-kv > :first-child > .km-kv-key:first-child {
    margin-top: 0;
  }
}

/* A darker box with a fainter border and a smaller radius than a card. The one box allowed inside a
   card; on the page background it is the figure tile. */
.km-group {
  box-sizing: border-box;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--vaadin-border-color-secondary);
  border-radius: var(--vaadin-radius-m);
  background: oklch(from var(--k-darkblue) calc(l - 0.1) c h / 0.7);
}

/* Section head: title, aside beside it, actions at the far end. */
.km-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--vaadin-gap-xs) var(--vaadin-gap-s);
  margin-bottom: var(--vaadin-gap-m);
}

.km-head h2 {
  margin: 0;
  font-size: var(--aura-font-size-m);
}

/* A title that opens and closes its section: a chevron before it, turned down while the section is open. */
.km-head-toggle h2 {
  cursor: pointer;
  user-select: none;
}

.km-head-toggle h2::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15em) rotate(-45deg);
  transition: transform 150ms ease;
}

.km-head-toggle[data-open="true"] h2::before {
  transform: translateY(-0.3em) rotate(45deg);
}

.km-head-toggle[data-open="false"] {
  margin-bottom: 0;
}

.km-head-aside {
  color: var(--vaadin-text-color-secondary);
  font-size: var(--aura-font-size-s);
}

.km-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vaadin-gap-s);
  margin-left: auto;
}

/* A grid on a card paints nothing of its own: the card's surface shows through the body and the
   rows, the grid's border is dropped, and the header row is set off by a rule under quiet text. */
vaadin-card vaadin-grid {
  --vaadin-grid-background: transparent;
  --vaadin-grid-row-background-color: transparent;
  --vaadin-grid-border-width: 0px;
}

/* The header names its columns quietly: small uppercase muted text over a rule. A grid whose header
   sticks — a bounded one — keeps an opaque fill, because rows scroll under it. */
vaadin-card vaadin-grid::part(header-cell) {
  background-color: transparent;
  border-bottom: 1px solid var(--vaadin-border-color-secondary);
  color: var(--vaadin-text-color-secondary);
  font-size: var(--aura-font-size-xs);
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

vaadin-card vaadin-grid:is(.km-grid-s, .km-grid-m, .km-grid-l)::part(header-cell) {
  background-color: var(--aura-surface-color-solid);
}

/* An amount column: the cells in the mono face, tabular and flush right (Parts.amountColumn). */
vaadin-grid::part(km-amount-cell) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* A column in the mono face, left-aligned: an identifier rather than an amount. */
vaadin-grid::part(km-mono-cell) {
  font-family: var(--font-mono);
}

/* Bounded grids: a height from a small set of sizes, the body scrolling inside the grid and the
   header row staying put. A row is about 2.5rem. */
:root {
  --km-grid-row-height: 2.5rem;
  --km-grid-header-height: 2.5rem;
}

.km-grid-s {
  height: calc(var(--km-grid-header-height) + 6 * var(--km-grid-row-height));
}

.km-grid-m {
  height: calc(var(--km-grid-header-height) + 12 * var(--km-grid-row-height));
}

.km-grid-l {
  height: calc(var(--km-grid-header-height) + 20 * var(--km-grid-row-height));
}

/* Two columns, one when the screen is narrow. The columns are a custom property so a variant and
   the stacking rule never compete on specificity: the stacking rule comes last. Admin stacks
   below 1400px; the tablet variant keeps its columns down to 900px. */
.km-two-columns {
  --km-columns: minmax(0, 1fr) minmax(0, 1fr);
  display: grid;
  grid-template-columns: var(--km-columns);
  gap: var(--vaadin-gap-l);
  align-items: start;
  width: 100%;
}

.km-two-columns-wide-left {
  --km-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

@media (max-width: 1400px) {
  .km-two-columns:not(.km-two-columns-tablet) {
    --km-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .km-two-columns {
    --km-columns: minmax(0, 1fr);
  }
}

/* The decision block: consequences above, then the subject and the actions on one line. Sticky to
   the top of the scroll area and opaque, so what scrolls beneath never shows through. */
.km-decision {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vaadin-border-color-secondary);
  border-radius: var(--vaadin-radius-l);
  background: var(--aura-surface-color-solid);
  box-shadow: var(--aura-shadow-m);
}

.km-decision-consequences {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vaadin-gap-xs) var(--vaadin-gap-m);
  padding: var(--vaadin-padding-s) var(--vaadin-padding-l);
  border-bottom: 1px solid var(--vaadin-border-color-secondary);
}

.km-decision-what {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vaadin-gap-xs) var(--vaadin-gap-m);
}

.km-decision-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vaadin-gap-xs) var(--vaadin-gap-s);
  margin-left: auto;
}

.km-decision-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--vaadin-gap-s) var(--vaadin-gap-l);
  padding: var(--vaadin-padding-m) var(--vaadin-padding-l);
}

.km-decision-subject {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: var(--vaadin-gap-m);
}

.km-decision-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--vaadin-gap-s);
}

/* The note takes what is left of a fixed width, so the buttons stay on its line. */
.km-decision-actions vaadin-text-field {
  width: 22rem;
  min-width: 10rem;
  flex: 0 1 22rem;
}

.km-decision-below {
  padding: 0 var(--vaadin-padding-l) var(--vaadin-padding-m);
}

/* Narrow screens do not have the height to keep a block in view. */
@media (max-width: 900px) {
  .km-decision {
    position: static;
  }

  .km-decision-line,
  .km-decision-actions {
    flex-wrap: wrap;
  }
}

/* ── Small parts: figure, pill, chip, quiet line ──
   Java side: keymono.common.vaadin.ui.layout.Parts. */

/* A remark below a section, in the section's own voice rather than in the content's. */
.km-hint {
    margin: 0;
    font-size: var(--aura-font-size-s);
    color: var(--vaadin-text-color-secondary);
}

/* A state worn as a state: pill-shaped, tinted, with the dot the mock draws in front. */
.km-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    font-size: var(--aura-font-size-s);
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

.km-pill::before {
    content: "";
    width: 0.45em;
    height: 0.45em;
    border-radius: 50%;
    background: currentColor;
}

.km-pill-ok  { color: var(--k-green); background: oklch(from var(--k-green) l c h / 0.15); }
.km-pill-bad { color: var(--k-coral); background: oklch(from var(--k-coral) l c h / 0.15); }
.km-pill-warn { color: var(--k-yellow); background: oklch(from var(--k-yellow) l c h / 0.15); }
.km-pill-info { color: var(--k-lightblue); background: oklch(from var(--k-lightblue) l c h / 0.15); }
.km-pill-neutral { color: var(--vaadin-text-color-secondary); background: oklch(from var(--k-darkblue) calc(l + 0.08) c h / 0.6); }

/* A category worn by a table cell. Same five colours as the pill, without its shape, so a
   memo and a status read as the same kind of thing at a glance. */
.km-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: var(--vaadin-radius-s);
    font-size: var(--aura-font-size-xs);
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}

.km-chip-ok      { color: var(--k-green);            background: oklch(from var(--k-green) l c h / 0.15); }
.km-chip-info    { color: var(--k-lightblue);        background: oklch(from var(--k-lightblue) l c h / 0.15); }
.km-chip-warn    { color: var(--k-yellow);           background: oklch(from var(--k-yellow) l c h / 0.15); }
.km-chip-bad     { color: var(--k-coral);            background: oklch(from var(--k-coral) l c h / 0.15); }
.km-chip-neutral { color: var(--vaadin-text-color-secondary); background: oklch(from var(--k-darkblue) calc(l + 0.08) c h / 0.6); }

/* One tile per figure on the page background: a group with its label, a mono value and a quiet line
   under it. The row wraps when they do not fit; .km-figures-large steps the value up for an overview. */
.km-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: 100%;
}

.km-figures-large .km-figure-value {
    font-size: 1.875rem;
}

/* On a phone two figures share a row rather than four squeezing into one, and the number steps down
   so a long amount still fits its half. The columns are counted, not fitted: a 7.5rem minimum let
   four of them fit side by side at 600px, which is the squeeze this rule exists to prevent. */
@media (max-width: 600px) {
    .km-figures {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--vaadin-gap-m);
    }

    .km-figure-value,
    .km-figures-large .km-figure-value {
        font-size: 1.35rem;
    }
}

.km-figure {
    display: grid;
    gap: 0.25rem;
}

.km-group-label {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--vaadin-text-color-secondary);
}

.km-figure-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.km-figure-sub {
    font-size: 13px;
    color: var(--vaadin-text-color-secondary);
}

/* ── Status box: the state of one thing, in a tone ──
   A tinted circle with an icon, a small uppercase label, a headline, a quiet line and, on the right,
   the action that mends it. Java side: Parts.statusBox, Parts.statusStrip. */

.km-status-box {
    --km-tone: var(--vaadin-text-color-secondary);
    display: flex;
    align-items: flex-start;
    gap: var(--vaadin-gap-l);
    box-sizing: border-box;
    min-width: 0;
    padding: 16px 20px;
    border: 1px solid var(--vaadin-border-color);
    border-radius: var(--vaadin-radius-l);
    background: var(--aura-surface-color);
}

.km-status-box-ok   { --km-tone: var(--k-green);  border-color: oklch(from var(--k-green) l c h / 0.55); }
.km-status-box-warn { --km-tone: var(--k-yellow); border-color: oklch(from var(--k-yellow) l c h / 0.6);
                      background: linear-gradient(oklch(from var(--k-yellow) l c h / 0.08), oklch(from var(--k-yellow) l c h / 0.08)), var(--aura-surface-color); }
.km-status-box-bad  { --km-tone: var(--k-coral);  border-color: oklch(from var(--k-coral) l c h / 0.6); }
.km-status-box-info { --km-tone: var(--k-lightblue); }

.km-status-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--km-tone);
    background: oklch(from var(--km-tone) l c h / 0.2);
}

.km-status-text {
    flex: 1;
    min-width: 0;
}

.km-status-label {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--vaadin-text-color-secondary);
}

.km-status-box-warn .km-status-label {
    color: var(--k-yellow);
}

.km-status-headline {
    margin-top: 4px;
    font-size: 17px;
    font-weight: 600;
}

.km-status-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--vaadin-text-color-secondary);
}

.km-status-action {
    flex: none;
}

/* The slim variant: label, headline and action in one row, no icon and no sub-line. */
.km-status-strip {
    align-items: center;
    padding: 10px 16px;
}

.km-status-strip .km-status-label {
    flex: none;
}

.km-status-strip .km-status-headline {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    font-size: 15px;
}

/* ── Labelled section: a small uppercase label over its value ── */

.km-detail-section { display: flex; flex-direction: column; gap: var(--vaadin-gap-s); }
.km-detail-label {
    margin: 0;
    font-size: var(--aura-font-size-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--vaadin-text-color-secondary);
}
.km-detail-value { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.km-detail-raw { font-size: var(--aura-font-size-xs); color: var(--vaadin-text-color-secondary); overflow-wrap: anywhere; }
.km-detail-text { white-space: pre-line; overflow-wrap: anywhere; }

/* ── Choice buttons: segmented (SegmentedChoice, MultiSegmentedChoice) and cards with a hint line ──
   A native button per choice; the chosen one carries .km-choice-on. */

.km-choice {
    display: flex;
    flex-wrap: wrap;
    gap: var(--vaadin-gap-s);
}

.km-choice-button {
    font: inherit;
    font-size: var(--aura-font-size-s);
    cursor: pointer;
    padding: var(--vaadin-gap-s) var(--vaadin-gap-m);
    border-radius: var(--vaadin-radius-m);
    border: 1px solid var(--vaadin-border-color);
    background: oklch(from var(--k-darkblue) calc(l - 0.1) c h / 0.6);
    color: var(--vaadin-text-color);
}

.km-choice-button:not([aria-disabled="true"]):hover {
    border-color: var(--vaadin-text-color-secondary);
}

.km-choice-button:focus-visible {
    outline: 2px solid var(--aura-accent-color);
    outline-offset: 2px;
}

.km-choice-button.km-choice-on {
    border-color: var(--k-coral);
    background: oklch(from var(--k-coral) l c h / 0.16);
    color: oklch(from var(--k-coral) calc(l + 0.17) c h);
}

/* Tabs (SegmentedChoice.tabs): the period choice of a page, drawn as the mockups' .tab. */
.km-choice-tabs .km-choice {
    gap: 6px;
}

.km-choice-tabs .km-choice-button {
    padding: 8px 14px;
    border-color: var(--vaadin-border-color);
    background: transparent;
    color: var(--vaadin-text-color);
}

.km-choice-tabs .km-choice-button.km-choice-on {
    border-color: transparent;
    background: oklch(from var(--k-darkblue) calc(l + 0.1) c h / 0.75);
    color: oklch(from var(--k-coral) calc(l + 0.17) c h);
}

/* Read-only: not interactive, and the chosen one stays visible as chosen. */
.km-choice-button[aria-disabled="true"] {
    cursor: default;
}

vaadin-custom-field[invalid] .km-choice-button {
    border-color: var(--aura-red);
}

/* Cards: two to a row, a strong title and a quiet line, left-aligned. */
.km-choice-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--vaadin-gap-m);
}

.km-choice-cards .km-choice-button {
    display: flex;
    flex-direction: column;
    gap: var(--vaadin-gap-xs);
    padding: var(--vaadin-gap-l);
    text-align: left;
    background: oklch(from var(--k-darkblue) calc(l - 0.1) c h / 0.7);
}

.km-choice-cards .km-choice-button.km-choice-on {
    background: oklch(from var(--k-coral) l c h / 0.12);
    color: var(--vaadin-text-color);
}

.km-choice-title {
    font-weight: 700;
}

.km-choice-hint {
    font-size: var(--aura-font-size-s);
    color: var(--vaadin-text-color-secondary);
}

@media (max-width: 600px) {
    .km-choice-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── Mark badge: icon and name in the mark's colour (--mark-color is in marks.css) ── */
.km-mark-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: var(--aura-font-size-xs);
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25em;
    white-space: nowrap;
    color: var(--mark-color, oklch(0.75 0.05 240));
    background: oklch(from var(--mark-color, oklch(0.75 0.05 240)) l c h / 0.12);
}

.km-mark-badge img {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    margin-inline-end: 0.125rem;
    margin-top: -1px;
}

.km-mark-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
