@import 'sphinx-book-theme.css';

html[data-theme="light"] {
    --pst-color-univention: rgb(208, 0, 2);
    --pst-color-link: var(--pst-color-univention);
    --tabs--label-text--active: var(--pst-color-univention);
    --tabs--label-text--active--hover: var(--tabs--label-text--active);
    --tabs--label-border--active: var(--tabs--label-text--active);
    --tabs--label-border--active--hover: var(--tabs--label-text--active);
}

html[data-theme="dark"] {
    --pst-color-univention: rgb(232,82,129);
    --pst-color-link: var(--pst-color-univention);
    --tabs--label-text--active: var(--pst-color-univention);
    --tabs--label-text--active--hover: var(--tabs--label-text--active);
    --tabs--label-border--active: var(--tabs--label-text--active);
    --tabs--label-border--active--hover: var(--tabs--label-text--active);
}

.navbar_extra_footer {
    text-align: center;
}

.site-title {
  font-size: var(--pst-font-size-h4);
  margin: 0.5em 0 0 0;
  text-align: center;
}

.navbar-nav li a:focus,
nav.bd-links .active > a,
.navbar-nav li.current > a,
.prev-next-area a p.prev-next-title {
  color: var(--pst-color-univention);
}

.toc-entry a.nav-link.active {
  color: var(--pst-color-univention);
  border-left-color: var(--pst-color-univention);
}

nav.bd-links .active:hover > a,
.navbar-nav li a:hover,
nav.bd-links li > a:hover,
.toc-entry a.nav-link:hover {
    color: var(--pst-color-univention);
}

.tab-set > label:hover {
    color: var(--pst-color-link-hover);
    border-color: var(--pst-color-link-hover);
}

a:hover {
    color: var(--pst-color-univention);
}

footer {
    font-size: 0.8em;
}

footer p,
footer > div.extra_footer {
    color: #868681;
}

a.reference.external:after {
    font-family: "Font Awesome 6 Free";
    font-weight: 600;
    content: "\f35d";
    font-size: 0.67em;
    padding-left: 0.33em;
}

span.menuselection {
    font-style: italic;
}

span.guilabel {
    background-color: var(--pst-color-dark);
    border-color: var(--pst-color-dark-text);
    color: var(--pst-color-dark-text);
}

.tab-set > input:checked + label + .tab-content {
    width: 100%;
}

a.feedbacklink {
    font-size: 0.8em;
    float: right;
    clear: right;
    opacity: 0;
    transition: all .3s ease-out;
    vertical-align: bottom;
    padding: 5px 0;
}

h1:hover > a.feedbacklink,
h2:hover > a.feedbacklink,
h3:hover > a.feedbacklink,
h4:hover > a.feedbacklink,
h5:hover > a.feedbacklink,
h6:hover > a.feedbacklink {
    visibility: visible;
    opacity: 0.5;
}

a.feedbacklink:hover {
    opacity: 1 !important;
}

a.feedbacklink > i {
    color: rgba(var(--pst-color-sidebar-link),1);
}

.tab-content {
    padding-bottom: .8em;
    border-bottom: 1px solid #e6e6e6;
}

/*
* CSS controlling the modal of typesense-docsearch
*/

@media screen, print {
  .DocSearch-Button-Keys,
  .DocSearch-Button-Placeholder {
    display: none;
  }
}

.DocSearch-Hit-source {
  color: var(--pst-color-univention);
}

.DocSearch-Hits mark {
  color: var(--pst-color-univention);
}

.DocSearch-Form {
  box-shadow: var(--pst-color-univention) 0px 0px 0px 2px inset;
}

.DocSearch-Hit[aria-selected="true"] a {
  background-color: var(--pst-color-univention);
}

.DocSearch-MagnifierLabel {
  color: var(--pst-color-univention);
}

.DocSearch-Reset:hover {
  color: var(--pst-color-univention);
}


.DocSearch-Button {
  margin: 0;
  background-color: unset;
}

.DocSearch-Button:hover,
.DocSearch-Button:active,
.DocSearch-Button:focus {
  box-shadow: var(--pst-color-univention) 0px 0px 0px 2px inset;
}

.DocSearch-Commands {
  display: none;
}

.DocSearch-Cancel {
  color: var(--bs-univention-red);
}

.DocSearch-Hit-content-wrapper {
  line-height: unset;
}

@media (min-width: 769px) and (max-width: 992px) {
    :root {
      --univention-header-height: 3.5rem;
      --docsearch-modal-height: calc(100vh - var(--univention-header-height) - var(--docsearch-footer-height));
    }

    .DocSearch-Dropdown {
    height: calc(
      var(--docsearch-vh, 1vh) * 100 -
      var(--univention-header-height) -
      var(--docsearch-searchbox-height) -
      var(--docsearch-spacing) -
      var(--docsearch-footer-height));
  }

  .DocSearch-Modal {
    margin-top: var(--univention-header-height) !important;
  }
}

@media (max-width: 768px) {
  :root {
    --univention-header-height: 3.5rem;
  }
  .DocSearch-Dropdown {
    height: calc(
      var(--docsearch-vh, 1vh) * 100 -
      var(--univention-header-height) -
      var(--docsearch-searchbox-height) -
      var(--docsearch-spacing) -
      var(--docsearch-footer-height));
  }

  .DocSearch-Modal {
    margin-top: var(--univention-header-height) !important;
    height: calc(100% - var(--univention-header-height));
  }
}
