body {
  /* prevent ligatures for the following reasons:
   * 1. tonic accent (underline) is not displayed in ~fi~ segments
   * 2. %fig.%, %refl.% etc. look bad when spaced.                 */
  font-variant-ligatures: no-common-ligatures;
}

pre {
  white-space: pre-wrap;
}

/* Keep a visual indication of the last clicked link. Helpful when opening
   links in a new tab. */
a:focus {
  text-decoration: underline;
}

.list-inline-bullet li:not(:first-child):before {
  content: '•';
  opacity: 0.5; /* don't force a color, use opacity instead */
  padding-right: .5rem;
}

.list-inline-bullet.list-inline-bullet-sm li:not(:first-child):before {
  padding-right: .25rem;
}

.list-inline-bullet-sm .list-inline-item:not(:last-child) {
    margin-right: .25rem;
}

/* poll */
.pollModal {
  display: block;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.pollModalContent {
  background-color: #fefefe;
  text-align: center;
  color: #212529;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 450px;
}

.btn-poll {
  padding-left: 20px;
  padding-right: 20px;
  margin-left: 20px;
  margin-right: 20px;
  min-width: 80px;
}

.btn-response {
  padding-left: 10px;
  padding-right: 10px;
  min-width: 80px;
}

/* leonardo */
/*

.leonardo {
  transform: rotateY(180deg);
}

.leonardo-on-toggle, .leonardo-off-toggle {
  display: none;
}

.leoModal {
  display: block;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
}

.leoModalContent {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.leoClose {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
}

.leoClose:hover,
.leoClose:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.leoForget {
  color: #ccc;
  font-size: 20px;
  font-weight: bold;
  background: #888;
  padding: 3px;
}

.leoForget:hover,
.leoForget:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
*/

/*********** navbar and its elements ***********/

.navbar {
  background-color: var(--c-navbar-bg);
  border-bottom: 1px solid var(--c-navbar-border);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, .1);
}

.navbar-brand svg {
  height: auto;
  width: 173px;
}

.navbar-brand g {
  stroke: var(--c-logo-nav);
}

.navbar .avatar {
  border-radius: 4px;
  margin: -15px 5px;
}

/* Accomodate non-collapsible donate link. */
.navbar-toggler {
  margin-left: 5px;
}

/* hide the theme icon for the current theme */
html.light .light-mode-toggle,
html.dark .dark-mode-toggle {
  display: none;
}

/* override navbar-toggler transparent background */
.emphasize {
  background-color: #ffc107 !important;
  font-size: .875rem !important;
}

.emphasize:hover{
  background-color: #ffd54f !important;
}

html.dark .emphasize {
  color: #121212 !important;
  background-color: #ffd54f !important;
  border-color: #ffd54f !important;
  font-size: .875rem !important;
}

html.dark .emphasize:hover {
  background-color: #ffc107 !important;
  border-color: #ffc107 !important;
}

/**************************** material icons ****************************/

.material-icons {
  direction: ltr;
  display: inline-block;
  font-family: 'Material Icons';
  font-size: 125%;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  text-transform: none;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: normal;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';
}

.btn .material-icons {
  margin-right: 3px;
  position: relative;
  top: -1px;
}


/********************************* tags *********************************/

.tag .material-icons {
  margin-top: -1px;
}

.tag a {
  /* if you go below this, badges with material icons may end up taller than */
  /* those without them */
  line-height: 1.4;
}

.tag-tooltip {
  cursor: help;
}


/*********** search form ***********/

#searchClear {
  margin-left: -40px;
  padding-right: 4px;
  z-index: 100;
}

#advancedAnchor {
  text-decoration: underline;
}

#searchForm .form-control:focus {
  box-shadow: 0 1px 1px rgba(0, 0, 0, .075), 0 0 4px var(--c-search-shadow);
}

#select2-sourceDropDown-results li {
  overflow-x: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/*********** banner ***********/

.banner-section {
  display: flex;
  justify-content: center;
  margin-bottom: 1.6em;
}

header .banner-section {
  margin-bottom: 0;
  max-width: 100%;
}

.fakeBanner {
  background: var(--bs-gray-500);
  color: var(--bs-body-bg);
  font-size: 60px;
  height: 90px;
  text-align: center;
  width: 728px;
}


/*********** footer ***********/

footer {
  border-top: 1px solid var(--bs-gray-400);
  margin-top: 1rem;
  padding-top: 1rem;
}

.fbBottom {
  overflow-x: hidden;
}


/*********** definitions ***********/

/* The default underline sticks to the bottom of the text with no padding. */
abbr[title] {
  border-bottom: 1px dotted var(--bs-gray-600);
  text-decoration: none;
}

.defWrapper {
  margin: 1.6em 0; /* top/bottom margins to match the line-height */
  font-size: 1.15em; /* define the font-size on the wrapper, for better encapsulation */
  line-height: 1.6;
}

.hasDependants, .dependantsWrapper {
  border-left: 3px solid var(--bs-gray-400);
  margin-left: -1rem;
  padding-left: 1rem;
}

.dependantsWrapper {
  border-left-style: dashed;
}

/* prevent some jitter caused by collapsing margins
   https://css-tricks.com/what-you-should-know-about-collapsing-margins/ */
.dependantsWrapper .defWrapper:first-child {
  margin-top: 0;
}

.dependantsWrapper .defWrapper:last-child {
  margin-bottom: 0;
}

.def .tree-def {
  color: var(--bs-body-color);
  cursor: pointer;
}

/* for better alignment */
.just {
  text-align: justify;
  display: block;
}

.def {
  text-align: justify;
  display: block;
}

.defDetails {
  margin: 0; /* remove paragraph margin */
  font-size: 0.85em;
  line-height: 1.88; /* equivalent line height: 1.6 / 0.85em */
}

