/*
 * ConfidenceCallout WITH its basis. The box stays the card ground with a hairline at
 * every level — the meter is the one coloured thing, because the level is
 * already said in the phrase beside it and a tinted fill would say it a third
 * time.
 *
 * The three level colours live here rather than in the component, so the
 * component ships no palette and a theme repaints all three at once.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-confidence-callout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--lotics-space-4);
    padding: var(--lotics-space-12);
    border: 1px solid var(--border);
    border-radius: var(--lotics-radius-control);
    background-color: var(--card);
  }

  .lotics-confidence-callout__head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--lotics-space-8);
  }

  /* The ticks sit on a common BASELINE, not a common centre — a meter is read
     bottom-up. */
  .lotics-confidence-callout__meter {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-shrink: 0;
    gap: var(--lotics-space-2);
  }

  .lotics-confidence-callout__tick {
    width: 3px;
    height: 10px;
    border-radius: calc(var(--lotics-radius-control) - var(--lotics-space-8));
    background-color: var(--input);
  }

  .lotics-confidence-callout[data-level="high"] .lotics-confidence-callout__tick[data-filled] {
    background-color: var(--lotics-tone-green-solid);
  }

  .lotics-confidence-callout[data-level="medium"] .lotics-confidence-callout__tick[data-filled] {
    background-color: var(--lotics-tone-amber-solid);
  }

  .lotics-confidence-callout[data-level="low"] .lotics-confidence-callout__tick[data-filled] {
    background-color: var(--lotics-tone-red-solid);
  }
}
