/*
 * RacerPacer Runs theme.
 *
 * Every colour is one of the --rpr-* custom properties that functions.php writes
 * onto <body> from the RacerPacer Runs plugin's style settings, already
 * contrast-checked. No hex values here, so a club's colour set, accent and fonts
 * reach every page, WooCommerce's included.
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scrollbar-gutter: stable;
}
body.rprt {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--rpr-bg);
	color: var(--rpr-text);
	font-family: var(--rpr-font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
body.rpr-mode-dark {
	color-scheme: dark;
}
img,
video,
iframe {
	max-width: 100%;
	height: auto;
}

/* ---- The page background, as chosen in the plugin's style settings ---- */
.rprt-backdrop {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.rpr-bg-gradient .rprt-backdrop {
	background: radial-gradient(120% 70% at 50% 0%, var(--rpr-glow) 0%, var(--rpr-bg) 70%);
}
.rpr-bg-contour .rprt-backdrop {
	background: var(--rpr-pattern);
	-webkit-mask: url("../img/contour.svg") center / cover no-repeat;
	mask: url("../img/contour.svg") center / cover no-repeat;
}
.rpr-bg-dots .rprt-backdrop {
	background-image: radial-gradient(var(--rpr-pattern) 1.6px, transparent 1.8px);
	background-size: 22px 22px;
	-webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.35) 100%);
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.35) 100%);
}

/* ---- Layout ---- */
.rprt-header,
.rprt-main,
.rprt-footer {
	position: relative;
	z-index: 1;
}
.rprt-main {
	flex: 1;
}
.rprt-container {
	width: 100%;
	margin-inline: auto;
	padding-inline: 16px;
}
.rprt-narrow {
	max-width: 752px;
}
.rprt-wide {
	max-width: 1132px;
}
.rprt-page {
	padding-block: 40px 64px;
}
.rprt-home {
	max-width: 612px;
	padding-block: 48px 64px;
}
.rprt-skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 10;
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--rpr-text);
	color: var(--rpr-bg);
}
.rprt-skip:focus {
	left: 8px;
}
:focus-visible {
	outline: 3px solid var(--rpr-accent-text);
	outline-offset: 3px;
}

/* ---- Header ---- */
.rprt-header {
	border-bottom: 1px solid var(--rpr-border);
	background: var(--rpr-surface);
}
.rprt-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	min-height: 64px;
	padding-block: 10px;
}
.rprt-brand {
	color: inherit;
	font-family: var(--rpr-font-head);
	font-weight: var(--rpr-head-weight);
	font-size: 20px;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.rprt-brand-logo img {
	display: block;
	width: auto;
	max-height: 44px;
}
.rprt-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rprt-menu a {
	display: inline-block;
	padding: 8px 0;
	color: inherit;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}
.rprt-menu a:hover,
.rprt-menu .current-menu-item > a,
.rprt-menu .current_page_item > a {
	color: var(--rpr-accent-text);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 2px;
}

/* ---- Type ---- */
h1,
h2,
h3,
h4 {
	margin: 1.6em 0 0.5em;
	font-family: var(--rpr-font-head);
	font-weight: var(--rpr-head-weight);
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
h2 {
	font-size: 26px;
}
h3 {
	font-size: 21px;
}
.rprt-page-title {
	margin: 0 0 24px;
	font-size: clamp(30px, 6vw, 44px);
	line-height: 1.1;
	letter-spacing: -0.02em;
}
.rprt-h2 {
	margin: 0 0 14px;
	font-size: 22px;
}
a {
	color: var(--rpr-accent-text);
	text-underline-offset: 3px;
}
.rprt-content > * {
	margin-block: 0 1.1em;
}
.rprt-content > .alignwide {
	width: min(1100px, calc(100vw - 32px));
	max-width: none;
	margin-inline: calc((100% - min(1100px, calc(100vw - 32px))) / 2);
}
.rprt-content > .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: calc(50% - 50vw);
}
.rprt-content blockquote {
	margin-inline: 0;
	padding-left: 18px;
	border-left: 3px solid var(--rpr-accent-text);
}
.rprt-content table {
	width: 100%;
	border-collapse: collapse;
}
.rprt-content th,
.rprt-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--rpr-border);
	text-align: left;
}
.rprt-featured {
	margin: 0 0 24px;
}
.rprt-featured img {
	display: block;
	width: 100%;
	border-radius: 16px;
}
.rprt-post-date {
	margin: 0 0 8px;
	color: var(--rpr-text);
	font-size: 14px;
	font-weight: 600;
}
.rprt-post-date a {
	color: inherit;
}

