/*
Theme Name: Schedopia Showcase
Theme URI: https://schedopia.com
Author: ThinkMatic
Author URI: https://schedopia.com
Description: The theme behind the Schedopia themes site. A landing page lists every Schedopia block theme and promotes the Schedopia booking plugin, and each theme gets its own page with screenshots, strengths, key facts, a live demo link and a download link. One click imports the screenshots and creates every page.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schedopia-showcase
Tags: block-patterns, block-styles, custom-colors, custom-menu, editor-style, featured-images, full-site-editing, full-width-template, one-column, template-editing, translation-ready, wide-blocks, portfolio
*/

html {
	scroll-behavior: smooth;
	scroll-padding-top: 96px;
}

/* The header, content and footer meet with no gap. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Header */

.showcase-header {
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.admin-bar .showcase-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .showcase-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.showcase-header .showcase-header__cta {
		display: none;
	}
}

/* Sections */

.showcase-section > p:not(.is-style-eyebrow) {
	box-sizing: border-box;
	padding-right: max(0px, calc(min(100%, 1240px) - 720px));
}

.showcase-section.has-ink-background-color {
	color: var(--wp--preset--color--base);
}

.showcase-section.has-ink-background-color :is(h1, h2, h3) {
	color: var(--wp--preset--color--base);
}

@media (max-width: 782px) {
	.showcase-section .is-layout-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

/* Eyebrow */

.is-style-eyebrow {
	color: var(--wp--preset--color--brand);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.has-ink-background-color .is-style-eyebrow {
	color: #c9c5fb;
}

/* Hero collage */

.showcase-collage {
	display: grid;
	grid-template-columns: 1fr 1.25fr 1fr;
	gap: var(--wp--preset--spacing--30);
	align-items: center;
	margin-top: var(--wp--preset--spacing--60);
}

.showcase-collage .wp-block-image img {
	width: 100%;
	border-radius: 14px;
	box-shadow: var(--wp--preset--shadow--card);
}

.showcase-collage .wp-block-image {
	margin: 0;
}

@media (max-width: 600px) {
	.showcase-collage {
		grid-template-columns: 1fr;
	}

	.showcase-collage .wp-block-image:not(:nth-child(2)) {
		display: none;
	}
}

/* Cards */

.is-style-card {
	height: 100%;
	box-sizing: border-box;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	background: var(--wp--preset--color--base);
}

.showcase-theme-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px;
	background: var(--wp--preset--color--base);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.showcase-theme-card:hover {
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-3px);
}

.showcase-theme-card .wp-block-post-featured-image,
.showcase-theme-card .wp-block-image {
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.showcase-theme-card .wp-block-post-featured-image img,
.showcase-theme-card .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: top;
}

.showcase-theme-card__body {
	padding: var(--wp--preset--spacing--30);
}

.showcase-theme-card h3,
.showcase-theme-card h3 a {
	margin: 0;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.showcase-theme-card p {
	margin: 0.35em 0 0;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.showcase-grid .wp-block-post-template {
	margin-block: 0;
}

@media (prefers-reduced-motion: reduce) {
	.showcase-theme-card,
	.showcase-theme-card:hover {
		transform: none;
		transition: none;
	}
}

/* Step numbers */

.showcase-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--base);
	font-weight: 600;
}

/* Screenshot gallery: full-page home, three pages stacked, phone view. */

.wp-block-gallery.showcase-gallery {
	display: grid;
	grid-template-columns: 2.2fr 1fr 0.87fr;
	grid-template-rows: repeat(3, auto);
	gap: var(--wp--preset--spacing--30);
}

.wp-block-gallery.showcase-gallery .wp-block-image {
	position: relative;
	width: auto !important;
	margin: 0 !important;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--soft);
}

.wp-block-gallery.showcase-gallery .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1) {
	grid-row: 1 / span 3;
}

.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(5) {
	grid-column: 3;
	grid-row: 1 / span 3;
}

.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(2),
.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(3),
.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(4) {
	grid-column: 2;
	aspect-ratio: 8 / 5;
}

/* The full-page home screenshot scrolls inside its frame on hover. */
.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1) img {
	position: absolute;
	inset: 0;
	transition: object-position 9s linear;
}

.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1):hover img {
	object-position: bottom;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1) img {
		transition: none;
	}

	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1):hover img {
		object-position: top;
	}
}

@media (max-width: 782px) {
	.wp-block-gallery.showcase-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: none;
	}

	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(n) {
		grid-column: auto;
		grid-row: auto;
		aspect-ratio: 8 / 5;
	}

	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1),
	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(4) {
		grid-column: 1 / -1;
	}

	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(1) {
		aspect-ratio: 4 / 3;
	}

	.wp-block-gallery.showcase-gallery .wp-block-image:nth-child(5) {
		display: none;
	}
}

/* A button with no URL yet: the download link before wordpress.org publication. */

.wp-block-button__link:not([href]) {
	border: 1px dashed var(--wp--preset--color--muted);
	background: transparent;
	color: var(--wp--preset--color--muted);
	cursor: default;
}

/* Style variation swatches */

.showcase-swatches {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
}

.showcase-swatch {
	flex: 0 0 28px;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(36, 31, 99, 0.16);
	border-radius: 50%;
}

.showcase-variation {
	align-items: center;
	justify-content: space-between;
	padding-block: 0.65em;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.showcase-variation p {
	margin: 0;
}

/* Key facts */

.showcase-facts table {
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.showcase-facts td {
	padding: 0.65em 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	vertical-align: top;
}

.showcase-facts td:first-child {
	width: 38%;
	color: var(--wp--preset--color--muted);
}

/* Lists */

.showcase-pages {
	padding: 0;
	list-style: none;
	columns: 2;
	column-gap: var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
}

.showcase-pages li {
	padding-block: 0.3em;
	break-inside: avoid;
}

/* Footer */

.showcase-footer a {
	color: inherit;
	text-decoration: none;
}

.showcase-footer a:hover {
	text-decoration: underline;
}
