/* dialogs.css: the info-dialog shell rendered by js/modals.js into #info-dialogs.
   Mechanics ported from merge-mining-monitor (native <dialog>, backdrop dim,
   footnote references); every visual here is this project's own identity
   (surface-raise panel, serif body, hairline rules, gold links), never mmm's.
   Every color below is var(--token) from tokens.css, or color-mix() built
   entirely from one, per the project's colors-from-tokens rule: no raw hex or
   rgb literal appears in this file. */

.info-dialog {
  width: min(560px, calc(100% - 2rem));
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raise);
  color: var(--text);
  font-family: var(--body);
  /* Dialog elevation is the one shadow DESIGN.md allows; built from --bg so it
     reads as ink, not an imported neutral. */
  box-shadow: 0 20px 60px color-mix(in srgb, var(--bg) 70%, transparent);
}

.info-dialog::backdrop {
  background: color-mix(in srgb, var(--bg) 65%, transparent);
}

.info-dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.info-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.info-dialog-heading h2 {
  margin: 0;
  font-family: var(--body);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.info-dialog-kicker {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.4;
}

.info-dialog-close {
  flex: none;
  margin-top: 0.1rem;
}

.info-dialog-body {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  overflow-y: auto;
  padding: 1.1rem 1.25rem 1.3rem;
}

.info-dialog-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.info-dialog-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--frost);
  background: var(--frost-wash);
  padding: 0.05em 0.32em;
  border-radius: var(--radius);
}

/* Section labels inside the body (Notes, References) reuse the
   field-journal small-caps idiom from base.css's .section-head h2. */
.info-dialog-subhead {
  margin-top: 0.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

/* Notes: the declarative, cautious captions DESIGN.md calls for
   ("bit 4 is a header claim, not enforcement", "absence is not rejection"). */
.info-dialog-notes {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.info-dialog-notes li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.info-dialog-notes code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--frost);
  background: var(--frost-wash);
  padding: 0.05em 0.32em;
  border-radius: var(--radius);
}

/* Footnote-style references: a numbered list matching the superscript markers
   inline in the body, gold links per base.css's link color. */
.info-dialog-refs {
  margin: 0;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--faint);
}

.info-dialog-refs a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.info-dialog-refs a:hover {
  color: var(--text);
}

.info-cite {
  font-size: 0.7em;
  margin-left: 0.05em;
}

.info-cite a {
  color: var(--gold);
  text-decoration: none;
}

.info-cite a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .info-dialog {
    width: calc(100% - 1.5rem);
    max-height: calc(100dvh - 2rem);
  }
  .info-dialog-header {
    padding: 0.9rem 1rem 0.8rem;
  }
  .info-dialog-body {
    padding: 0.9rem 1rem 1.1rem;
  }
}
