/* Watership content model: 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
   glossary shares. This file holds only what is particular to the content model's topic types. 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");

/* A rule id that links to the style guide: inline code with the link underline. */
a.rule-link {
  padding: 0.1em 0.35em;
  border-radius: var(--ws-radius-sm);
  background: var(--ws-wash);
  font-family: var(--ws-font-mono);
  font-size: var(--ws-text-md);
  /* A long rule id breaks rather than pushing the page sideways on a narrow screen. */
  overflow-wrap: anywhere;
}
:is(td, th, nav) a.rule-link { font-size: var(--ws-text-sm); }

/* ---------- topics ---------- */

/* The kicker above a type page's or a worked example's title. */
.type-kicker {
  margin: var(--ws-space-10) 0 0;
  color: var(--ws-faint);
  font: var(--ws-type-ui);
}
.type-kicker .kicker-example { color: var(--ws-accent); font-weight: var(--ws-weight-strong); }
.type-kicker + h1.topictitle1 { margin-top: var(--ws-space-2); }

main dl:not(.ui-elements) > dt { margin-top: var(--ws-space-5); color: var(--ws-ink); font-weight: var(--ws-weight-strong); }
main dl:not(.ui-elements) > dd { margin-left: 0; }

/* ---------- interface guide ---------- */

dl.ui-elements { margin: var(--ws-space-3) 0 var(--ws-space-6); }
.ui-element { padding: 0.85rem 0 1rem; border-top: 1px solid var(--ws-rule); }
.ui-element:first-child { border-top-color: var(--ws-rule-strong); }
/* An element's label, as it reads on the screen: a 13px label in ink, the heading of its entry. */
dt.ui-label {
  margin: 0 0 var(--ws-space-2);
  color: var(--ws-ink);
  font: var(--ws-type-label);
}
dd.ui-action { margin: 0 0 0.5rem; color: var(--ws-body); }
dd.ui-action > p:first-child { margin-top: 0; }
dd.ui-field {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 0 1rem;
  margin: var(--ws-space-1) 0 0;
  font: var(--ws-type-small);
}
.ui-field-label {
  padding-top: 2px;
  color: var(--ws-faint);
  font: var(--ws-type-label);
}
.ui-field-value > p:first-child { margin-top: 0; }
@media (max-width: 36rem) {
  dd.ui-field { grid-template-columns: minmax(0, 1fr); }
}
.screenAccess, .relatedTasks { margin: 1.5rem 0; }
.relatedTasks ul { padding-left: 1.1rem; }

/* ---------- task and tutorial ---------- */

ol.steps { padding-left: 1.5rem; }
ol.steps > li { margin: var(--ws-space-3) 0; }
.stepresult, .info, .stepxmp, .tutorialinfo { margin: 0.35rem 0; }
.tutorialinfo { color: var(--ws-soft); font: var(--ws-type-small); }

/* What the reader sees after a step: a callout in the green of a good result. */
.visible-result {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin: 0.5rem 0 0.25rem;
  padding: 10px 14px 10px 16px;
  background: var(--ws-sheet);
  border: 1px solid var(--ws-rule);
  border-radius: var(--ws-radius);
  box-shadow: inset 3px 0 0 var(--ws-mean-fg);
}
.visible-result-label {
  flex: none;
  color: var(--ws-mean-fg);
  font: var(--ws-type-label);
}
.visible-result-body > p { margin: 0; color: var(--ws-ink); }
.whatYouBuilt { margin-top: 2rem; border-top: 1px solid var(--ws-rule-strong); }

/* ---------- troubleshooting ---------- */

.troubleSolution { margin: 1.5rem 0; padding-top: 0.5rem; border-top: 1px solid var(--ws-rule); }
.responsibleParty { color: var(--ws-faint); font: var(--ws-type-ui); }

/* ---------- glossary entry ---------- */

.usage, .note.usage {
  margin: 0 0 1rem;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: inherit;
}
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); }
.form-usage > p { margin: 0; }
