/* Grav additions to Solid State: Markdown headings and Form plugin markup. */

/* Markdown can't add class="major", so pages and Text sections opt in with .major-headings. */
.major-headings > h2,
.major-headings > h3 {
	padding-bottom: 1em;
	border-bottom: solid 2px rgba(255, 255, 255, 0.125);
}

/* Form plugin. The theme's form templates output the template's own .fields / .field / ul.actions
   markup, so the rules below only cover what the Form plugin adds around it. */

/* Footer: the form sits in a .form-wrapper, which takes the form's place in the two-column layout. */
#footer .inner > .form-wrapper {
	margin: 0 3em 0 0;
	width: calc(50% - 1.5em);
}

	#footer .inner > .form-wrapper form {
		margin: 0;
		width: 100%;
	}

@media screen and (max-width: 1280px) {
	#footer .inner > .form-wrapper {
		margin: 0 0 4em 0;
		width: 100%;
	}
}

@media screen and (max-width: 736px) {
	#footer .inner > .form-wrapper {
		margin: 0 0 3em 0;
	}
}

.form-wrapper {
	margin-bottom: 2em;
}

/* Spam trap: must stay hidden from people. */
.form-honeybear {
	display: none !important;
}

.form-wrapper .form-label label {
	display: block;
}

.form-wrapper .required {
	color: rgba(255, 255, 255, 0.55);
	margin-left: 0.25em;
}

.form-wrapper .form-description {
	display: block;
	font-size: 0.9em;
	margin-top: 0.5em;
	opacity: 0.75;
}

/* The plugin puts an inline display: inline on option labels; the template's checkbox and radio styling needs inline-block. */
.form-wrapper input[type="checkbox"] + label,
.form-wrapper input[type="radio"] + label {
	display: inline-block !important;
	margin-bottom: 0.5em;
}

.form-wrapper .radio,
.form-wrapper .checkboxes {
	display: inline-block;
}

/* Field errors and the sent / failed notices. */
.form-wrapper .has-errors input,
.form-wrapper .has-errors select,
.form-wrapper .has-errors textarea {
	border-color: #e57373;
}

.form-wrapper .form-message,
.form-wrapper .form-errors p {
	color: #f2a6a6;
	font-size: 0.9em;
	margin: 0.5em 0 0 0;
}

.form-wrapper .notices,
.form-wrapper .form-errors {
	border-radius: 5px;
	border: solid 2px rgba(255, 255, 255, 0.125);
	margin-bottom: 2em;
	padding: 1em 1.25em;
}

	.form-wrapper .notices.green,
	.form-wrapper .notices.success {
		background: rgba(107, 195, 161, 0.12);
		border-color: #6bc3a1;
	}

	.form-wrapper .notices.red,
	.form-wrapper .notices.error,
	.form-wrapper .form-errors {
		background: rgba(229, 115, 115, 0.12);
		border-color: #e57373;
	}

	.form-wrapper .notices p:last-child {
		margin-bottom: 0;
	}

/* Active page in the slide-out menu. */
#menu .links li.active a {
	color: #ffffff;
	font-weight: 600;
}

/* Spotlight photos: rectangle option for screenshots. */
.wrapper.spotlight .image.rectangle {
	border-radius: 5px;
	width: 30em;
}

	.wrapper.spotlight .image.rectangle img {
		border-radius: 5px;
	}

@media screen and (max-width: 980px) {
	.wrapper.spotlight .image.rectangle {
		max-width: 100%;
		width: 100%;
	}
}

/* Banner buttons. */
#banner .actions {
	margin-top: 2.5em;
}

/* Images in Markdown page text (screenshots). */
.major-headings p > img,
.wrapper .inner > p > img {
	border-radius: 5px;
	display: block;
	height: auto;
	max-width: 100%;
}

.major-headings p > img + em,
.screenshot-caption {
	display: block;
	font-size: 0.9em;
	margin-top: 0.75em;
	opacity: 0.8;
}

/* Download table. */
.downloads td {
	vertical-align: top;
}

.downloads .button {
	margin-bottom: 0.5em;
}

.downloads .download-meta {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
}

.downloads .download-sha code {
	font-size: 0.8em;
	word-break: break-all;
}

.downloads .download-pending {
	font-style: italic;
	opacity: 0.75;
}

/* Long lines in code samples scroll instead of widening the page. */
pre {
	max-width: 100%;
	overflow-x: auto;
}

/* Frosted header: translucent with the page blurred behind it. Clear over the banner. */
#header {
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	background-color: rgba(53, 56, 73, 0.75);
}

	#header.alt {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background-color: transparent;
	}

/* Logo in the header, beside the site title. */
#header h1 a {
	align-items: center;
	display: inline-flex;
	gap: 0.6em;
}

#header .header-logo {
	border-radius: 22%;
	height: 2.2em;
	width: 2.2em;
}

/* Banner showing the site logo instead of an icon (keeps the template's fade-in). */
#banner .logo.logo-image {
	height: 7.5em;
	width: 7.5em;
}

	#banner .logo.logo-image img {
		border-radius: 22%;
		box-shadow: 0 0.75em 2em rgba(0, 0, 0, 0.35);
		display: block;
		height: 100%;
		width: 100%;
	}

@media screen and (max-width: 736px) {
	#banner .logo.logo-image {
		height: 5.5em;
		width: 5.5em;
	}
}

/* Banner with its own background image (set on the banner section). */
#banner.has-background {
	background-attachment: scroll, scroll;
	background-position: center, center;
	background-repeat: no-repeat, no-repeat;
	background-size: cover, cover;
}