/* ---- Buttons and forms ---- */
.rprt-btn,
.wp-block-button__link,
button,
input[type="submit"],
input[type="button"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--rpr-radius);
	background: var(--rpr-accent);
	color: var(--rpr-on-accent);
	font: inherit;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: transform 150ms, box-shadow 150ms;
}
.rprt-btn:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce input.button:hover {
	background: var(--rpr-accent);
	color: var(--rpr-on-accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.rprt-btn-quiet,
.is-style-outline > .wp-block-button__link {
	background: var(--rpr-surface);
	color: var(--rpr-text);
	box-shadow: inset 0 0 0 1px var(--rpr-edge);
}
/* The plugin's own chips and dialog buttons keep their look. */
.rpr button.rpr-chip {
	min-height: 40px;
	padding: 8px 16px;
	background: var(--rpr-surface);
	color: var(--rpr-text);
	font-weight: 400;
	transform: none;
}
.rpr button.rpr-chip.rpr-chip-small {
	min-height: 30px;
	padding: 4px 12px;
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--rpr-edge);
	border-radius: 10px;
	background: var(--rpr-surface);
	color: var(--rpr-text);
	font: inherit;
}
label {
	font-weight: 600;
}

/* ---- Home ---- */
.rprt-home-section,
.rprt-home-content {
	margin-top: 48px;
}
.rprt-more {
	margin: 16px 0 0;
	text-align: center;
}

/* ---- Post lists ---- */
.rprt-posts {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rprt-post-card {
	padding: 16px 18px;
	border-radius: 16px;
	background: var(--rpr-surface);
	color: var(--rpr-text);
	box-shadow: inset 0 0 0 1px var(--rpr-border);
}
.rprt-post-title {
	margin: 0;
	font-size: 19px;
}
.rprt-post-title a {
	color: inherit;
	text-decoration: none;
}
.rprt-post-title a:hover {
	text-decoration: underline;
}
.rprt-post-excerpt {
	margin: 6px 0 0;
	color: var(--rpr-muted);
	font-size: 15px;
}
.navigation.pagination {
	margin-top: 24px;
}
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--rpr-edge);
	color: inherit;
	text-decoration: none;
}
.page-numbers.current {
	background: var(--rpr-accent);
	color: var(--rpr-on-accent);
	box-shadow: none;
}
.rprt-tags a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 2px 12px;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--rpr-edge);
	color: inherit;
	font-size: 14px;
	text-decoration: none;
}

/* ---- Comments ---- */
.rprt-comments {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--rpr-border);
}
.rprt-comment-list,
.rprt-comment-list .children {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.rprt-comment-list .children {
	padding-left: 20px;
}
.rprt-comment-list .comment-body {
	margin-bottom: 10px;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--rpr-surface);
	box-shadow: inset 0 0 0 1px var(--rpr-border);
}
.comment-form p {
	margin: 0 0 14px;
}
.comment-form label {
	display: block;
	margin-bottom: 4px;
}

/* ---- Footer ---- */
.rprt-footer {
	border-top: 1px solid var(--rpr-border);
	background: var(--rpr-surface);
	font-size: 15px;
}
.rprt-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 20px;
}
.rprt-footer-menu a {
	font-size: 15px;
	font-weight: 400;
}
.rprt-colophon {
	margin: 0;
	color: var(--rpr-muted);
}

/* ---- WooCommerce: enough that a shop sits properly in the layout ---- */
.rprt-shop .page-title,
.rprt-shop .product_title {
	margin: 0 0 24px;
	font-size: clamp(30px, 6vw, 44px);
	line-height: 1.1;
}
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
	margin: 24px 0;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after {
	content: none;
}
.woocommerce ul.products li.product {
	float: none;
	width: auto;
	margin: 0;
	padding: 14px;
	border-radius: 16px;
	background: var(--rpr-surface);
	box-shadow: inset 0 0 0 1px var(--rpr-border);
}
.woocommerce ul.products li.product a {
	color: inherit;
	text-decoration: none;
}
.woocommerce ul.products li.product img {
	display: block;
	width: 100%;
	margin-bottom: 10px;
	border-radius: 10px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 4px;
	font-size: 18px;
}
.woocommerce .price,
.woocommerce ul.products li.product .price {
	color: var(--rpr-text);
	font-weight: 600;
}
.woocommerce ul.products li.product .button {
	margin-top: 10px;
	min-height: 40px;
	padding: 8px 16px;
	font-size: 15px;
}
.woocommerce span.onsale {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--rpr-accent);
	color: var(--rpr-on-accent);
	font-size: 13px;
	font-weight: 600;
}
.woocommerce div.product {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 32px;
}
.woocommerce div.product > * {
	float: none;
	width: auto;
	min-width: 0;
}
.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related,
.woocommerce div.product .upsells {
	grid-column: 1 / -1;
}
.woocommerce div.product div.images img {
	border-radius: 16px;
}
.woocommerce .quantity .qty {
	width: 5em;
	margin-right: 8px;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 14px;
	background: var(--rpr-surface);
	box-shadow: inset 0 0 0 1px var(--rpr-edge);
	list-style: none;
}
.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 12px;
	border-bottom: 1px solid var(--rpr-border);
	text-align: left;
}
.woocommerce form .form-row {
	margin: 0 0 14px;
}
.woocommerce form .form-row label {
	display: block;
	margin-bottom: 4px;
}

@media (max-width: 600px) {
	body.rprt {
		font-size: 16px;
	}
	/* Stacked, so the header is the same height whichever font has loaded. */
	.rprt-header-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.rprt-btn,
	.wp-block-button__link,
	button,
	input[type="submit"] {
		transition: none;
	}
	.rprt-btn:hover,
	.wp-block-button__link:hover,
	input[type="submit"]:hover {
		transform: none;
	}
}

/* ---- WordPress's own classes ---- */
.alignleft {
	float: left;
	margin: 0 20px 12px 0;
}
.alignright {
	float: right;
	margin: 0 0 12px 20px;
}
.aligncenter {
	display: block;
	margin-inline: auto;
}
.wp-caption {
	max-width: 100%;
}
.wp-caption-text,
.gallery-caption,
figcaption {
	color: var(--rpr-muted);
	font-size: 14px;
}
.sticky .rprt-post-title::after {
	content: " \2605";
	color: var(--rpr-accent-text);
}
.bypostauthor > .comment-body {
	box-shadow: inset 0 0 0 2px var(--rpr-accent-text);
}
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.rprt-footer-widgets {
	flex-basis: 100%;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	padding-bottom: 12px;
}
.rprt-widget-title {
	margin: 0 0 8px;
	font-size: 17px;
}

.rprt-post-card .rprt-post-date {
	color: var(--rpr-muted);
}
