/* Carried from the deployed Lawyer's court.css: its tokens named --la-, its data- states as is- classes. */
/*
 * The court record's own pieces: the band a section stands in, the opening
 * a page starts with, the chip, the micro label, the case block, the field
 * with a glyph and the emphasis band. Every other lawyer file builds on them.
 *
 * Worn by procese.online. Every class is lawyer's, under its `la-` prefix,
 * and every colour a slot of `tokens.css`.
 */

/* ---- the shared pieces ------------------------------------------------- */

/* A band of the page: full bleed, with this site's rhythm around it. Every
   section of every page here is one, so the rhythm is written once. */
.la-band {
  padding: var(--la-space-7) var(--la-page-edge);
}

@container la-page (min-width: 48rem) {
  .la-band {
    padding: var(--la-space-9) var(--la-page-edge);
  }
}

/* How a band introduces itself: a small tracked word above, a line, and a
   sentence under it. Every section of every page uses the three, so they are
   written once and a band that says something different says it here. */
.la-band-eyebrow {
  margin-block-end: var(--la-space-3);
  color: var(--la-color-link);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs);
  font-weight: var(--la-weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Twenty-four characters, not the forty a paragraph wants. A measure is
   about how far the eye travels back to find the next line, and a line set
   this large travels much further for the same count, so display type takes
   a shorter measure or the title stops being a title and becomes a
   sentence running the width of the page. */
.la-band-title {
  max-width: 24ch;
  margin-block-end: var(--la-space-3);
  color: var(--la-color-fg);
  font-size: var(--la-text-3xl);
  font-weight: var(--la-weight-semi);
  line-height: var(--la-leading-tight);
  letter-spacing: -0.018em;
}

.la-band-lede {
  max-width: 60ch;
  margin-block-end: var(--la-space-6);
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-base);
  line-height: var(--la-leading-normal);
}

@container la-page (min-width: 48rem) {
  .la-band-title {
    font-size: var(--la-text-4xl);
  }

  .la-band-lede {
    font-size: var(--la-text-lg);
  }
}

/* How a page of this site opens: a saffron rule down the side, the small
   tracked word, the line, and a sentence. A band introduces a section; this
   introduces a whole page, and the rule is what says so. */
.la-opening {
  position: relative;
  padding-inline-start: var(--la-space-4);
  margin-block-end: var(--la-space-6);
}

.la-opening::before {
  content: '';
  position: absolute;
  inset-block: 0 var(--la-space-1);
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    var(--la-color-accent),
    var(--la-color-role-display-from, var(--la-color-accent-active))
  );
  border-radius: var(--la-radius-full);
}

.la-opening .la-band-eyebrow {
  margin-block-end: var(--la-space-2);
  letter-spacing: 0.14em;
}

.la-opening-line {
  max-width: 24ch;
  margin-block-end: var(--la-space-3);
  color: var(--la-color-fg);
  font-size: var(--la-text-3xl);
  font-weight: var(--la-weight-bold);
  line-height: var(--la-leading-tight);
  letter-spacing: -0.02em;
}

.la-opening-lede {
  max-width: 64ch;
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-base);
  line-height: var(--la-leading-normal);
}

@container la-page (min-width: 48rem) {
  .la-opening {
    padding-inline-start: var(--la-space-5);
    margin-block-end: var(--la-space-7);
  }

  .la-opening-line {
    font-size: var(--la-text-4xl);
  }

  .la-opening-lede {
    font-size: var(--la-text-lg);
  }
}

/* A chip is a fact about a thing, sitting beside it: a court's level, a
   case's stage, whether a session was heard. Four tones, and the accent one
   for the fact a page is about. */
.la-chip {
  display: inline-flex;
  gap: var(--la-space-2);
  align-items: center;
  padding: var(--la-space-1) var(--la-space-3);
  font-size: var(--la-text-sm);
  font-weight: var(--la-weight-medium);
  color: var(--la-color-fg-body);
  background: var(--la-color-bg-sunken);
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-full);
}

.la-chip-accent {
  color: var(--la-color-fg);
  background: var(--la-color-role-accent-soft, var(--la-color-accent-subtle));
  border-color: var(--la-color-accent);
}

.la-chip-success {
  color: var(--la-color-success);
  background: var(--la-color-success-subtle);
  border-color: color-mix(in oklab, var(--la-color-success), var(--la-color-success-subtle) 60%);
}

.la-chip-warning {
  color: var(--la-color-warning);
  background: var(--la-color-warning-subtle);
  border-color: color-mix(in oklab, var(--la-color-warning), var(--la-color-warning-subtle) 60%);
}

.la-chip-danger {
  color: var(--la-color-danger);
  background: var(--la-color-danger-subtle);
  border-color: color-mix(in oklab, var(--la-color-danger), var(--la-color-danger-subtle) 60%);
}

.la-chip .la-dot {
  width: var(--la-space-2);
  height: var(--la-space-2);
  background: currentcolor;
  border-radius: var(--la-radius-full);
}

/* A micro label: the mono, tracked-out, uppercase word that names the value
   under it. It is the smallest type on the site and the smallest the kit
   has, because a step below this is a step below reading. */
.la-lbl {
  color: var(--la-color-fg-muted);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs);
  font-weight: var(--la-weight-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* A case, as a block: its number, its court, its facts, its next hearing.
   The one piece the site and the app both draw, and it stays here until the
   app asks for it, at which point it moves and is shaped by both. */
.la-case-block {
  padding: var(--la-card-pad);
  background: var(--la-color-bg-raised);
  border: 1px solid var(--la-color-border);
  border-radius: var(--la-radius-md);
  box-shadow: var(--la-shadow-sm);
}

.la-case-block--accent {
  border-color: var(--la-color-role-accent-soft, var(--la-color-accent));
  box-shadow: var(--la-shadow-md);
}

.la-case-num {
  margin-block-end: var(--la-space-05);
  color: var(--la-color-fg);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-lg);
  font-weight: var(--la-weight-semi);
  letter-spacing: -0.005em;
}

