/*
Theme Name: Tumble
Theme URI: https://tenfoldthemes.example/tumble
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A playful-modern block theme for toy and baby-product manufacturers selling to B2B buyers. Ships with 18 hand-crafted patterns, four full-page layouts, a Night Nursery dark style, locally hosted variable fonts and original vector artwork — everything editable in the Site Editor.
Requires at least: 6.6
Tested up to: 6.8
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: tumble
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, e-commerce, portfolio
*/

/* ---------------------------------------------------------------------------
 * Focus visibility & motion
 * ------------------------------------------------------------------------- */

:where(a, button, input, summary, textarea, select, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 6px;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

a,
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition);
}

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

/* ---------------------------------------------------------------------------
 * Block styles: Group — Card / Card (hover bounce)
 * Chunky rounded cards with 3px borders — the Tumble signature.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-card,
.wp-block-group.is-style-card-hover {
	background: var(--wp--preset--color--base);
	border: 3px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--m);
	box-shadow: var(--wp--preset--shadow--card);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-card-hover {
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.wp-block-group.is-style-card-hover:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--lift);
	transform: translateY(-6px);
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Sticker
 * Sticker-style badges with white borders (EN71 · ASTM · CPSIA).
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-sticker {
	background: #ffffff;
	border: 3px solid #ffffff;
	border-radius: 999px;
	box-shadow: 0 3px 0 rgba(43, 36, 64, 0.12), 0 8px 18px rgba(43, 36, 64, 0.14);
	color: #2b2440;
	padding: 0.375rem 1.125rem;
	transform: rotate(-2deg);
}

.wp-block-group.is-style-sticker:nth-child(even) {
	transform: rotate(2deg);
}

.wp-block-group.is-style-sticker p,
.wp-block-group.is-style-sticker h1,
.wp-block-group.is-style-sticker h2,
.wp-block-group.is-style-sticker h3,
.wp-block-group.is-style-sticker h4 {
	color: #2b2440;
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Marker dots
 * Playful round bullets cycling through the palette.
 * ------------------------------------------------------------------------- */

ul.is-style-marker-dots {
	list-style: none;
	padding-left: 0;
}

ul.is-style-marker-dots > li {
	padding-left: 1.75em;
	position: relative;
	margin-bottom: 0.625em;
}

ul.is-style-marker-dots > li::before {
	content: "";
	position: absolute;
	left: 0.125em;
	top: 0.5em;
	width: 0.66em;
	height: 0.66em;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
}

ul.is-style-marker-dots > li:nth-child(3n+2)::before {
	background: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 1.5px var(--wp--preset--color--contrast-2);
}

ul.is-style-marker-dots > li:nth-child(3n)::before {
	background: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Confetti dots
 * ------------------------------------------------------------------------- */

hr.is-style-confetti-dots {
	border: none;
	height: 10px;
	width: 104px;
	background:
		radial-gradient(circle at 8px 5px, var(--wp--preset--color--primary) 5px, transparent 5.5px),
		radial-gradient(circle at 52px 5px, var(--wp--preset--color--accent) 5px, transparent 5.5px),
		radial-gradient(circle at 96px 5px, var(--wp--preset--color--border) 5px, transparent 5.5px);
	background-repeat: no-repeat;
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance
 * ------------------------------------------------------------------------- */

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2.25rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	content: "−";
	color: var(--wp--preset--color--primary);
}

.wp-block-details > :not(summary) {
	font-weight: 500;
	color: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

.wp-block-social-links.is-style-logos-only .wp-block-social-link a {
	color: inherit;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 3px;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
/* ---------------------------------------------------------------------------
 * Palette-slug guard: the standard palette includes a slug named "border".
 * When used as a *text* color, WordPress emits `.has-border-color`, which core
 * pairs with `:where(.has-border-color){border-style:solid}`; with the default
 * medium width that paints a stray ~3px box around the text. Zero the width
 * here — genuine borders set an explicit width (inline or via block-style
 * classes) that overrides this 0-specificity rule.
 * ------------------------------------------------------------------------- */
:where(.has-border-color) {
	border-width: 0;
}
