/* Shared base styles for all Search Engine Genie block themes. */

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	overflow-x: clip;
}

:where(.wp-site-blocks) :where(img) {
	height: auto;
	max-width: 100%;
}

/* List style without bullets (registered as a block style). */
.is-style-plain {
	list-style: none;
	padding-left: 0;
}

.is-style-plain li + li {
	margin-top: 0.4em;
}

/* Visible keyboard focus everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Outline buttons follow the text color. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
	color: inherit;
	padding: calc(0.8rem - 2px) calc(1.35rem - 2px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink, #111);
	border-color: var(--wp--preset--color--ink, #111);
	color: var(--wp--preset--color--surface, #fff);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Magazine blog: masthead, chips, top stories, rows, sidebar ---------- */
:root {
	--pixelshelf-chip-bg: var(--wp--preset--color--accent);
	--pixelshelf-chip-text: #fff;
	--pixelshelf-tile-bg: var(--wp--preset--color--ink);
}

.pixelshelf-masthead {
	padding-bottom: 0;
}

.pixelshelf-masthead > p {
	margin-top: var(--wp--preset--spacing--20);
}

.pixelshelf-catbar {
	border-top: 1px solid var(--wp--preset--color--rule);
	border-bottom: 3px solid var(--wp--preset--color--ink);
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	justify-content: center;
	list-style: none;
	margin-top: var(--wp--preset--spacing--40);
	padding: 0;
}

.pixelshelf-catbar a {
	border-bottom: 3px solid transparent;
	color: var(--wp--preset--color--ink);
	display: block;
	font-weight: 700;
	margin-bottom: -3px;
	padding: 0.8rem 0.1rem;
	text-decoration: none;
}

.pixelshelf-catbar a:hover,
.pixelshelf-catbar .current-cat a {
	border-bottom-color: var(--pixelshelf-chip-bg);
}

/* Category chips. */
.pixelshelf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0.8125rem;
	line-height: 1;
}

.pixelshelf-chips .wp-block-post-terms__separator {
	display: none;
}

.pixelshelf-chips a {
	background: var(--pixelshelf-chip-bg);
	border-radius: 2px;
	color: var(--pixelshelf-chip-text);
	font-weight: 700;
	padding: 6px 8px;
	text-decoration: none;
}

.pixelshelf-chips a:hover {
	filter: brightness(0.92);
}

/* Top stories: one lead tile beside two stacked tiles. */
.pixelshelf-feature {
	margin-top: var(--wp--preset--spacing--50);
}

.pixelshelf-feature > .wp-block-post-template {
	display: grid;
	gap: 18px;
	grid-template-columns: 1.6fr 1fr;
	list-style: none;
	margin: 0;
	padding: 0;
}

.pixelshelf-feature > .wp-block-post-template > li {
	margin: 0;
}

.pixelshelf-feature > .wp-block-post-template > li:first-child {
	grid-row: span 2;
}

.pixelshelf-tile.wp-block-cover {
	background: var(--pixelshelf-tile-bg);
	border-radius: 3px;
	height: 100%;
	overflow: hidden;
	padding: 22px;
	position: relative;
}

.pixelshelf-feature li:first-child .pixelshelf-tile.wp-block-cover {
	min-height: 460px !important;
}

.pixelshelf-tile .wp-block-cover__background {
	background: linear-gradient(180deg, rgba(8, 10, 20, 0) 30%, rgba(8, 10, 20, 0.72) 62%, rgba(8, 10, 20, 0.92) 100%) !important;
	opacity: 1 !important;
}

