@import url("../example/css/theme.css");

html {
	background: var(--backgroundHtml);
}

body {
	font-family: system-ui;
	font-size: 125%;
	color: var(--text);
	max-width: 35em;
	
	display: flex;
	min-height: 100dvh;
	margin: 0 auto;
	flex-direction: column;
	
	background: var(--background);
}

main {
	min-height: 5em;
	flex: 1;
	margin: 0;
	
/* 	background: var(--background); */
}


samp {
	display: inline-block;
	width: 2em;
	font-weight: bold;
	font-family: monospace;
	text-align: center;
	white-space: pre;
	background: var(--backgroundItem);
	border: var(--borderWidth) solid var(--text);
}
.ok   { background: var(--backgroundOk); }
.warn { background: var(--backgroundWarning); }
.crit { background: var(--backgroundCritical); }

header, footer {
	margin: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0;
}

header {
	margin: 0;
/* 	border-bottom: var(--borderWidth) solid var(--textTitle); */
	color: var(--textTitle);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
}

header h4 {
	margin: 0;
	padding: 0.25em 0.25em;
	font-size: 125%;
	text-align: center;
	background: var(--backgroundTitle);
}

header ul {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: row;
	justify-content: center;
	gap: 0.125em;
	padding-top: 0.125em;
/* 	background: var(--backgroundTitle); */
}

header ul li {
	padding: 0.25em;
	list-style: none;
	flex: auto;
	color: var(--textTitle);
	background: var(--backgroundTitle);
/* 	border: var(--borderWidth) solid var(--textHeader); */
/* 	border-left: 0; */
	display: block;
	text-align: center;
	border-radius: 0.25em;
}

header ul li:first-child {
	border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
}

header ul li:last-child {
	border-radius: var(--borderRadius) 0 0 var(--borderRadius);
}

header ul li a {
	color: inherit;
	text-decoration: none;
}


footer {
	font-size: 75%;
	display: flex;
	flex-direction: row;
	gap: 0.25em;
	padding: 0;
	justify-content: space-between;
}

footer a {
	color: var(--textFooter);
}

footer span {
/* 	border-style: solid; */
/* 	border-color: var(--textFooter); */
/* 	border-width: var(--borderWidth) var(--borderWidth) 0 0; */
	
	background: var(--backgroundTitle);
	color: var(--textTitle);
	flex: 2;
	padding: 0.5em;
	text-align: center;
	border-radius: 0 var(--borderRadius) 0 0;
}

button#btnTheme {
	width: 5em;
	color: var(--textTheme);
	background: var(--backgroundTheme);
	padding: 0.25em;
	
	border: 0;
/* 	border-style: solid; */
/* 	border-color: var(--textFooter); */
/* 	border-width: var(--borderWidth) 0 0 var(--borderWidth); */
	border-radius: var(--borderRadius) 0 0 0;
}


main :is(h4, h5, p) {
	padding: 0 0.5em;
	margin: 1em 0;
}

main :is(h4, h5) {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	padding: 0;
	gap: 0.25em;
}

main :is(h4, h5) a {
	width: 100%;
	text-align: left;
	color: inherit;
	display: inline-block;
	color: var(--textOk);
	background: var(--backgroundOk);
	padding: 0.25em 0.5em;
	margin: 0;
	text-decoration: none;
}

main :is(h4, h5) a:first-child {
	border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
}

main :is(h4, h5) a:last-child {
	border-radius: var(--borderRadius) 0 0 var(--borderRadius);
	width: 2em;
	text-align: center;
}

a:hover {
	filter: brightness(0.9);
}

a:active {
	filter: brightness(0.8);
}


.gallery {
	display: flex;
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.5em;
	max-width: 100%;
}

.gallery img {
	height: 10em;
	border-radius: var(--borderRadius);
}

dl {
	display: grid;
	grid-template-columns: auto auto;
	margin: 0.25em 0;
	font-family: monospace;
}

dl * {
	display: inline;
	vertical-align: top;
	padding: 0.25em;
}

dl > *:first-child {
	border-top-left-radius: var(--borderRadius);
	border-top-right-radius: var(--borderRadius);
}

dl > *:last-child {
	border-bottom-left-radius: var(--borderRadius);
	border-bottom-right-radius: var(--borderRadius);
}

dl :is(dt, dd) {
	margin: 0;
	padding: 0.5em;
}

dl dt {
	font-weight: bolder;
}

main :not(h4,h5) a {
	color: var(--textLink);
}

main :not(h4,h5) a:visited {
	color: var(--textLinkVisited);
}

p.disclaimer {
	font-variant: small-caps;
	font-weight: bolder;
	color: var(--backgroundColorCritical);
	border-style: solid;
	border-color: var(--backgroundColorCritical);
	border-width: 0 0.25em;
	margin: 0.5em;
}

h4.disclaimer {
	background: var(--backgroundCritical);
	color: var(--textCritical);
	padding: 0.25em 0.5em;
}

main ul {
}

main h5 {
	font-size: 100%;
/* 	padding: 0.25em 0.5em; */
	margin: 1em 0.5em;
	border-bottom: 0.125em solid var(--text);
}
