/* Loaded after Unfold. Colours follow Unfold's light and dark variables. */
.m-dash { color: #94a3b8; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 38px; }
.m-total strong { font-size: 18px; font-weight: 650; }
.m-total a { margin-left: 10px; color: rgb(29 78 216); }
.dark .m-total a { color: rgb(96 165 250); }
.m-export { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid rgb(100 116 139 / .3); border-radius: 8px; font-weight: 500; white-space: nowrap; }
.m-export:hover, .m-chips a:hover { border-color: rgb(37 99 235); }
.m-export span { font-size: 18px; }
.m-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.m-chips > span { color: #64748b; margin-right: 4px; }
.dark .m-chips > span { color: #94a3b8; }
.m-chips a { border: 1px solid rgb(100 116 139 / .3); border-radius: 99px; padding: 4px 11px; font-size: 13px; white-space: nowrap; }
.m-chips a.on { background: rgb(29 78 216); border-color: rgb(29 78 216); color: #fff; }

/* Lists */
#result_list .m-title { display: block; white-space: normal; }
#result_list .m-sub { display: block; font-size: 12px; font-weight: 400; color: #64748b; }
.dark #result_list .m-sub { color: #94a3b8; }
#result_list .m-issn { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
#result_list .m-issn small { color: #64748b; }
.m-site { color: rgb(29 78 216); }
.dark .m-site { color: rgb(96 165 250); }
.m-site span { font-size: 18px; vertical-align: middle; }

@media (min-width: 768px) {
  #result_list .field-picture { width: 52px; }
  .model-journal #result_list { font-size: 13px; }
  .model-journal #result_list th, .model-journal #result_list td { padding-left: 8px; padding-right: 8px; }
  .model-journal #result_list .field-cover { width: 46px; }
  .model-journal #result_list .field-journal { min-width: 210px; }
  .model-journal #result_list .field-publisher { min-width: 130px; }
  .model-journal #result_list .field-brand, .model-journal #result_list .field-imprint { min-width: 80px; }
  .model-journal #result_list .sortoptions { margin-left: 4px; }
  .model-member #result_list .field-affiliation { max-width: 380px; }
}

@media (max-width: 767px) {
  #command-results-note { display: none; }
  #result_list, #result_list tbody { display: block; width: 100%; }
  #result_list thead { display: none; }
  #result_list tr.data-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; padding: 14px; padding-right: 44px; border-top: 1px solid rgb(100 116 139 / .2); }
  #result_list tbody:first-of-type tr.data-row { border-top: 0; }
  #result_list tr.data-row > td, #result_list tr.data-row > th { display: block; height: auto; overflow: visible; padding: 0 0 8px; border: 0; width: auto; max-width: none; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  #result_list tr.data-row > [data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 500; line-height: 1.5; color: #64748b; }
  .dark #result_list tr.data-row > [data-label]::before { color: #94a3b8; }
  #result_list tr.data-row > .action-checkbox { position: absolute; top: 14px; right: 14px; }
  #result_list tr.data-row > .action-checkbox::before, #result_list tr.data-row > th::before { display: none !important; }
  #result_list tr.data-row > th { grid-column: 1 / -1; font-weight: 600; font-size: 15px; }
  #result_list tr.data-row:has(> .field-cover, > .field-picture) { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  #result_list tr.data-row > .field-cover, #result_list tr.data-row > .field-picture { grid-column: 1; grid-row: 1 / span 12; }
  #result_list tr.data-row:has(> .field-cover, > .field-picture) > th { grid-column: 2 / -1; }
  #result_list tr.data-row > .field-email, #result_list tr.data-row > .field-affiliation, #result_list tr.data-row > .field-url, #result_list tr.data-row > .field-publisher, #result_list tr.data-row > .field-resource { grid-column: 1 / -1; }
  #result_list tr.data-row:has(> .field-cover, > .field-picture) > :is(.field-email, .field-affiliation, .field-url, .field-publisher) { grid-column: 2 / -1; }
}

/* Forms. A fieldset is as wide as its content unless told otherwise. */
fieldset, .formset-wrapper { min-width: 0; max-width: 100%; }
fieldset .form-rows, fieldset .field-row, fieldset .field-row > * { min-width: 0; }
fieldset .select2-container { min-width: 0 !important; max-width: 100%; }
#content-main form textarea { min-height: 0; height: 104px; }

/* The save bar is solid, and a focused field always scrolls clear of it. */
html { scroll-padding: 80px 0 96px; }
@media (min-width: 1024px) {
  .change-list .lg\:sticky.lg\:scrollable-top { background: #fff; backdrop-filter: none; }
  .dark .change-list .lg\:sticky.lg\:scrollable-top { background: rgb(17 24 39); }
  #submit-row > div > div.absolute { background: #fff; backdrop-filter: none; }
  .dark #submit-row > div > div.absolute { background: rgb(17 24 39); }
  /* Unfold sizes these for one wide column; here the column decides. */
  .tabular table.formset :is(.select2-container, input:not([type=checkbox]), select) { min-width: 0 !important; max-width: 100%; }
  .tabular .select2-container { contain: inline-size; }
  .tabular :is(th.column-start_date, th.column-end_date) { width: 160px; min-width: 160px; }
  .tabular :is(td.field-start_date, td.field-end_date) { min-width: 160px; }
  .tabular :is(th.column-is_active, th.column-sort_order) { width: 80px; min-width: 80px; }
  .tabular th.column-indexed_since { width: 140px; min-width: 140px; }
  .tabular th.column-designation { width: 250px; min-width: 250px; }
  .tabular th.column-kind { width: 220px; min-width: 220px; }
  .tabular th.column-label { width: 260px; min-width: 220px; }
  .tabular :is(th.column-journal, th.column-member, th.column-indexing, th.column-url) { width: auto; min-width: 260px; }
}
.field-tabular .grow, .field-tabular .min-w-56, .field-tabular .related-widget-wrapper { min-width: 0; width: 100%; max-width: 100%; }
.related-widget-wrapper > .select2-container { flex: 1 1 0; width: 0 !important; min-width: 0 !important; }
fieldset label.grow { min-width: 0; }
fieldset label.grow > input[disabled] { width: 100%; }

@media (max-width: 1023px) {
  .change-form a.truncate.tracking-tight:first-of-type, .change-form a.truncate.tracking-tight:first-of-type + span { display: none; }
  .change-form a.truncate.tracking-tight:first-of-type + span + a { flex-shrink: 0; }
  .tabular table.formset, .tabular table.formset tbody:not(.empty-form), .tabular table.formset tfoot { display: block; width: 100%; }
  .tabular tr.form-row { display: block; }
  .tabular tr.form-row > td { display: block; width: auto; padding: 8px 12px; border: 0; }
  .tabular tr.form-row > td[data-label]::before { content: attr(data-label); display: block; font-weight: 600; margin-bottom: 6px; }
  .tabular tfoot tr, .tabular tfoot td { display: block; }
  .tabular :is(.select2-container, input:not([type=checkbox]), select) { max-width: 100%; }
}