.pixelshelf-tile .wp-block-cover__inner-container {
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.pixelshelf-tile .wp-block-cover__inner-container > * {
	margin: 0;
	max-width: 60ch;
}

.pixelshelf-tile-title {
	font-size: clamp(1.35rem, 2.2vw, 1.85rem);
	line-height: 1.15;
}

.pixelshelf-feature li:first-child .pixelshelf-tile-title {
	font-size: clamp(1.75rem, 3.4vw, 2.75rem);
}

.pixelshelf-tile-title a {
	color: #fff;
	text-decoration: none;
}

/* The whole tile is clickable through the title link. */
.pixelshelf-tile-title a::after {
	content: "";
	inset: 0;
	position: absolute;
	z-index: 1;
}

.pixelshelf-tile .pixelshelf-chips {
	position: relative;
	z-index: 2;
}

.pixelshelf-tile:hover .pixelshelf-tile-title a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.pixelshelf-tile-excerpt {
	color: rgba(255, 255, 255, 0.86);
	display: none;
}

.pixelshelf-feature li:first-child .pixelshelf-tile-excerpt {
	display: block;
}

.pixelshelf-tile-excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

@media (max-width: 860px) {
	.pixelshelf-feature > .wp-block-post-template {
		grid-template-columns: 1fr;
	}

	.pixelshelf-feature li:first-child .pixelshelf-tile.wp-block-cover {
		min-height: 340px !important;
	}
}

/* Section heading with a heavy rule, as on a news page. */
.pixelshelf-sec-h {
	border-bottom: 3px solid var(--wp--preset--color--ink);
	margin-bottom: 0;
	padding-bottom: 10px;
}

/* Post rows: picture left, words right. */
.pixelshelf-post-list {
	list-style: none;
	padding: 0;
}

.pixelshelf-post-row {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	display: grid;
	gap: 22px;
	grid-template-columns: 260px minmax(0, 1fr);
	padding: 22px 0;
}

.pixelshelf-post-row > * {
	margin: 0 !important;
}

.pixelshelf-post-row:not(:has(.wp-block-post-featured-image)) {
	grid-template-columns: 1fr;
}

.pixelshelf-post-row .wp-block-post-featured-image img,
.pixelshelf-related .wp-block-post-featured-image img,
.pixelshelf-post-cover img {
	border-radius: 3px;
}

.pixelshelf-post-row .wp-block-post-title a,
.pixelshelf-related .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.pixelshelf-post-row .wp-block-post-title a:hover,
.pixelshelf-related .wp-block-post-title a:hover {
	text-decoration: underline;
}

.pixelshelf-post-row .wp-block-post-excerpt__excerpt {
	margin: 0;
}

@media (max-width: 640px) {
	.pixelshelf-post-row {
		gap: 12px;
		grid-template-columns: 1fr;
	}
}

/* Sidebar. */
.pixelshelf-side-box h2 {
	border-bottom: 3px solid var(--wp--preset--color--ink);
	margin: 0 0 4px;
	padding-bottom: 8px;
}

.pixelshelf-topics,
.pixelshelf-recent {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pixelshelf-topics li {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	color: var(--wp--preset--color--muted);
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding: 9px 0;
}

.pixelshelf-topics a,
.pixelshelf-recent a {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.pixelshelf-topics a:hover,
.pixelshelf-recent a:hover {
	text-decoration: underline;
}

.pixelshelf-recent li {
	align-items: center;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	display: flex;
	gap: 12px;
	padding: 10px 0;
}

.pixelshelf-recent .wp-block-latest-posts__featured-image {
	flex: 0 0 84px;
	margin: 0;
}

.pixelshelf-recent .wp-block-latest-posts__featured-image img {
	aspect-ratio: 1;
	border-radius: 3px;
	height: 84px;
	object-fit: cover;
	width: 84px;
}

/* Single post. */
.pixelshelf-post-cover img {
	object-fit: cover;
}

.pixelshelf-entry {
	font-size: 1.125rem;
	line-height: 1.7;
}

.pixelshelf-related .wp-block-post-template {
	margin-top: var(--wp--preset--spacing--40);
}

@media (max-width: 781px) {
	.pixelshelf-related .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* Pages that end in a full-width section meet the footer without a gap. */
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.wp-site-blocks > main:has(> .wp-block-post-content > .alignfull:last-child),
.wp-site-blocks > main:has(> .wp-block-post-content > .wp-block-pattern-overrides:last-child) {
	padding-bottom: 0 !important;
}

/* Header search icon: a quiet icon button, not a filled block. */
.wp-block-search.wp-block-search__button-only:not(.wp-block-search__searchfield-hidden) .wp-block-search__inside-wrapper,
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--ink);
}

.wp-block-search.wp-block-search__button-only .wp-block-search__button {
	border: 0;
	padding: 0.45rem;
}

/* Pixelshelf: the shelf, product covers and store details. */

:root {
	--pixelshelf-shelf-depth: 16px;
	--pixelshelf-shadow: rgba(20, 26, 51, 0.28);
}

/* Header ------------------------------------------------------------ */

.pixelshelf-header .wp-block-site-title {
	margin: 0;
}

.pixelshelf-header .wp-block-search__button {
	background: transparent;
	border: 0;
	color: var(--wp--preset--color--ink);
	padding: 0.35rem;
}

.pixelshelf-header .wp-block-search__button svg {
	fill: currentColor;
	height: 26px;
	width: 26px;
}

/* The hero shelf ---------------------------------------------------- */

.pixelshelf-shelf-column {
	padding-bottom: var(--pixelshelf-shelf-depth);
}

.pixelshelf-shelf {
	gap: clamp(6px, 1.1vw, 14px) !important;
	padding: 0 4%;
	position: relative;
}

.pixelshelf-shelf::after {
	background: var(--wp--preset--color--shelf);
	border-radius: 2px;
	bottom: calc(-1 * var(--pixelshelf-shelf-depth));
	box-shadow: 0 18px 22px -14px var(--pixelshelf-shadow);
	content: "";
	height: var(--pixelshelf-shelf-depth);
	left: 0;
	position: absolute;
	right: 0;
}

.pixelshelf-shelf > .wp-block-image {
	flex: 0 1 auto;
	margin: 0;
	min-width: 0;
}

.pixelshelf-shelf > .wp-block-image img {
	box-shadow: 3px 0 0 rgba(20, 26, 51, 0.14);
	display: block;
	max-width: 100%;
}

/* One cover leans on its neighbour, the way real shelves look. */
.pixelshelf-shelf > .wp-block-image:last-child {
	transform: rotate(-7deg);
	transform-origin: bottom left;
}

/* Product grids: every cover stands on its own shelf --------------- */

.pixelshelf-product-grid .wc-block-product-template {
	row-gap: var(--wp--preset--spacing--50);
}

.pixelshelf-product-grid .wc-block-components-product-image {
	align-items: flex-end;
	aspect-ratio: 1 / 1;
	background: var(--wp--preset--color--surface);
	border-bottom: 10px solid var(--wp--preset--color--shelf);
	box-shadow: 0 14px 16px -14px var(--pixelshelf-shadow);
	display: flex;
	justify-content: center;
	margin-bottom: 0.9rem !important;
	padding: 12% 14% 0;
}

.has-surface-background-color .pixelshelf-product-grid .wc-block-components-product-image {
	background: var(--wp--preset--color--paper);
}

.pixelshelf-product-grid .wc-block-components-product-image a {
	align-items: flex-end;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.pixelshelf-product-grid .wc-block-components-product-image img {
	box-shadow: 3px 0 0 rgba(20, 26, 51, 0.14);
	height: auto !important;
	max-height: 100%;
	object-fit: contain;
	width: auto !important;
}

.pixelshelf-product-grid .wp-block-post-title {
	margin-bottom: 0.2rem;
	margin-top: 0;
}

.pixelshelf-product-grid .wp-block-woocommerce-product-price {
	color: var(--wp--preset--color--muted);
}

.pixelshelf-product-grid .wp-block-button__link {
	margin-top: 0.4rem;
}

.pixelshelf-catalog-bar {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	font-size: var(--wp--preset--font-size--small);
	padding-bottom: var(--wp--preset--spacing--20);
}

.pixelshelf-catalog-bar p,
.pixelshelf-catalog-bar form {
	margin: 0;
}

/* Single product ---------------------------------------------------- */

.pixelshelf-product-media .woocommerce-product-gallery {
	background: var(--wp--preset--color--surface);
	border-bottom: var(--pixelshelf-shelf-depth) solid var(--wp--preset--color--shelf);
	box-shadow: 0 18px 22px -16px var(--pixelshelf-shadow);
	padding: 8% 10% 0;
}

.pixelshelf-product-media .woocommerce-product-gallery img {
	box-shadow: 4px 0 0 rgba(20, 26, 51, 0.14);
	margin: 0 auto;
}

.pixelshelf-product-summary .wp-block-post-title {
	font-size: var(--wp--preset--font-size--x-large);
	margin-top: 0;
}

.pixelshelf-product-summary .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button {
	background: var(--wp--preset--color--ink);
	border-radius: 6px;
	color: var(--wp--preset--color--surface);
	font-weight: 620;
	padding: 0.9rem 1.6rem;
}

.pixelshelf-product-summary .wp-block-woocommerce-add-to-cart-form .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--accent);
}

@media (min-width: 782px) {
	.pixelshelf-product-summary {
		align-self: flex-start;
		position: sticky;
		top: var(--wp--preset--spacing--40);
	}
}

/* Shop by format ---------------------------------------------------- */

.pixelshelf-format {
	border-top: 3px solid var(--wp--preset--color--ink);
	padding-top: var(--wp--preset--spacing--20);
}

.pixelshelf-format h3 {
	margin: 0;
}

.pixelshelf-format h3 a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.pixelshelf-format h3 a:hover,
.pixelshelf-format h3 a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--shelf);
	text-decoration-thickness: 0.14em;
	text-underline-offset: 0.12em;
}

