/*
 * Aligns the Antora UI with the rtlscloud application theme
 * (core/ui/vaadin-theme/.../rtlscloud/styles.css).
 *
 * Loaded after site.css, which is the stock Antora default UI. That bundle
 * predates CSS custom properties, so its values are hard coded and have to be
 * overridden selector by selector rather than through variables.
 */

/* Open Sans is the application's --lumo-font-family. Only the weights the
 * documentation actually uses are shipped. */
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(../font/open-sans/OpenSans-regular.woff) format('woff');
}

@font-face {
	font-family: 'Open Sans';
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url(../font/open-sans/OpenSans-italic.woff) format('woff');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(../font/open-sans/OpenSans-600.woff) format('woff');
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url(../font/open-sans/OpenSans-700.woff) format('woff');
}

:root {
	/* Mirrors the application tokens: primary text, accent, radius. */
	--rtls-text-color: hsl(0, 0%, 30%);
	--rtls-accent-color: hsl(211, 100%, 50%);
	--rtls-border-color: hsl(0, 0%, 88%);
	--rtls-surface-color: hsl(0, 0%, 97%);
	--rtls-radius: 5px;
	--rtls-font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

body,
h1, h2, h3, h4, h5, h6,
.navbar,
.doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 {
	font-family: var(--rtls-font-family);
}

body {
	color: var(--rtls-text-color);
}

/* Header: white like the application's app bar, separated by a hairline
 * instead of the stock dark block. */
.navbar {
	background: #fff;
	color: var(--rtls-text-color);
	border-bottom: 1px solid var(--rtls-border-color);
}

.navbar-brand .navbar-item,
.navbar-end .navbar-link,
.navbar-end > .navbar-item {
	color: var(--rtls-text-color);
}

.navbar-burger span {
	background-color: var(--rtls-text-color);
}

/* The brand slot carries the logo, so the stock text sizing does not apply.
 * The wordmark is wide (477x84), so it has to shrink rather than push the
 * search field off screen on narrow viewports. */
.navbar-brand .navbar-item.navbar-brand-logo {
	padding: 0 0 0 0.25rem;
	-webkit-box-flex: 0;
	-ms-flex: 0 1 auto;
	flex: 0 1 auto;
	min-width: 0;
}

.navbar-brand-logo img {
	display: block;
	height: 1.75rem;
	width: auto;
	max-width: 100%;
	-o-object-fit: contain;
	object-fit: contain;
	-o-object-position: left center;
	object-position: left center;
}

@media screen and (max-width: 1023px) {
	.navbar-brand-logo img {
		height: 1.5rem;
	}
}

/* Language switcher */
.navbar-item.language-switcher {
	gap: 0.25rem;
	padding-right: 1rem;
}

.language-switcher a {
	color: var(--rtls-text-color);
	border: 1px solid var(--rtls-border-color);
	border-radius: var(--rtls-radius);
	padding: 0.1rem 0.45rem;
	font-size: 0.8rem;
	line-height: 1.5;
}

.language-switcher a:hover {
	background: var(--rtls-surface-color);
}

.language-switcher a[aria-current='true'] {
	background: var(--rtls-accent-color);
	border-color: var(--rtls-accent-color);
	color: #fff;
}

/* Links and accents pick up the application's selection colour. */
.doc a,
.nav-menu a:hover,
.toc a:hover {
	color: var(--rtls-accent-color);
}

.nav-menu .is-current-page > .nav-link {
	color: var(--rtls-accent-color);
}

footer.footer {
	padding: 3px;
	padding-left: 10px;
}
