/*
Theme Name: AV Dude
Theme URI: https://avdude.com/
Author: AV Dude
Author URI: https://avdude.com/
Description: Block theme for avdude.com: plugins, modules and custom WordPress development. Pairs with the AV Dude Site companion plugin for the availability and copyright blocks.
Version: 0.1.3
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: avdude
Tags: full-site-editing, custom-colors, editor-style
*/

/* Only what theme.json cannot express. */

body {
	/* Keep fallback fonts at the same visual size while web fonts load. */
	font-size-adjust: from-font;
	-webkit-font-smoothing: antialiased;
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--marigold-ink);
	outline-offset: 3px;
}

:where(.has-navy-background-color, .is-style-card-navy) :focus-visible {
	outline-color: var(--wp--preset--color--marigold);
}

/* Header, main and footer sit flush; sections carry their own padding. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Links on navy surfaces inherit the light text color. */
:where(.has-navy-background-color, .has-navy-soft-background-color, .is-style-card-navy) a:where(:not(.wp-element-button)) {
	color: inherit;
}

/* Header bottom rule. */
.avdude-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Checklist list style. */
.wp-block-list:is(.is-style-checklist, .is-style-crosslist) {
	list-style: none;
}

.wp-block-list:is(.is-style-checklist, .is-style-crosslist) > li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
}

.wp-block-list.is-style-checklist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.25rem;
	height: 1.25rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-list.is-style-plain {
	list-style: none;
}

.wp-block-list.is-style-plain > li + li {
	margin-top: 0.5rem;
}

.wp-block-list.is-style-crosslist > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.25rem;
	height: 1.25rem;
	background-color: var(--wp--preset--color--marigold-ink);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.avdude-availability-card {
	align-self: center;
}

.avdude-purchase-card {
	align-self: start;
	position: sticky;
	top: var(--wp--preset--spacing--40);
}

/* Details (FAQ) summary. */
.wp-block-details summary {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
	cursor: pointer;
}

/* Comparison table. */
.wp-block-table.is-style-avdude-compare {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--medium);
}

.wp-block-table.is-style-avdude-compare table {
	min-width: 32rem;
	border-collapse: collapse;
}

.wp-block-table.is-style-avdude-compare :where(th, td) {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.85rem 1rem;
}

.wp-block-table.is-style-avdude-compare thead th {
	border-bottom: 2px solid var(--wp--preset--color--navy);
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
}

.wp-block-table.is-style-avdude-compare :where(th, td) {
	text-align: left;
}

.wp-block-table.is-style-avdude-compare :where(td, th):not(:first-child) {
	text-align: center;
}

/* Availability panel (block from the AV Dude Site plugin). */
.avdude-availability__label {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--marigold);
}

.avdude-availability__text {
	margin: 0.5rem 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.2;
}

.avdude-availability__updated {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--mist-on-navy);
}

/* Documentation (blocks from the AV Dude Site plugin). */
.avdude-docs-nav {
	position: sticky;
	top: var(--wp--preset--spacing--40);
	font-size: 0.9375rem;
}

.avdude-docs-nav__home {
	margin: 0 0 0.75rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
}

.avdude-docs-nav :where(ul) {
	list-style: none;
	margin: 0;
	padding: 0;
}

.avdude-docs-nav ul ul {
	padding-left: 0.85rem;
	border-left: 1px solid var(--wp--preset--color--line);
	margin: 0.25rem 0 0.5rem;
}

.avdude-docs-nav a {
	display: block;
	padding: 0.35rem 0.5rem;
	border-radius: 8px;
	text-decoration: none;
	color: var(--wp--preset--color--navy-deep);
}

.avdude-docs-nav a:hover {
	background: var(--wp--preset--color--mist);
}

.avdude-docs-nav :is(.current_page_item, .current-menu-item) > a,
.avdude-docs-nav a[aria-current="page"] {
	background: var(--wp--preset--color--mist);
	font-weight: 700;
	box-shadow: inset 3px 0 0 var(--wp--preset--color--marigold);
}

.avdude-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--slate);
}

.avdude-breadcrumbs li + li::before {
	content: "/";
	margin-right: 0.5rem;
	color: var(--wp--preset--color--line);
}

.avdude-docs-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	margin-top: var(--wp--preset--spacing--50);
}

.avdude-docs-pager a {
	flex: 1 1 14rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--medium);
	text-decoration: none;
	font-weight: 700;
	color: var(--wp--preset--color--navy-deep);
}

.avdude-docs-pager a:hover {
	background: var(--wp--preset--color--mist);
}

.avdude-docs-pager span {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--slate);
}

.avdude-docs-pager__next {
	text-align: right;
}

@media (max-width: 781px) {
	.avdude-docs-nav {
		position: static;
	}
}