.pixelshelf-format p {
	margin: 0;
}

/* How downloads work: a real sequence, so it is numbered ------------ */

.pixelshelf-steps {
	counter-reset: pixelshelf-step;
	display: grid;
	gap: var(--wp--preset--spacing--40);
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	list-style: none;
	margin-top: var(--wp--preset--spacing--40);
	padding: 0;
}

.pixelshelf-steps li {
	counter-increment: pixelshelf-step;
	max-width: 34ch;
}

.pixelshelf-steps li::before {
	color: var(--wp--preset--color--shelf);
	content: counter(pixelshelf-step);
	display: block;
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 800;
	line-height: 1;
	margin-bottom: var(--wp--preset--spacing--20);
}

.pixelshelf-steps li strong {
	display: block;
	font-size: var(--wp--preset--font-size--large);
	margin-bottom: 0.3rem;
}

/* Reviews ----------------------------------------------------------- */

.wp-block-quote cite {
	color: var(--wp--preset--color--muted);
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	margin-top: 0.6rem;
}

/* Footer ------------------------------------------------------------ */

.pixelshelf-footer .wp-block-site-title a {
	color: var(--wp--preset--color--paper);
}

.pixelshelf-footer .wp-block-site-tagline {
	opacity: 0.75;
}

.pixelshelf-footer-base {
	border-top: 1px solid rgba(238, 241, 246, 0.2);
	opacity: 0.85;
}

