@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
@layer cinder.components {
  /* ========================================
 * SPOTLIGHT
 *
 * The one focal value of a screen: 32px bold in the accent's text colour, so the screen's focus
 * carries Cinder's colour (owner decision 2026-11-16, COR-2489), with a caveat line (14px, warning
 * text) directly under it. Liveness is a status dot and word above the value. The value is never
 * underlined and never a link, so its colour does not make it read as one.
 * ======================================== */

  .cinder-spotlight {
    display: grid;
    gap: var(--cinder-space-1);
    justify-items: start;
  }

  .cinder-spotlight__value {
    margin: 0;
    font-size: 2rem;
    font-weight: var(--cinder-font-bold);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--cinder-accent-text);
    text-wrap: balance;
  }

  .cinder-spotlight__caveat {
    margin: 0;
    font-size: var(--cinder-text-base);
    color: var(--cinder-status-warning-text);
  }

  /* With an action ("Open Reviews ›") the value is the title of what follows it: the action sits at
   * the end of the value's first line, centred on that line as a section's action is on its
   * heading, and drops to the next line only when the two do not fit side by side. The status
   * word and the caveat keep lines of their own. */
  .cinder-spotlight.cinder-spotlight--action {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--cinder-space-1) var(--cinder-space-4);
  }

  .cinder-spotlight--action > :is(.cinder-spotlight__status, .cinder-spotlight__caveat) {
    flex-basis: 100%;
  }

  .cinder-spotlight--action > .cinder-spotlight__value {
    flex: 0 1 auto;
    min-inline-size: 0;
  }

  .cinder-spotlight__action {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--cinder-space-2);
    margin-inline-start: auto;
    /* One line of the value: 32px type at its 1.1 leading. */
    min-block-size: calc(2rem * 1.1);
  }

  /* The liveness word sits at label size (16px). */
  .cinder-status-dot.cinder-spotlight__status {
    font-size: var(--cinder-text-lg);
  }
}
