/* set a max-width for horizontal fluid layout and make it centered */
:root {
  --bs-link-color: #337ab7;
  --bs-link-color-rgb: 51, 122, 183;
  --bs-link-hover-color: #23527c;
  --bs-link-hover-color-rgb: 35, 82, 124;
  --exercise-field-bg: #f0f0f0;
  --toc-bg: #f8f9fa;
}

.container {
  margin-right: auto;
  margin-left: auto;
  max-width: 960px;
  padding-left: 15px;
  padding-right: 15px;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Fira Sans', sans-serif;
  font-size: 18px;
  line-height: 30px;
  min-height: 100vh;
}
body > .container {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}
h1 {
  margin-bottom: 10px;
  margin-top: 20px;
}
h2 {
  font-size: 30px;
  line-height: 1.1;
  margin-bottom: 10px;
  margin-top: 20px;
}
h3 {
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 10px;
  margin-top: 20px;
}
.leciona-kapo {
  align-items: center;
  border-bottom: 1px solid var(--bs-border-color);
  column-gap: 0.75rem;
  display: grid;
  grid-template-columns: minmax(2.75rem, 1fr) auto minmax(2.75rem, 1fr);
  margin-bottom: 20px;
  margin-top: 20px;
  padding-bottom: 16px;
}
.leciona-titolo {
  align-items: center;
  column-gap: 0.5rem;
  display: grid;
  font-size: 26px;
  grid-template-columns: auto minmax(0, 1fr);
  justify-self: center;
  margin: 0;
  max-width: 100%;
}
.leciona-menuo {
  display: inline-flex;
  min-width: max-content;
}
.leciona-menuo-butono {
  align-items: center;
  background: #fff;
  border-color: #dee2e6;
  color: var(--bs-link-color);
  display: inline-flex;
  font: inherit;
  font-weight: inherit;
  gap: 0.45rem;
  line-height: inherit;
  padding: 0.125rem 0.5rem;
  text-decoration: none;
  vertical-align: baseline;
}
.leciona-menuo-butono:hover,
.leciona-menuo-butono:focus {
  background: #f8f9fa;
  border-color: #cfd4da;
  color: var(--bs-link-hover-color);
  text-decoration: none;
}
.leciona-menuo-butono.dropdown-toggle::after {
  display: none;
}
.leciona-menuo-butono.dropdown-toggle::before {
  border-bottom: 0;
  border-left: 0.3em solid transparent;
  border-right: 0.3em solid transparent;
  border-top: 0.3em solid;
  content: "";
  display: inline-block;
  vertical-align: 0.1em;
}
.leciona-menuo-listo {
  max-height: min(70vh, 24rem);
  overflow-y: auto;
}
.leciona-titolo-teksto {
  min-width: 0;
  text-wrap: balance;
}
.leciona-sago {
  align-items: center;
  display: flex;
}
.leciona-sago .btn {
  align-items: center;
  display: inline-flex;
  font-size: 1rem;
  height: 2.25rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 2.25rem;
}
.leciona-sago-antauxa {
  justify-content: start;
}
.leciona-sago-sekva {
  justify-content: end;
}
.gramatika-enhavtabelo {
  background-color: var(--toc-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
}
.gramatika-enhavtabelo ol {
  line-height: 1.65;
  margin-bottom: 0;
  padding-left: 0.5rem;
}
.gramatika-enhavtabelo ol::after {
  clear: both;
  content: "";
  display: block;
}
.gramatika-enhavtabelo li {
  display: list-item;
  float: left;
  list-style-position: inside;
  margin-right: 1.5rem;
}
.gramatika-enhavtabelo a {
  margin-left: 0.2rem;
  text-decoration: none;
}
.gramatika-teksto :is(h1, h2, h3, h4, h5, h6) {
  scroll-margin-top: calc(52px + 1rem);
}

.navbar {
  margin-bottom: 20px;
  min-height: 52px;
  padding-bottom: 0;
  padding-top: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.navbar > .navbar-enhavo {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-width: 0;
  flex-wrap: nowrap;
}
.navbar-brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  margin-right: 0;
  min-width: 0;
}
.navbar-retejo {
  font-weight: 600;
}
.navbar-iloj {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.4rem;
  margin-left: auto;
  min-width: 0;
}
.vortaro-form {
  flex: 1 1 18rem;
  max-width: 15ch;
  min-width: 4.5rem;
}
.vortaro-form .twitter-typeahead,
.vortaro-form .typeahead {
  min-width: 0;
  width: 100%;
}
.navbar-ikona-butono {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.375rem;
  justify-content: center;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.navbar-ikona-butono.dropdown-toggle::after {
  display: none;
}
.navbar-lingvoj {
  max-height: min(70vh, 24rem);
  overflow-y: auto;
}
.cxefpagxo {
  margin-bottom: 1.5rem;
  padding: 1.5rem 0;
  text-align: center;
}
.cxefpagxo-korpo > .container > .row {
  align-items: center;
  flex: 1 0 auto;
}
.cxefpagxo-kapo {
  justify-content: center;
  margin-bottom: 1.5rem;
}
.cxefpagxo-logo {
  flex: 0 0 auto;
}
.cxefpagxo-titolo {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
  margin-top: 0;
}
.cxefpagxo-subtitolo {
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.2;
}
.cxefpagxo-elektilo {
  justify-content: center;
  margin-top: 2rem;
}
.cxefpagxo-pri-esperanto {
  margin-top: 2.5rem;
}
.cxefpagxo-subteno {
  font-size: 1.05rem;
  margin-top: 1.5rem;
}
.cxefpagxo-subteno img {
  height: 2.2rem;
  margin-right: 0.35rem;
  width: auto;
}
.cxefpagxo-subteno a {
  white-space: nowrap;
}
#cxefpagxo-lingvoj {
  max-height: min(70vh, 24rem);
  overflow-y: auto;
}
.footer {
  background: #888;
  color: rgba(255, 255, 255, 0.75);
  margin-top: auto;
  padding: 1.25rem 0;
  width: 100%;
}
.footer-kolumnoj {
  display: grid;
  gap: 1rem;
}
.footer-listo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-licenco {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
}
.footer-licenco img {
  flex: 0 0 auto;
  height: 31px;
  width: 88px;
}

.nav-tabs .nav-link {
  align-items: center;
  display: inline-flex;
  gap: 0.3rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  white-space: nowrap;
}
.nav-tabs .nav-link.active {
  background-color: var(--exercise-field-bg);
}
.nav-tabs .tab-icon {
  align-items: center;
  display: inline-flex;
  line-height: 1;
}

@media (max-width: 575.98px) {
  .navbar > .navbar-enhavo {
    gap: 0.45rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .navbar-iloj {
    gap: 0.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    margin-left: 0;
  }
  .vortaro-form {
    flex-basis: auto;
    max-width: none;
    min-width: 0;
  }
  .navbar-ikona-butono {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }
}

@media (min-width: 768px) {
  .gramatika-korpo {
    align-items: start;
    display: grid;
    gap: 0 1.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem);
  }
  .gramatika-enhavtabelo {
    grid-column: 2;
    grid-row: 1;
    max-width: 15rem;
    position: sticky;
    top: calc(52px + 1rem);
    width: 100%;
  }
  .gramatika-enhavtabelo ol {
    display: block;
    padding-left: 1.25rem;
  }
  .gramatika-enhavtabelo li {
    float: none;
    margin-right: 0;
  }
  .gramatika-teksto {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .cxefpagxo-kapo {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  .nav-tabs {
    flex-wrap: nowrap;
  }
  .nav-tabs .nav-item {
    display: flex;
  }
  .nav-tabs .nav-link {
    gap: 0.2rem;
    justify-content: center;
    min-height: 2.4rem;
    min-width: 2rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    white-space: nowrap;
  }
  .nav-tabs .nav-link:not(.active) .tab-label {
    display: none;
  }
}

.card-header {
  padding: 10px 15px;
}
.card-header a {
  text-decoration: none;
}
.card-title {
  font-size: 16px;
  line-height: 1.1;
}
.footer a,
.footer a:hover,
.footer a:focus {
  color: #fff;
  text-decoration: none;
}
.footer .versio {
  color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 768px) {
  .footer-kolumnoj {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* popover */
.popover-header,
.popover-body {
  font-size: 18px;
}
.popover-header {
  line-height: 1.42857143;
  margin: 0;
}
.popover-body table {
  border-spacing: 0.5em;
  border-collapse: separate;
}
.popover-body table tr {
  vertical-align: top;
  text-align: left;
}
.popover-body table td:first-child {
  text-align: right;
}
a[data-bs-toggle="popover"],
a[data-bs-toggle="popover"]:hover,
a[data-bs-toggle="popover"]:focus {
  text-decoration: none;
}

/* Ekzercoj */
ol.tasko {
  padding-left: 40px;
}
.form-group {
  margin-bottom: 15px;
}
.form-horizontal {
  --exercise-label-column: clamp(9rem, 30vw, 10.5rem);
  align-items: center;
  column-gap: 0.75rem;
  display: grid;
  grid-template-columns: var(--exercise-label-column) max-content;
  row-gap: 18px;
}
.form-horizontal .form-group {
  margin-bottom: 0;
}
.form-horizontal .form-group.has-feedback {
  display: contents;
}
.form-horizontal .form-group:not(.has-feedback) {
  grid-column: 1 / -1;
}
.form-horizontal .control-label {
  font-weight: 700;
  justify-self: end;
  padding-right: 0;
  padding-top: 0;
  text-align: right;
  white-space: nowrap;
  width: auto;
}
.form-horizontal .col-sm-10 {
  justify-self: start;
  max-width: none;
  min-width: 0;
  padding-left: 0;
  position: relative;
  width: max-content;
}
.form-horizontal .form-control {
  display: inline-block;
  padding-right: 42.5px;
  width: auto;
}
.ekzerco3-tasko > div {
  margin-bottom: 1.25em;
}
.ekzerco3-tasko h4 {
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}
.form-horizontal .feedback-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.form-horizontal .solvu,
.form-horizontal .forigu {
  margin-top: 0.25em;
}
.form-inline .form-group {
  display: inline-block;
  margin: 0 0.2em 0.2em;
  position: relative;
  vertical-align: middle;
}
.form-inline .form-control {
  display: inline-block;
  font-size: 14px;
  height: 34px;
  line-height: 1.42857143;
  padding: 6px 42.5px 6px 12px;
  width: auto;
}
.form-inline .feedback-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.has-error input {
  background: var(--exercise-field-bg);
}
.has-success input {
  background: #eff8ef;
}
.feedback-icon {
  display: inline-block;
  font-weight: bold;
  min-width: 1.5em;
  text-align: center;
}
.feedback-icon-ok {
  color: #198754;
}
.feedback-icon-remove {
  color: #dc3545;
}

@media (min-width: 576px) {
  .form-horizontal .control-label {
    text-align: right;
  }
}

.fixed {
  position: fixed;
}

#logo {
  height: 32px;
  margin: 0;
  object-fit: contain;
  padding: 0;
  width: 32px;
}

#eksporto {
  float: right;
  margin-top: 1em;
}
div[dir="rtl"] #eksporto {
  float: left;
}
img.leciona {
  float: right;
  width: 50%;
  margin-left: 1em;
}
ul.pager {
  border-top: 1px solid var(--bs-border-color);
  clear: both;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 0.5rem;
  margin: 20px 0;
  padding-top: 1em;
}
ul.pager .next {
  text-align: right;
}
.ad {
  text-align: center;
  font-size: smaller;
  border-radius: 0.5em;
  padding: 0.5em;
  background: #eee;
}