.pixelshelf-footer-base p {
	margin: 0;
}

/* Phones ------------------------------------------------------------ */

@media (max-width: 600px) {
	.pixelshelf-newsletter-buttons {
		justify-content: flex-start !important;
	}

	.pixelshelf-shelf {
		padding: 0 2%;
	}
}

/* Format links fill the row instead of leaving a gap. */
.pixelshelf-formats.is-layout-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
}

/* Store details ------------------------------------------------------ */

.pixelshelf-product-media .woocommerce-product-gallery {
	box-sizing: border-box;
	max-width: 100%;
}

.pixelshelf-product-grid .wc-block-components-product-button {
	align-items: flex-start;
}

.pixelshelf-product-grid .wc-block-components-product-button .wp-block-button__link {
	margin-left: 0;
}

.woocommerce span.onsale,
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--ink);
	border: 0;
	border-radius: 4px;
	color: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
	line-height: 1;
	min-height: 0;
	min-width: 0;
	padding: 0.45rem 0.6rem;
}

.pixelshelf-product-media .woocommerce span.onsale,
.pixelshelf-product-media span.onsale {
	left: 0.75rem;
	top: 0.75rem;
}

.pixelshelf-related .wp-block-heading {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Blog: chips and active section sit on the shelf colour. */
:root {
	--pixelshelf-chip-bg: var(--wp--preset--color--shelf);
	--pixelshelf-chip-text: var(--wp--preset--color--on-shelf);
}

/* ---------- Pro sections (shared by every Pro theme) ---------- */

/* Pricing */
.gp-plan {
	border: 1px solid var(--wp--preset--color--rule);
	display: flex;
	flex-direction: column;
}
.gp-plan.is-popular {
	border: 2px solid var(--wp--preset--color--accent);
}
.gp-plan > .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
}
.gp-badge {
	align-self: flex-start;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
	font-weight: 700;
	margin: 0;
	padding: 0.2em 0.7em;
}
.gp-price strong {
	font-size: var(--wp--preset--font-size--xx-large);
	letter-spacing: -0.02em;
	line-height: 1;
}
.gp-ticks li {
	padding-left: 1.5em;
	position: relative;
}
.gp-ticks li::before {
	border-bottom: 2px solid var(--wp--preset--color--accent);
	border-left: 2px solid var(--wp--preset--color--accent);
	content: "";
	height: 0.35em;
	left: 0.15em;
	position: absolute;
	top: 0.5em;
	transform: rotate(-45deg);
	width: 0.7em;
}