.la-case-court {
  margin-block-end: var(--la-space-2);
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-xs);
}

.la-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--la-space-1);
  margin-block-end: var(--la-space-2);
}

.la-case-obiect,
.la-case-parti {
  margin-block-end: var(--la-space-2);
  color: var(--la-color-fg);
  font-size: var(--la-text-xs);
  line-height: var(--la-leading-normal);
}

.la-case-parti .la-lbl {
  margin-inline-end: var(--la-space-1);
}

.la-case-parti-head {
  display: flex;
  gap: var(--la-space-1);
  align-items: baseline;
  margin-block-end: var(--la-space-05);
}

.la-case-parti-count {
  color: var(--la-color-fg-muted);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs);
}

.la-case-parti .la-case-parti-cal {
  color: var(--la-color-fg-muted);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-2xs);
  letter-spacing: 0.04em;
}

/* Each role its own group, set apart from the one before, its names under it. */
.la-case-parti .case-parti-group + .case-parti-group {
  margin-block-start: var(--la-space-2);
}

.la-case-parti .case-parti-name {
  font-family: var(--la-font-mono);
  font-size: var(--la-text-xs);
}

.la-case-parti .case-parti-more > summary {
  color: var(--la-color-link);
  cursor: pointer;
}

.la-case-hearing {
  padding: var(--la-space-2) var(--la-space-3);
  font-size: var(--la-text-xs);
  background: var(--la-color-bg-sunken);
  border-inline-start: 3px solid var(--la-color-accent);
  border-radius: var(--la-radius-sm);
}

.la-case-hearing .la-lbl {
  display: block;
  margin-block-end: var(--la-space-05);
}

.la-case-hearing .la-when {
  color: var(--la-color-fg);
  font-weight: var(--la-weight-semi);
}

.la-case-hearing .la-where {
  margin-block-start: var(--la-space-05);
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-2xs);
}

.la-case-hearing .la-result {
  margin-block-start: var(--la-space-1);
  color: var(--la-color-fg);
}

.la-case-hearing .la-result .la-lbl {
  display: inline;
  margin-block-end: 0;
  margin-inline-end: var(--la-space-05);
}

.la-case-hearing + .la-case-hearing {
  margin-block-start: var(--la-space-2);
}

/* Why no name is shown: a criminal case's parties are never handed. */
.la-case-note {
  margin-block-end: var(--la-space-2);
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-xs);
  line-height: var(--la-leading-normal);
}

.la-case-go {
  display: flex;
  flex-wrap: wrap;
  gap: var(--la-space-2);
  margin-block-start: var(--la-space-4);
}

/* What the door cannot do yet, said under it. */
.la-case-soon {
  flex-basis: 100%;
  margin: 0;
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-xs);
}

.la-case-filedate {
  margin-block-start: var(--la-space-2);
  color: var(--la-color-fg-muted);
  font-size: var(--la-text-2xs);
}

.la-case-filedate .la-lbl {
  margin-inline-end: var(--la-space-05);
}

/* A field with a glyph inside it: the search box, and the one place a
   control is more than the kit's bare input. */
.la-input {
  display: flex;
  gap: var(--la-space-2);
  align-items: center;
  width: 100%;
  min-height: max(var(--la-control-lg), var(--la-tap-target));
  padding-inline: var(--la-space-3);
  color: var(--la-color-fg);
  font-size: var(--la-text-base);
  background: var(--la-color-bg-raised);
  border: 1px solid var(--la-color-border-strong);
  border-radius: var(--la-radius-md);
}

.la-input input {
  all: unset;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.la-input input::placeholder {
  color: var(--la-color-fg-subtle);
}

.la-input:focus-within {
  border-color: var(--la-color-border-focus);
  box-shadow: var(--la-shadow-focus);
}

.la-input[aria-invalid='true'] {
  border-color: var(--la-color-danger);
}

.la-input .la-icon {
  display: inline-flex;
  flex: none;
  color: var(--la-color-fg-muted);
}

/* A band that does not turn with the theme: ink and paper either way. The
   hero, the calendar preview, the tail, the pro card. Inside one, the
   colours a piece paints with point at the design's emphasis roles, so a
   card, a button and a rule all land right with nothing rewritten. */
.la-emphasis {
  --la-color-bg: var(--la-color-role-emphasis);
  --la-color-bg-raised: var(--la-color-role-emphasis-raised);
  --la-color-bg-raised-hover: var(--la-color-role-emphasis-raised);
  --la-color-bg-raised-strong: var(--la-color-role-emphasis-strong);
  --la-color-bg-sunken: var(--la-color-role-emphasis);
  --la-color-fg: var(--la-color-role-on-emphasis);
  --la-color-fg-body: var(--la-color-role-on-emphasis-muted);
  --la-color-fg-muted: var(--la-color-role-on-emphasis-muted);
  --la-color-fg-subtle: var(--la-color-role-on-emphasis-subtle);
  --la-color-border: var(--la-color-role-emphasis-border);
  --la-color-border-subtle: var(--la-color-role-emphasis-border);
  --la-color-accent: var(--la-color-role-emphasis-accent);
  --la-color-link: var(--la-color-role-emphasis-accent);

  color: var(--la-color-fg-body);
  background: var(--la-color-bg);
}

/* The saffron wash an emphasis band carries behind its words. */
.la-emphasis-glow {
  background:
    radial-gradient(60rem 30rem at 50% 0, var(--la-color-role-glow, transparent), transparent 70%), var(--la-color-bg);
}
