/*------------------------------------------------------------------
	Popito Blocks: visual detail layer
	Everything here is decoration that theme.json cannot express.
	Colours and fonts still come from theme.json, so editing Styles
	in the Site Editor updates this file's output automatically.
--------------------------------------------------------------------
	01) Base
	02) Block style: Hard Shadow
	03) Block style: Outline Card
	04) Block style: Section Title
	05) Block style: Highlight
	06) Block style: Sticker Badge
	07) Buttons
	08) Navigation
	09) Header
	10) Post cards in the query loop
	11) Forms and comments
	12) Marquee (moving tags)
	13) Accessibility and motion
------------------------------------------------------------------*/

/*------------------------------------------------------------------
	01) Base
------------------------------------------------------------------*/
body {
	word-break: break-word;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wp-site-blocks {
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
}

/*------------------------------------------------------------------
	02) Block style: Hard Shadow
	The Popito signature. Available on Image, Group, Columns,
	Cover and Post Featured Image from the Styles tab.
------------------------------------------------------------------*/
.is-style-popito-hard-shadow,
.is-style-popito-hard-shadow img {
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	box-shadow: 9px 9px 0 0 var(--wp--preset--color--contrast, #000);
	overflow: hidden;
}

.is-style-popito-hard-shadow img {
	display: block;
	box-shadow: none;
	border: 0;
	border-radius: 6px;
}

/* Keep the shadow clear of the viewport edge on small screens. */
@media (max-width: 600px) {
	.is-style-popito-hard-shadow {
		box-shadow: 5px 5px 0 0 var(--wp--preset--color--contrast, #000);
	}
}

/*------------------------------------------------------------------
	03) Block style: Outline Card
------------------------------------------------------------------*/
.is-style-popito-outline-card {
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	padding: 36px;
	background-color: var(--wp--preset--color--base, #fff);
}

.is-style-popito-outline-card > :first-child {
	margin-top: 0;
}

.is-style-popito-outline-card > :last-child {
	margin-bottom: 0;
}

/*------------------------------------------------------------------
	04) Block style: Section Title
	Uppercase 900 weight with the little dash rule underneath,
	matching the original section headings.
------------------------------------------------------------------*/
.is-style-popito-section-title {
	text-transform: uppercase;
	font-weight: 900;
	letter-spacing: 0.25px;
	position: relative;
	padding-bottom: 18px;
}

.is-style-popito-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 76px;
	height: 6px;
	border-radius: 3px;
	background-color: var(--wp--preset--color--accent, #ffdd00);
}

.is-style-popito-section-title.has-text-align-center::after {
	left: 50%;
	transform: translateX(-50%);
}

.is-style-popito-section-title.has-text-align-right::after {
	left: auto;
	right: 0;
}

/*------------------------------------------------------------------
	05) Block style: Highlight
	Yellow marker sweep behind the text.
------------------------------------------------------------------*/
.is-style-popito-highlight {
	display: inline;
	background-image: linear-gradient(
		to bottom,
		transparent 58%,
		var(--wp--preset--color--accent, #ffdd00) 58%
	);
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
	padding: 0 4px;
}

/*------------------------------------------------------------------
	06) Block style: Sticker Badge
	Small rotated label, used on tags and eyebrow text.
------------------------------------------------------------------*/
.is-style-popito-sticker {
	display: inline-block;
	background-color: var(--wp--preset--color--accent, #ffdd00);
	border: 3px solid var(--wp--preset--color--contrast, #000);
	border-radius: 8px;
	padding: 6px 16px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transform: rotate(-2deg);
}

/*------------------------------------------------------------------
	07) Buttons
------------------------------------------------------------------*/
.wp-block-button__link {
	transition: transform 0.18s ease, box-shadow 0.18s ease,
		background-color 0.18s ease;
}

.wp-block-button__link:hover {
	transform: translate(-2px, -2px);
	box-shadow: 5px 5px 0 0 var(--wp--preset--color--contrast, #000);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border-width: 4px;
}

/* Full-width variant used inside the pricing and newsletter patterns. */
.wp-block-button.is-style-popito-wide {
	width: 100%;
}

.wp-block-button.is-style-popito-wide .wp-block-button__link {
	display: block;
	width: 100%;
	text-align: center;
}

/*------------------------------------------------------------------
	08) Navigation
------------------------------------------------------------------*/
.wp-block-navigation .wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 3px;
}

.wp-block-navigation
	.wp-block-navigation-item__content:not(.wp-block-navigation-submenu__toggle)::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	border-radius: 2px;
	background-color: var(--wp--preset--color--accent, #ffdd00);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.22s ease;
}

.wp-block-navigation .wp-block-navigation-item:hover
	.wp-block-navigation-item__content::after,
.wp-block-navigation .current-menu-item .wp-block-navigation-item__content::after {
	transform: scaleX(1);
}

.wp-block-navigation .wp-block-navigation__submenu-container {
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	padding: 8px 0;
	box-shadow: 6px 6px 0 0 var(--wp--preset--color--contrast, #000);
	background-color: var(--wp--preset--color--base, #fff);
}

/*------------------------------------------------------------------
	09) Header
------------------------------------------------------------------*/
.popito-header-rule {
	border-bottom: 4px solid var(--wp--preset--color--contrast, #000);
}

.popito-notice-bar {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.3px;
}

.wp-block-site-logo img {
	border-radius: 8px;
}

/*------------------------------------------------------------------
	10) Post cards in the query loop
------------------------------------------------------------------*/
.popito-card {
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	overflow: hidden;
	background-color: var(--wp--preset--color--base, #fff);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
}

.popito-card:hover {
	transform: translate(-3px, -3px);
	box-shadow: 9px 9px 0 0 var(--wp--preset--color--contrast, #000);
}

.popito-card .wp-block-post-featured-image img {
	border-radius: 0;
	display: block;
	width: 100%;
}

.popito-card .wp-block-post-title a {
	text-decoration: none;
}

.popito-card .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
	text-decoration-color: var(--wp--preset--color--accent, #ffdd00);
}

.popito-meta {
	font-family: var(--wp--preset--font-family--display);
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--wp--preset--color--muted-ink, #5a5a5a);
}

/* Post terms and tag links get the sticker treatment. */
.wp-block-post-terms a,
.wp-block-tag-cloud a {
	display: inline-block;
	background-color: var(--wp--preset--color--accent-soft, #fff6be);
	border: 3px solid var(--wp--preset--color--contrast, #000);
	border-radius: 20px;
	padding: 3px 14px;
	margin: 0 6px 8px 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 14px !important;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.wp-block-post-terms a:hover,
.wp-block-tag-cloud a:hover {
	background-color: var(--wp--preset--color--accent, #ffdd00);
	text-decoration: none;
}

/* Pagination */
.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block;
	min-width: 44px;
	padding: 8px 10px;
	margin: 0 4px;
	text-align: center;
	border: 3px solid var(--wp--preset--color--contrast, #000);
	border-radius: 8px;
	text-decoration: none;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--wp--preset--color--accent, #ffdd00);
}

/*------------------------------------------------------------------
	11) Forms and comments
------------------------------------------------------------------*/
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
	background-color: var(--wp--preset--color--muted, #eee);
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	padding: 14px 18px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 16px;
	color: var(--wp--preset--color--contrast, #000);
	width: 100%;
	max-width: 100%;
	outline: none;
}

input:focus,
select:focus,
textarea:focus {
	background-color: var(--wp--preset--color--accent-soft, #fff6be);
}

.wp-block-search__button,
.wp-block-file__button,
input[type="submit"],
button[type="submit"] {
	background-color: var(--wp--preset--color--accent, #ffdd00);
	color: var(--wp--preset--color--contrast, #000);
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	padding: 12px 28px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	cursor: pointer;
}

.wp-block-search__button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	box-shadow: 4px 4px 0 0 var(--wp--preset--color--contrast, #000);
}

.wp-block-comment-template li {
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 24px;
	list-style: none;
}

.wp-block-comment-author-name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 900;
}

/*------------------------------------------------------------------
	12) Marquee (moving tags)
	Pure CSS replacement for the original jQuery ticker. Drop any
	blocks inside a Group with the "Marquee" style to scroll them.
------------------------------------------------------------------*/
.is-style-popito-marquee {
	overflow: hidden;
	white-space: nowrap;
	border-top: 4px solid var(--wp--preset--color--contrast, #000);
	border-bottom: 4px solid var(--wp--preset--color--contrast, #000);
	padding: 14px 0;
}

.is-style-popito-marquee > * {
	display: inline-block;
	white-space: nowrap;
	animation: popito-scroll 26s linear infinite;
}

.is-style-popito-marquee:hover > * {
	animation-play-state: paused;
}

@keyframes popito-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/*------------------------------------------------------------------
	13) Accessibility and motion
------------------------------------------------------------------*/
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast, #000);
	outline-offset: 3px;
}

.skip-link.screen-reader-text {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--accent, #ffdd00);
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 0 0 10px 0;
	padding: 14px 24px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-decoration: none;
	color: #000;
}

.skip-link.screen-reader-text:focus {
	left: 0;
}

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

	.popito-card:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}

/*------------------------------------------------------------------
	14) Carousel / slideshow
	Applied as a block style to a Gallery block. Slides are just the
	images inside that gallery, so adding or removing a slide is the
	same as adding or removing an image. Scroll snapping does the work;
	the arrows are progressive enhancement.
------------------------------------------------------------------*/
.popito-carousel-wrap {
	position: relative;
}

.wp-block-gallery.is-style-popito-carousel {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	gap: 26px;
	padding: 6px 6px 22px;
	/* Without this the snap point lands on the track padding, so the
	   carousel rests 6px in and the previous arrow never disables. */
	scroll-padding-left: 6px;
	margin: 0;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--contrast, #000) transparent;
}

.wp-block-gallery.is-style-popito-carousel::-webkit-scrollbar {
	height: 10px;
}

.wp-block-gallery.is-style-popito-carousel::-webkit-scrollbar-track {
	background: var(--wp--preset--color--muted, #eee);
	border-radius: 10px;
}

.wp-block-gallery.is-style-popito-carousel::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
}

.wp-block-gallery.is-style-popito-carousel .wp-block-image {
	flex: 0 0 auto !important;
	width: min(430px, 78vw) !important;
	max-width: none !important;
	margin: 0 !important;
	scroll-snap-align: start;
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	box-shadow: 6px 6px 0 0 var(--wp--preset--color--contrast, #000);
	overflow: hidden;
	background-color: var(--wp--preset--color--base, #fff);
}

.wp-block-gallery.is-style-popito-carousel .wp-block-image img {
	display: block;
	width: 100%;
	height: 300px;
	object-fit: cover;
	border-radius: 0;
}

.wp-block-gallery.is-style-popito-carousel figcaption {
	font-family: var(--wp--preset--font-family--display);
	font-size: 15px;
	font-weight: 700;
	padding: 12px 16px;
	margin: 0;
	background: var(--wp--preset--color--base, #fff);
	border-top: 4px solid var(--wp--preset--color--contrast, #000);
	position: static !important;
	color: var(--wp--preset--color--contrast, #000) !important;
	text-align: left;
}

/* Arrow buttons, injected by assets/js/carousel.js */
.popito-carousel-nav {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 4px;
}

.popito-carousel-btn {
	width: 54px;
	height: 54px;
	border: 4px solid var(--wp--preset--color--contrast, #000);
	border-radius: 10px;
	background-color: var(--wp--preset--color--accent, #ffdd00);
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	font-weight: 700;
	color: var(--wp--preset--color--contrast, #000);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.popito-carousel-btn:hover:not(:disabled) {
	transform: translate(-2px, -2px);
	box-shadow: 4px 4px 0 0 var(--wp--preset--color--contrast, #000);
}

.popito-carousel-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* In the editor the gallery must stay clickable, so no snapping there. */
.block-editor-block-list__layout .wp-block-gallery.is-style-popito-carousel {
	scroll-snap-type: none;
}