/* Questions and answers */
.gp-faq .wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	margin: 0;
	padding: var(--wp--preset--spacing--30) 0;
}
.gp-faq .wp-block-details:first-child {
	border-top: 1px solid var(--wp--preset--color--rule);
}
.gp-faq summary {
	cursor: pointer;
	font-weight: 700;
	list-style: none;
	padding-right: 2em;
	position: relative;
}
.gp-faq summary::-webkit-details-marker {
	display: none;
}
.gp-faq summary::after {
	color: var(--wp--preset--color--accent);
	content: "+";
	font-size: 1.5em;
	line-height: 1;
	position: absolute;
	right: 0.2em;
	top: -0.1em;
}
.gp-faq details[open] summary::after {
	content: "\2212";
}
.gp-faq details p {
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--20);
}

/* Dark bands: numbers and call to action */
.gp-dark :where(h1, h2, h3, a:not(.wp-element-button)) {
	color: inherit;
}
.gp-stat {
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
	margin-bottom: 0.3em;
}
.gp-stats .wp-block-column {
	border-top: 2px solid currentColor;
	padding-top: var(--wp--preset--spacing--30);
}
.gp-on-dark .wp-block-button__link {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
.gp-on-accent .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--accent);
}
.gp-sale :where(h2, a:not(.wp-element-button)) {
	color: inherit;
}

/* Reviews */
.gp-review {
	border: 1px solid var(--wp--preset--color--rule);
}
.gp-stars {
	font-size: 0;
	margin: 0;
}
.gp-stars::before {
	color: var(--wp--preset--color--accent);
	content: "\2605\2605\2605\2605\2605";
	font-size: 1.1rem;
	letter-spacing: 0.15em;
}

/* Name strip */
.gp-names {
	column-gap: var(--wp--preset--spacing--50);
	row-gap: var(--wp--preset--spacing--20);
}
.gp-names p {
	color: var(--wp--preset--color--muted);
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0;
}

/* Call to action panel */
.gp-panel {
	border: 1px solid var(--wp--preset--color--rule);
}
.gp-panel-text {
	flex: 1 1 22rem;
}

/* Features */
.gp-feature {
	border-top: 3px solid var(--wp--preset--color--accent);
	padding-top: var(--wp--preset--spacing--30);
}
.gp-feature h3 {
	margin-top: 0;
}

/* Timeline */
.gp-timeline {
	border-left: 2px solid var(--wp--preset--color--rule);
	margin-left: 0.4rem;
}
.gp-milestone {
	padding: 0 0 var(--wp--preset--spacing--40) var(--wp--preset--spacing--40);
	position: relative;
}
.gp-milestone::before {
	background: var(--wp--preset--color--accent);
	border-radius: 50%;
	content: "";
	height: 0.8rem;
	left: -0.45rem;
	position: absolute;
	top: 0.3rem;
	width: 0.8rem;
}
.gp-milestone > * {
	margin-block: 0 0.35em;
}
.gp-year {
	font-weight: 700;
}

/* Comparison table */
.gp-compare {
	overflow-x: auto;
}
.wp-block-table.gp-compare table {
	border-collapse: collapse;
	min-width: 32rem;
	width: 100%;
}
.wp-block-table.gp-compare thead {
	border: 0;
}
.wp-block-table.gp-compare th,
.wp-block-table.gp-compare td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding: 0.8em 0.6em;
	text-align: left;
}
.wp-block-table.gp-compare thead th {
	border-bottom: 2px solid var(--wp--preset--color--ink);
}
.wp-block-table.gp-compare td:first-child {
	font-weight: 700;
}

/* Contact */
.gp-contact .wp-block-column {
	border-top: 1px solid var(--wp--preset--color--rule);
	padding-top: var(--wp--preset--spacing--30);
}

/* Shop promises */
.gp-promises .wp-block-column {
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: var(--wp--preset--spacing--30);
}
.gp-promises p {
	margin: 0;
}
