/* Watership terminology: styles for the DITA-OT HTML5 output.
   Loaded after DITA-OT's commonltr.css. The colors, type, and spacing come from watership-tokens.css (the
   Watership family's shared tokens, light and dark) and the page chrome from dita-chrome.css, which the
   content model shares. This file holds only what is particular to glossary entries. The build scripts
   copy all three, the fonts, and the wordmarks next to each other. */

@import url("watership-tokens.css");
@import url("dita-chrome.css");

/* ---------- glossary entries ---------- */

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin: 0.5rem 0 1.5rem;
  color: var(--ws-faint);
  font: var(--ws-type-ui);
}

/* Usage guidance: body text, without the note box DITA-OT gives a note. */
.note.glossUsage, .usage {
  margin: 0 0 var(--ws-space-5);
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

/* Instead of / Write pairs: a label column and the text, "Write" on the green of a good example. */
dl.examples {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  row-gap: 4px;
  margin: 0 0 var(--ws-space-5);
}
dl.examples dt, dl.examples dd { margin: 0; padding: 10px 12px; background: var(--ws-wash); }
dl.examples dt {
  padding-top: 12px;
  padding-right: 0;
  border-radius: var(--ws-radius-sm) 0 0 var(--ws-radius-sm);
  color: var(--ws-faint);
  font: var(--ws-type-label);
}
dl.examples dd { border-radius: 0 var(--ws-radius-sm) var(--ws-radius-sm) 0; color: var(--ws-ink); }
dl.examples dt:nth-of-type(even), dl.examples dt:nth-of-type(even) + dd { background: var(--ws-mean-bg); }
dl.examples dt:nth-of-type(even) { color: var(--ws-mean-fg); }
dl.examples dt:nth-of-type(n+3):nth-of-type(odd), dl.examples dt:nth-of-type(n+3):nth-of-type(odd) + dd { margin-top: 8px; }
@media (max-width: 600px) {
  dl.examples { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  dl.examples dt { padding: 10px 12px 0; border-radius: var(--ws-radius-sm) var(--ws-radius-sm) 0 0; }
  dl.examples dd { padding-top: 2px; border-radius: 0 0 var(--ws-radius-sm) var(--ws-radius-sm); margin-bottom: 4px; }
}

/* Other forms of the term. */
ul.forms { margin: 0.5rem 0 1rem; padding: 0; list-style: none; }
ul.forms li { padding: 0.6rem 0; border-bottom: 1px solid var(--ws-rule); }
ul.forms li:last-child { border-bottom: 0; }
.form-term { margin-right: 0.35rem; color: var(--ws-ink); font-weight: var(--ws-weight-strong); }
.form-prohibited .form-term { text-decoration: line-through; text-decoration-color: var(--ws-never-fg); }
.form-usage { display: block; margin-top: 0.15rem; color: var(--ws-soft); font: var(--ws-type-small); }

/* The source line is small prose, not chrome: 15px Inter. */
.entry-source {
  margin-top: var(--ws-space-8);
  color: var(--ws-soft);
  font: var(--ws-type-small);
}

/* Definition lists in the about topics. */
main dl:not(.examples) > dt { margin-top: var(--ws-space-5); color: var(--ws-ink); font-weight: var(--ws-weight-strong); }
main dl:not(.examples) > dd { margin-left: 0; }
dl.statuses > dt {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: var(--ws-radius-sm);
  font: var(--ws-weight-strong) var(--ws-text-sm)/1.4 var(--ws-font-ui);
}
dl.statuses > dt.status-preferred { background: var(--ws-mean-bg); color: var(--ws-mean-fg); }
dl.statuses > dt.status-restricted { background: var(--ws-avoid-bg); color: var(--ws-avoid-fg); }
dl.statuses > dt.status-prohibited { background: var(--ws-never-bg); color: var(--ws-never-fg); }