.defDetails .badge {
  background-color: var(--bs-gray-600);
}

.spaced {
  letter-spacing: 3px;
  padding-left: 2px;
}

.small-caps {
  font-variant: all-small-caps;
}

.small-caps-l {
  font-variant: all-small-caps;
  font-size: larger;
}

.petite-caps {
  font-variant: all-petite-caps;
}

.deemph {
  color: var(--bs-gray-500);
}

.emph {
  color: var(--bs-body-color);
}

.tonic-accent {
  text-decoration: underline;
}

.secondary-accent {
  text-decoration: underline double;
}

.rareGlyph {
  background: var(--bs-red);
  color: white;
}

sup.footnote {
  cursor: auto;
  font-style: normal; /* do not inherit bold/italic */
  font-weight: normal;
  padding-left: 2px;
}

.card-footnotes {
  color: var(--bs-gray-800);
  font-size: 85%;
  margin: 20px 0 10px 30px;
}

.card-footnotes .card-body {
  padding: 0 15px;
}

.card-footnotes:before {
  background-color: var(--bs-white);
  border-left: 1px solid var(--bs-gray-400);
  border-top: 1px solid var(--bs-gray-400);
  content: "\00a0";
  display: block;
  height: 20px;
  left: 20px;
  position: relative;
  top: -11px;
  transform: rotate(45deg);
  width: 20px;
}

.callout {
  border: 1px solid var(--bs-gray-200);
  border-left-width: 5px;
  border-radius: 3px;
  margin: 20px 0;
  overflow: hidden;
  padding: 10px 20px;
}

.callout-secondary {
  border-left-color: var(--bs-secondary);
}

.callout-secondary h3 {
  color: var(--bs-secondary);
}

/************** badges **************/

h3 .badge {
  font-size: 12px;
  vertical-align: middle;
}

.badge-muted {
  background-color: var(--bs-gray-300);
  color: var(--bs-gray-800) !important;
}

/************** scanned page modal **************/

#pageModal .modal-dialog {
  max-width: 100%;
  width: 95%;
}

#pageModal .notice {
  display: none !important; /* escalate to !important to trump d-flex*/
  margin-bottom: 0px;
}

#pageImage {
  width: 100%;
}

.pageScan {
  min-height: 64px;
  overflow: hidden;
}

/*********** misc helpers ***********/

a.disabled {
  pointer-events: none;
}

/* articles images (imported from wiki */

div.tright {
  margin: .5em 0 1.3em 1.4em;
  clear: right;
  float: right;
}

div.thumb {
  margin-bottom: .5em;
  width: auto;
  background-color: transparent;
}

/* for select2 field which contains too many items */
.overflownSelect2 .select2-selection__rendered {
  max-height: 81px;
  overflow-y: scroll !important;
}

.linkBox {
  background-color: var(--bs-gray-200);
  border: 1px solid var(--bs-gray-400);
  border-radius: 4px;
  cursor: default;
  float: left;
  margin-right: 5px;
  margin-top: 5px;
  padding: 0 5px;
}

.form-control.overflown {
  padding: 0 5px 5px 5px;
  height: auto;
  max-height: 88px;
  overflow-y: auto;
}

.userNick {
  white-space: nowrap;
}

/* tablesorter */

.tablesorter-header,
.tablesorter-pager th {
  background-color: var(--bs-white) !important;
}

.tablesorter-pager .btn,
.tablesorter-pager .btn.disabled {
  background-color: inherit;
  border: 0;
}

/* sortable */
.drag-indicator {
  cursor: move;
}

/****************** „Read more” link for long sections ******************/

.read-more {
  overflow: hidden;
  position: relative;
}

.read-more .read-more-btn {
  background: linear-gradient(to bottom, var(--c-read-more-top), var(--bs-gray-300));
  border: 0;
  bottom: 0;
  left: 0;
  position: absolute;
  width: 100%;
}

/******** collapsible card with expand/collapse visual indicator ********/

.card-collapse .card-header {
  cursor: pointer;
}

.card-collapse .chevron {
  transition: all 0.5s;
}

.card-collapse .card-header.collapsed .chevron {
  transform: rotate(180deg);
}

/******************** our clone of Bootstrap's alerts ********************/

.notice {
  background-color: var(--c-notice-bg);
  border-radius: .25rem;
  color: var(--c-notice);
  margin-bottom: 1rem;
  padding: 0.75rem;
}

.notice .notice-icon {
  font-size: 200%;
}

.notice a {
  color: inherit !important;
  text-decoration: underline;
}

.notice a:hover {
  opacity: 0.7;
}

/**************************** source dropdown ****************************/

#source-field .btn {
  align-items: center;
  border-color: var(--bs-gray-400);
  display: flex;
  justify-content: space-between;
}

#source-field .btn span {
  min-width: 0;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

#source-field .source-scrollable {
  max-height: 174px; /* 6 rows */
  overflow-y: auto;
}

#source-field .dropdown-item {
  overflow-x: hidden;
  text-overflow: ellipsis;
}

/**************************** articles ****************************/

blockquote {
  border: 1px solid black;
}

.img-center {
  table-layout: fixed;
}

.img-center td img{
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/******* redefine .btn-danger (temporary)  *******/

.btn-danger {
    color: #ad1700;
    background-color: #ffcccc;
    border-color: #ad1700;
}

/*** limba de lemn ***/
.wood {
  font-size: .675rem;
}
.wood td {
  padding: 0.2rem;
}

/**** issn *****/
.issn td {
  text-align: right;
}

/******* admin page ********/

.top-card {
  display: flex;
  padding: 20px;
  gap: 20px;
  justify-content: center;
}

.top-card-item {
  cursor:pointer;
  text-align: center;
}
