/* colour the type icon by db_type.color through the wrapper's color */
svg.icon-svg.db-type-icon {
  stroke: currentcolor;
}

.db-entry.details .attribute .value {
  word-wrap: break-word;
}

#db-entries-for-relation {
  height: 200px;
  overflow: auto;
}

#db-entries-for-relation label { display: block; }
div.issue table span.db_entry { float: none; }
div.contact table span.db_entry { float: none; }
div.db-entry { background: var(--a-color-bg-light); }

input#db_entry_search { width: 100%; }

span.db-entry.non-valid,
a.db-entry.non-valid,
a.db-entry.non-valid:link,
a.db-entry.non-valid:visited {
  color: var(--a-color-muted);
  text-decoration: line-through;
}

.db-relations ul {
  padding-left: 0;
}

.db-relations ul li {
  list-style: none;
}

input#db_entry_name { width: 99%; }

#db-entry-private-wrap {
  float: right;
  margin-right: 1em;
  margin-left: 1em;
  padding-left: 0;
  padding-bottom: 0;
}

/* Sticky header scroll-margin adjustments for db_entries (reuses Redmine's sticky-issue-header CSS) */
.controller-db_entries.action-show div.wiki a[name],
.controller-db_entries.action-show #history div[id^='note-'],
.controller-db_entries.action-show #history div[id^='change-'],
.controller-db_entries.action-show #add_comment_form {
  scroll-margin-top: var(--sticky-header-scroll-margin);
}

@media all and (max-width: 899px) {
  .controller-db_entries.action-show div.wiki a[name],
  .controller-db_entries.action-show #history div[id^='note-'],
  .controller-db_entries.action-show #history div[id^='change-'],
  .controller-db_entries.action-show #add_comment_form {
    scroll-margin-top: var(--sticky-header-scroll-margin-mobile);
  }
}

/* A db_list whose lines carry a number of their own: the number is text in the
   document, so it survives the pdf export and the browser search. Only its
   column comes from here - without this file the numbers are still there, just
   left aligned. The width is set per list by the macro, from its longest mark.

   A hanging indent, not a flex row: flex turns every inline element of a line
   into a column of its own, which takes a line apart wherever it holds a link
   or an emphasis. */
.db-list ul.db-list-marks {
  padding-left: 1em;
}

.db-list ul.db-list-marks > li {
  padding-left: calc(var(--db-mark-width, 2ch) + 0.4em);
  text-indent: calc(-1 * (var(--db-mark-width, 2ch) + 0.4em));
}

.db-list ul.db-list-marks > li > span:first-child {
  display: inline-block;
  width: var(--db-mark-width, 2ch);
  margin-right: 0.4em;
  text-align: right;
}
