/*
 * Quadrangle — styles that theme.json cannot express.
 * Loaded on the front end and in the editor.
 */

/* ------------------------------------------------------------------ base */

html {
	scroll-behavior: smooth;
}

:where(.wp-site-blocks) > main,
:where(.wp-site-blocks) > footer {
	margin-block-start: 0;
}

:where(h1, h2, h3, h4) {
	text-wrap: balance;
}

:where(p, li) {
	text-wrap: pretty;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

::selection {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--contrast);
}

/* ------------------------------------------------------------------ header */

.site-header .wp-block-site-title {
	max-width: 22ch;
}

.site-header .wp-block-navigation {
	--qd-nav-underline: var(--wp--preset--color--accent);
}

.site-header .wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.4rem;
}

.site-header .wp-block-navigation-item__content[aria-current="page"],
.site-header .current-menu-item > .wp-block-navigation-item__content,
.site-header .current-menu-ancestor > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--qd-nav-underline);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.55em;
}

.site-header .wp-block-navigation__submenu-container {
	padding: 0.4rem;
	border: 1px solid var(--wp--preset--color--border) !important;
	border-radius: 6px;
	box-shadow: var(--wp--preset--shadow--soft);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	font-size: var(--wp--preset--font-size--large);
}

.wp-block-search__button {
	border-radius: var(--wp--custom--radius--small);
}

/* ------------------------------------------------------------------ page title bands */

.page-hero.is-style-section-light {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.page-hero .wp-block-post-title,
.page-hero h1 {
	max-width: 58rem;
}

.page-hero .hero-lead {
	max-width: 46rem;
	opacity: 0.92;
}

.page-hero .wp-block-breadcrumbs {
	margin-bottom: var(--wp--preset--spacing--20);
}

.wp-block-breadcrumbs ol {
	row-gap: 0.25rem;
}

.wp-block-breadcrumbs a {
	text-decoration: none;
}

.wp-block-breadcrumbs a:hover {
	text-decoration: underline;
}

.page-hero .qd-event-summary {
	margin-top: var(--wp--preset--spacing--20);
}

/* ------------------------------------------------------------------ section styles */

.is-style-section-dark .is-style-eyebrow,
.is-style-section-blue .is-style-eyebrow,
.wp-block-cover .is-style-eyebrow {
	color: var(--wp--preset--color--accent);
}

.is-style-section-dark .qd-date-badge {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary);
}

.is-style-section-dark .qd-date-badge__month {
	color: var(--wp--preset--color--primary);
}

.is-style-section-dark .wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: currentColor;
	color: var(--wp--preset--color--base);
}

.is-style-section-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-cover .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
}

.wp-block-column > .wp-block-group.is-style-card:only-child {
	height: 100%;
}

.wp-block-column.is-style-card {
	display: flex;
	flex-direction: column;
}

.wp-block-column.is-style-card > .wp-block-buttons:last-child {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
}

/* ------------------------------------------------------------------ block styles */

.wp-block-button.is-style-arrow > .wp-block-button__link {
	padding-left: 0;
	padding-right: 0;
	background: transparent;
	color: var(--wp--preset--color--primary-2);
	border-radius: 0;
}

.is-style-section-dark .wp-block-button.is-style-arrow > .wp-block-button__link,
.wp-block-cover .wp-block-button.is-style-arrow > .wp-block-button__link {
	color: var(--wp--preset--color--base);
}

.wp-block-button.is-style-arrow > .wp-block-button__link::after {
	content: "→";
	display: inline-block;
	margin-left: 0.45em;
	transition: transform 0.2s ease;
}

.wp-block-button.is-style-arrow > .wp-block-button__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.wp-block-button.is-style-arrow > .wp-block-button__link:hover::after {
	transform: translateX(3px);
}

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

ul.is-style-checklist li {
	position: relative;
	margin-bottom: 0.6em;
	padding-left: 2em;
}

