/*custom link color, reduce the gap under secondary side-bar*/
:root {
  --pst-color-primary: #0171bc !important;
  --pst-header-height: 0.1em;
}

.prev-next-footer {
    visibility: hidden;
}

/*wbsrv logo for dark mode*/
:root[data-mode='dark'] img:not(.only-dark):not(.dark-light) {
          filter: invert(1) hue-rotate(180deg);
}

section li {
    margin-bottom: .65em;
}

/*fit rpm OSs tabs into one line in sphinx-tabs*/
.sphinx-tabs-tab {
  padding: 0.75rem 1rem;
}

.bd-telegram {
    padding-left: .4em;
    line-height: 2.1em;
}

/* If top banner has an <a> tag inside, render */
.bd-header:has(a) {
    padding: .4rem;
    line-height: 1.2;
    font-size: var(--pst-sidebar-font-size);
    text-align: center;
    background-color: var(--sd-color-primary) !important;
    box-shadow: 2px 2px 2px #d8d8d8;
}

.bd-header a {
    color: var(--sd-color-primary-text) !important;
    text-decoration: underline;
}

.bd-header a:hover {
    text-decoration: none;
}

/*hidden scrollbar in sidebar, both vertical and horizontal*/
.bd-sidebar-primary {
    overflow-x: hidden;
    overflow-y: hidden;
}

/*hidden horizontal scrollbar in secondary sidebar*/
.bd-sidebar-secondary {
    overflow-x: hidden;
    overflow-y: auto;
}

/*whole page horizaontal padding off*/
.bd-page-width {
    max-width: 91rem;
}

/*extend main article block for *directives* pages*/
.bd-main {
    flex-grow: 1;
}

/*# sphinx-tabs extension dark mode backgrounds*/
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .sphinx-tabs-panel {
    color: white;
    background-color: rgb(50, 50, 50);
  }

  html[data-theme="auto"] .sphinx-tabs-tab {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
  }

  html[data-theme="auto"] .sphinx-tabs-tab[aria-selected="true"] {
    border-bottom: 1px solid rgb(50, 50, 50);
    background-color: rgb(50, 50, 50);
  }
}

html[data-theme="dark"] .sphinx-tabs-panel {
  color: white;
  background-color: rgb(50, 50, 50);
}

html[data-theme="dark"] .sphinx-tabs-tab {
  color: white;
  background-color: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
  border-bottom: 2px solid rgb(50, 50, 50);
  background-color: rgb(50, 50, 50);
}

/*# article-header iconlinks icons alignment*/
.bd-header-article .btn {
  font-size: calc(var(--pst-font-size-base) - .1rem) !important;
}

.btn-outline-primary {
  --bs-btn-hover-bg: none;
  --bs-btn-active-bg: none;
  color:var(--pst-color-primary);
}

.theme-switch-button:active a, .theme-switch-button:hover a {
    color:var(--pst-color-primary);
}

/*# moves apart text and image items in custom footer*/
footer.bd-footer-content .bd-footer-content__inner {
    padding-left:0;
    width:100%;
}

.sd-row > * {
  padding: calc(var(--sd-gutter-x) * 0.5)
}

#angie td:first-child [class^="os-"] a:before,
#angie-pro td:first-child [class^="os-"] a:before {
  content: "";
  display: inline-block;
  background-image: url('os.png');
  width: 16px;
  height: 16px;
  position: relative;
  bottom: -3px;
  margin-right: .3rem;
}

#angie .os-alpine a:before,
#angie-pro .os-alpine a:before {
  background-position: -16px;
}

#angie .os-alt a:before,
#angie-pro .os-alt a:before {
  background-position: -32px;
}

#angie .os-astra a:before,
#angie-pro .os-astra a:before {
  background-position: -48px;
}

#angie .os-cent a:before,
#angie-pro .os-cent a:before {
  background-position: -64px;
}

#angie .os-debian a:before,
#angie-pro .os-debian a:before {
  background-position: -80px;
}

#angie .os-freebsd a:before,
#angie-pro .os-freebsd a:before {
  background-position: -96px;
}

#angie .os-suse a:before,
#angie-pro .os-suse a:before {
  background-position: -112px;
}

#angie .os-oracle a:before,
#angie-pro .os-oracle a:before {
  background-position: -128px;
}

#angie .os-red a:before,
#angie-pro .os-red a:before {
  background-position: -144px;
}

#angie .os-rocky a:before,
#angie-pro .os-rocky a:before {
  background-position: -160px;
}

#angie .os-rosa a:before,
#angie-pro .os-rosa a:before {
  background-position: -176px;
}

#angie .os-ubuntu a:before,
#angie-pro .os-ubuntu a:before {
  background-position: -192px;
}

/* Breadcrumbs */

.compact-breadcrumbs {
  margin-top: -2px;
}

.compact-breadcrumbs a:last-child {
  font-weight: bold;
}

/* ToC */

.sidebar-primary-item > ul:not(:last-child) {
    margin-bottom: 0;
}
