/*
Theme Name: Flat White
Author: Extra Small Design
Author URI: https://extrasmalldesign.com
Theme URI: 
Tags: full-site-editing, block-patterns
Text Domain: flat-white
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.4
Version: 1.0.17

License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Styles intended only for the front.*/
@view-transition {
  navigation: auto;
}

/* Smooth Scrolling */
html {
	scroll-behavior: smooth;
}
h1, h2, h3, h4, h5, h6 {
	scroll-margin-top: 140px;
}
@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Better Font Smoothing */
body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Sticky Footer */
html, body {
	height: 100%;
}
body.wp-site-blocks,
body > .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > header,
.wp-site-blocks > footer {
	flex: none;
	margin-block-start: 0 !important;
}
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group.is-main,
.wp-site-blocks > .wp-block-post-content {
	flex: 1 0 auto;
}

/* Condensed Header Styles */
.header-logo img {
	transition: all .5s ease-out;
}
.header-small img {
	max-width: 65%;
}

/* Bold */
p, li {
	strong, b {
		font-weight: 600;
	}
}

/* Post Excerpts */
.wp-block-post-excerpt__excerpt {
	font-size: inherit !important;
}

/* Invert H1 on light backgrounds */
.has-base-background-color h1,
.has-parchment-background-color h1 {
  color: var(--wp--preset--color--crimson);
}

/* Eyebrow */
:root .is-style-eyebrow + :is(h1, h2, h3, h4, h5, h6) {
	margin-block-start: 0.5rem;
}

/* Heading Spacing within Containers */
:root :where(.is-layout-flow) > :is(h2, h3, h4, h5, h6) { 
	margin-block-start: 3.5rem;
}
/* Heading Spacing for Headings Following Headings within Containers */
:root :where(.is-layout-flow) > :is(h1,h2,h3,h4,h5,h6) + :is(h2,h3,h4,h5,h6) {
	margin-block-start: .5rem;
}

/* Query Loop Styles */
.wp-block-post-content :is(ul, ol):not(.wp-block-list) {
	padding-inline-start: 0;
}

/* Pullquote Custom Styles */

	/* Indent the text to make room for the quote icon */
	.wp-block-pullquote blockquote {
		position: relative;
		padding-left: 3.5rem; 
		p {
			font-size: 26px;
		}
	}

	/* The giant quote icon */
	.wp-block-pullquote blockquote::before {
		content: "\201C";
		position: absolute;
		top: -0.15em;
		left: 0;
		font-size: 4em;
		line-height: 1;
		font-family: var(--wp--preset--font-family--neue-haas-grotesk);
		font-weight: 700;
		color: var(--wp--preset--color--shade); /* Adjust to your light blue token */
	}

	/* Two-tone citation: targets the bolded name */
	.wp-block-pullquote cite strong {
		text-transform: uppercase;
		letter-spacing: 0.1em;
		font-weight: 700;
		margin-bottom: 0.25rem;
	}

/* Person Preview Block */
.person-preview {
	position: relative;
	a {
		&::after {
			content: ' ';
			display: block;
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			height: 100%;
			width: 100%;
		}
	}
}

/* FacetWP*/
div.facetwp-facet {
	margin-bottom: 0;
}
.facetwp-dropdown {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--contrast);
	padding: 0.5rem 1rem;
	width: 100%;
}
.facetwp-facet-search {
	box-sizing: border-box;
	padding-right: 0;
	width: 100%;

	/* FacetWP wraps the input in an inline-block span — stretch it */
	.facetwp-input-wrap {
		display: block;
		width: 100%;
	}

	.facetwp-search {
		background-color: var(--wp--preset--color--base);
		border: 1px solid var(--wp--preset--color--contrast);
		box-sizing: border-box;
		padding: 0.5rem 1rem !important;
		width: 100% !important;
	}
}
.facetwp-load-more {
	display: inline-block;
	background: transparent;
	border: 2px solid var(--wp--preset--color--crimson);
	color: var(--wp--preset--color--crimson);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--neue-haas-grotesk);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 0.5rem 1.5rem;
	transition: all .25s ease-out;
	&:hover {
		background: var(--wp--preset--color--crimson);
		color: var(--wp--preset--color--base);
	}
}

.facetwp-type-pager {
	.facetwp-pager {
		a {
			aspect-ratio: 1;
			background-color: transparent;
			border-radius: 24px;
			display: inline-block;
			font-size: 15px;
			font-weight: 700;
			padding: .25rem .75rem;
			text-align: center;
			text-decoration: none;
			transition: all .25s ease-out;
			&:hover {
				background-color: var(--wp--preset--color--blue-10);
			}
			&.active {
				background: var(--wp--preset--color--crimson);
				color: var(--wp--preset--color--base);
			}
			&.next, &.prev, &.dots {
				background-color: transparent;
			}
		}
	}
}

.wp-block-heading a {
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--wp--preset--color--shade);
}

/* Expand clickable area for Post Template Links */
.wp-block-post-template .wp-block-post {
	position: relative;
	& * {
		position: static;
	}
	a {
		&:hover {
			color: var(--wp--preset--color--crimson);
			text-decoration: underline;
		}
		&::before {
			content: ' ';
			display: block;
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			height: 100%;
			width: 100%;
		}
	}
}

/* Focus Outline for Keyboard Navigation */
button,
a,
input,
textarea,
select,
[tabindex]:not([tabindex="-1"]) {
	&:focus-visible {
		outline: 2px solid var(--wp--preset--color--crimson);
		outline-offset: 4px;
		box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
	}
}

/* Gravity Forms */
.gform_wrapper .gform_button {
	border: 2px solid var(--wp--preset--color--crimson) !important;
	border-radius: 0 !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 2px !important;
	padding: 0.5rem 1.5rem !important;
	text-transform: uppercase !important;
	transition: all .25s ease-out !important;
	&:hover {
		background: transparent !important;
		color: var(--wp--preset--color--crimson) !important;
	}
}