ul.is-style-checklist li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 1.25em;
	height: 1.25em;
	border-radius: 50%;
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172231' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") no-repeat center / 70%;
}

hr.wp-block-separator.is-style-accent-bar {
	width: 3.5rem;
	margin-left: 0;
	border: 0;
	border-top: 4px solid var(--wp--preset--color--accent);
	opacity: 1;
}

.has-text-align-center + hr.wp-block-separator.is-style-accent-bar,
hr.wp-block-separator.is-style-accent-bar.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* ------------------------------------------------------------------ core blocks */

.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-details summary {
	position: relative;
	padding-right: 2.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.35;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	list-style: none;
}

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

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 0.25rem;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--wp--preset--color--primary-2);
}

.wp-block-details[open] summary::after {
	content: "–";
}

.wp-block-details[open] > summary {
	margin-bottom: var(--wp--preset--spacing--20);
}

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--primary);
}

.wp-block-table th {
	text-align: left;
}

.wp-block-table td,
.wp-block-table th {
	padding: 0.7em 0.9em;
	border-color: var(--wp--preset--color--border);
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--base-2);
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--wp--preset--font-family--body);
	font-style: normal;
	color: var(--wp--preset--color--contrast-2);
}

.wp-block-pullquote {
	text-align: left;
}

.wp-block-post-featured-image img {
	width: 100%;
}

.wp-block-post-template .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--medium);
}

.wp-block-post-template .wp-block-post-featured-image img {
	transition: transform 0.5s ease;
}

.wp-block-post-template li:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.search-results > li {
	padding-block: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	text-decoration: none;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.wp-block-cover .wp-block-cover__inner-container {
	width: 100%;
}

.hero-cover h1 {
	max-width: 16ch;
}

.wp-block-icon svg {
	fill: currentColor;
}

/* ------------------------------------------------------------------ single event / program / person */

.detail-main .wp-block-post-content h2,
.profile-body .wp-block-post-content h2 {
	font-size: var(--wp--preset--font-size--x-large);
}

.detail-main .wp-block-post-content h3,
.profile-body .wp-block-post-content h3 {
	font-size: var(--wp--preset--font-size--large);
}

.detail-layout .qd-details {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem);
}

.profile-header .profile-photo {
	max-width: 18rem;
}

@media (max-width: 781px) {
	.detail-layout > .detail-sidebar {
		order: -1;
	}

	.detail-layout .qd-details {
		position: static;
	}
}

/* ------------------------------------------------------------------ footer */

.site-footer a {
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

.site-footer a:hover {
	text-decoration-color: currentColor;
}

.site-footer .is-style-eyebrow {
	margin-bottom: var(--wp--preset--spacing--20);
}

.site-footer .footer-menu .wp-block-navigation__container {
	gap: 0.55rem;
}

.site-footer .footer-menu a {
	font-size: var(--wp--preset--font-size--small);
}

.site-footer .wp-block-social-links {
	margin-top: var(--wp--preset--spacing--20);
}

/* ------------------------------------------------------------------ motion & print */

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

	.wp-block-post-template li:hover .wp-block-post-featured-image img,
	.wp-block-button.is-style-arrow > .wp-block-button__link:hover::after {
		transform: none;
	}
}

@media print {
	.site-header .wp-block-navigation,
	.site-header .wp-block-search,
	.site-footer,
	.qd-details__actions,
	.qd-details__calendar {
		display: none !important;
	}
}

/* ------------------------------------------------------------------ full-width sections inside normal pages */

/* A page that starts or ends with a full-width band sits flush against the title band / footer. */
.page-body > .wp-block-post-content > .alignfull:first-child {
	margin-top: calc(var(--wp--preset--spacing--60) * -1) !important;
}

.page-body > .wp-block-post-content > .alignfull:last-child {
	margin-bottom: calc(var(--wp--preset--spacing--70) * -1) !important;
}
