/* ============================================================
General pkgdown page header control
============================================================ */

.page-header {
position: relative !important;
border-bottom: 1px solid #dee2e6 !important;
padding-bottom: 0.25rem !important;
margin-bottom: 1.15rem !important;
}

/* Logo should not push the horizontal line downward */
.page-header img.logo,
.page-header img[src*="logo"] {
position: absolute !important;
right: 0.25rem !important;
height: auto !important;
max-height: none !important;
}

/* Leave room for the logo inside the header */
.page-header h1,
.page-header p {
padding-right: 190px !important;
}

/* ============================================================
Homepage
============================================================ */

.template-home .page-header {
min-height: 56px !important;
padding-bottom: 0.15rem !important;
margin-bottom: 1rem !important;
}

.template-home .page-header h1 {
margin-bottom: 0 !important;
}

/* Homepage logo: larger than other pages */
.template-home .page-header img.logo,
.template-home .page-header img[src*="logo"] {
top: -2.6rem !important;
width: 185px !important;
max-width: 185px !important;
}

/* Keep homepage overview readable without making it too narrow */
.template-home h2#overview + p {
  padding-right: 70px !important;
}

/* ============================================================
Reference / article / other pages
============================================================ */

body:not(.template-home) .page-header {
min-height: 58px !important;
padding-bottom: 0.2rem !important;
margin-bottom: 1.1rem !important;
}

/* Non-homepage logo: smaller than homepage, but still visible */
body:not(.template-home) .page-header img.logo,
body:not(.template-home) .page-header img[src*="logo"] {
top: -0.45rem !important;
width: 145px !important;
max-width: 145px !important;
}

/* ============================================================
Navbar logo, if pkgdown ever uses one there
============================================================ */

.navbar img.logo,
.navbar img[src*="logo"],
.navbar-brand img.logo,
.navbar-brand img[src*="logo"] {
position: static !important;
width: 36px !important;
max-height: 36px !important;
height: auto !important;
}

/* Hide redundant full-license link in pkgdown sidebar */
aside li:has(a[href="LICENSE.html"]),
aside li:has(a[href$="/LICENSE.html"]) {
  display: none !important;
}
