/* =============================================================================
   Base
============================================================================= */

/* Font smoothing */
body {
	text-rendering: geometricprecision;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * Prevent layout clipping inside the editor canvas
 */
.editor-styles-wrapper .wp-block-cover {
	position: relative;
}

/*
 * Make sure footers have no margin.
 * https://github.com/WordPress/gutenberg/issues/47637
 */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

/* =============================================================================
   Links
============================================================================= */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-line: underline;
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Utility: hide underline until hover */
.no-underline a,
a.no-underline {
	text-decoration: none !important;
}

.no-underline a:hover,
.no-underline a:focus-visible,
a.no-underline:hover,
a.no-underline:focus-visible {
	text-decoration: underline !important;
}

/* =============================================================================
   Utilities
============================================================================= */

/* Utility classes for custom ordering */
.order-0 { order: 0; }
.order-1 { order: 1; }

.grow-0 { flex-grow: 0; }
.grow   { flex-grow: 1; }

@media (min-width: 600px) {
	.md\:order-0 { order: 0; }
	.md\:order-1 { order: 1; }

	.md\:grow-0 { flex-grow: 0; }
	.md\:grow   { flex-grow: 1; }
}

/* Force Clean button text to align left even at 100% width */
.wp-block-button.is-style-clean .wp-block-button__link {
  text-align: left !important;
}

/* Add + before Clean button label */
.wp-block-button.is-style-clean .wp-block-button__link::before {
  content: "+  ";
}

/* Overlapping Header Utility */
.is-overlapping {
	position: relative;
	z-index: 10;
}

/* Utility: swap background and text colors on hover */
.hover-swap:hover {
  background-color: var(--wp--preset--color--theme-6);
  color: var(--wp--preset--color--theme-2);
}

/* Ensure inner text elements inherit the hover color */
.hover-swap:hover * {
  color: var(--wp--preset--color--theme-2);
}

/* Marker block style */
.is-style-text-marker::before {
  content: "▸  ";
  position: relative;
  top: -1px;
}

/* Utility: Toast (category-like pill) */
.toast {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0 var(--wp--preset--spacing--20);
  border: 1px solid var(--wp--preset--color--theme-4);
  font-size: var(--wp--preset--font-size--x-small);

  margin: 0; /* keep paragraphs from adding extra spacing */
}

/* If the toast contains a link, make the link inherit the pill and not underline */
.toast a {
  color: inherit;
  text-decoration: none;
}

/* Utility: clip any oversized block (including stretchying element) */
.clip-block {
  overflow: hidden;
}

/* Utility: compact padding for Search button (works with "Button only") */
.search-button-compact .wp-block-search__button,
.search-button-compact .wp-block-search__button-inside .wp-block-search__button {
  padding-inline: var(--wp--preset--spacing--20) !important;
}

/* =============================================================================
   Effects
============================================================================= */

/* Animated Gradient on Cover — Editor mirror */

.editor-styles-wrapper .gradient-animate {
	position: relative;
}

.editor-styles-wrapper .gradient-animate .wp-block-cover__background,
.editor-styles-wrapper .gradient-animate .wp-block-cover__image-background {
	z-index: 0;
}

.editor-styles-wrapper .gradient-animate::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;

	background: linear-gradient(
		130deg,
		var(--wp--preset--color--theme-1),
		var(--wp--preset--color--theme-2),
		var(--wp--preset--color--theme-3),
		var(--wp--preset--color--theme-4),
		var(--wp--preset--color--theme-5),
		var(--wp--preset--color--theme-6)
	);

	background-size: 500% 500%;
	animation: gradientMove 28s ease-in-out infinite;

	mix-blend-mode: difference;
	opacity: 0.95;
	pointer-events: none;
}

.editor-styles-wrapper .gradient-animate .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}