/*
Theme Name: Tudeley Festival
Theme URI: http://tudeleychambermusicfestival.co.uk/
Description: A block theme for the Tudeley Festival of Chamber Music and Voice. Photo-led pages, a Concert content type with an automatic What's on listing, and editable homepage sections.
Version: 1.2.10
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tudeley-festival
Tags: block-theme, full-site-editing, one-column, wide-blocks, custom-colors, editor-style
*/

/* Most styling lives in theme.json. These rules cover what it can't express. */

/* White card that overlaps the bottom of the photo above it */
.is-style-tf-overlap-card {
	position: relative;
	max-width: 640px;
	margin-top: -7rem !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
@media (max-width: 781px) {
	.is-style-tf-overlap-card { margin-top: -3rem !important; }
}

/* Keep hero photos from getting too thin on phones */
.tf-hero img { min-height: 240px; }

/* Bordered white card */
.is-style-tf-card {
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	transition: box-shadow 0.2s;
}
.is-style-tf-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

/* Round icon badge for quick facts */
.tf-icon {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--wp--preset--color--sage);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--green);
}
.tf-icon svg { width: 24px; height: 24px; }

/* Small category tag (Series on concert cards) */
.tf-tag a {
	display: inline-block;
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--green);
	font-size: 13px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 3px;
	text-decoration: none;
}

/* What's on filter pills (from the [tudeley_series_filter] shortcode) */
.tf-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.tf-filter a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border: 2px solid var(--wp--preset--color--green);
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--green);
	background: #fff;
}
.tf-filter a[aria-current="page"],
.tf-filter a:hover {
	background: var(--wp--preset--color--green);
	color: #fff;
}

/* Header nav: underline on hover / current page */
.tf-header .wp-block-navigation-item__content {
	padding: 10px 0;
	border-bottom: 3px solid transparent;
}
.tf-header .wp-block-navigation-item__content:hover,
.tf-header .current-menu-item > .wp-block-navigation-item__content {
	border-bottom-color: var(--wp--preset--color--green);
	text-decoration: none;
}

/* Footer links */
.tf-footer a { color: #e6eee9; text-decoration: none; }
.tf-footer a:hover { color: #fff; text-decoration: underline; }

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--blue);
	outline-offset: 2px;
}

/* Long email addresses in the footer */
.tf-footer p { overflow-wrap: anywhere; }

/* Artists page: four across on wide screens, three on medium, two on phones */
.tf-artists-grid.is-layout-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
@media (min-width: 1100px) {
	.tf-artists-grid.is-layout-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}
}

/* Stack grids on phones (artists keep two across) */
@media (max-width: 781px) {
	.wp-block-group.is-layout-grid,
	.wp-block-post-template.is-layout-grid {
		grid-template-columns: minmax(0, 1fr) !important;
	}
	.tf-artists-grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/* What's on rows: photo fills the left side of the card */
.tf-listing .wp-block-post-featured-image {
	height: 100%;
	min-height: 220px;
	margin: 0;
}
.tf-listing .wp-block-post-featured-image a,
.tf-listing .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Mailing list sign-up form ([tudeley_mailing_list]) */
.tf-signup { flex: 1 1 26rem; max-width: 34rem; margin-left: auto; }
.tf-signup--button { flex: 0 1 auto; }
.tf-signup--button .wp-block-buttons { justify-content: flex-end; }
@media (max-width: 781px) {
	.tf-signup { margin-left: 0; }
	.tf-signup--button .wp-block-buttons { justify-content: flex-start; }
}
.tf-signup__form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tf-signup__field { flex: 1 1 15rem; display: flex; flex-direction: column; gap: 6px; }
.tf-signup__field label { font-weight: 600; font-size: 0.9375rem; }
.tf-signup__field input {
	height: 48px;
	padding: 0 14px;
	border: 1px solid #8c877c;
	border-radius: 4px;
	font: inherit;
	font-size: 1rem;
	background: #fff;
}
.tf-signup__form button { height: 48px; padding: 0 1.6rem; border: 0; cursor: pointer; }
.tf-signup__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tf-signup__note { margin: 10px 0 0; font-size: 0.875rem; color: var(--wp--preset--color--muted); }
.tf-signup__message { margin: 0 0 12px; padding: 12px 16px; border-radius: 4px; font-weight: 600; }
.tf-signup__message.is-success { background: var(--wp--preset--color--sage); color: var(--wp--preset--color--green); }
.tf-signup__message.is-error { background: #fbeaea; color: #8a1f1f; }

/* Venues map ([tudeley_venues_map]) */
.tf-map__canvas {
	height: 440px;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--sage);
	z-index: 0;
}
.tf-map__legend {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1rem 2rem;
}
.tf-map__legend li { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tf-map__legend li span:nth-child(2) { flex: 1 1 12rem; }
.tf-map__dot { flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.tf-pin span {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.tf-pin { background: none; border: 0; }
@media (max-width: 781px) { .tf-map__canvas { height: 320px; } }
.tf-mapbox-logo { display: block; line-height: 0; margin: 0 0 4px 6px !important; }
.tf-mapbox-logo img { width: 88px; height: 23px; }

/* Homepage welcome card: tucked further up into the photo so the section stays compact */
.tf-hero-card.is-style-tf-overlap-card { margin-top: -15rem !important; max-width: 600px; }
@media (max-width: 1100px) { .tf-hero-card.is-style-tf-overlap-card { margin-top: -8rem !important; } }
@media (max-width: 781px) { .tf-hero-card.is-style-tf-overlap-card { margin-top: -3rem !important; } }
.tf-signup--external { flex: 1 1 26rem; max-width: 34rem; }

/* Homepage "Show all artists" dropdown */
.tf-artist-list--featured {
	border-top: 3px solid var(--wp--preset--color--green);
	padding-top: 1rem !important;
	margin-top: var(--wp--preset--spacing--40) !important;
	margin-bottom: 0 !important;
}
.tf-artist-list--featured { border-bottom: 1px solid var(--wp--preset--color--line); padding-bottom: 0.75rem !important; }
.tf-artist-list--featured + .tf-artists-more { margin-top: 1.25rem !important; font-weight: 700; }
.tf-artists-details {
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.tf-artists-details > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 44px;
	padding: 1rem 0;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--green);
}
.tf-artists-details > summary::-webkit-details-marker { display: none; }
.tf-artists-details > summary::after {
	content: "";
	flex: none;
	width: 12px;
	height: 12px;
	border-right: 3px solid currentColor;
	border-bottom: 3px solid currentColor;
	transform: rotate(45deg);
	margin: -6px 6px 0 0;
	transition: transform .2s;
}
.tf-artists-details[open] > summary::after { transform: rotate(-135deg); margin-top: 6px; }
.tf-artists-details > summary:hover { color: var(--wp--preset--color--green-dark); }
.tf-artist-list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	columns: 3 15rem;
	column-gap: 2.5rem;
}
.tf-artist-list li { break-inside: avoid; padding: 0.35rem 0; color: var(--wp--preset--color--muted); }
.tf-artist-list li strong { color: var(--wp--preset--color--ink); font-weight: 700; }

/* Footer Facebook link */
.tf-social .wp-social-link a { padding: 0; gap: 0.5rem; font-size: 1rem; }
.tf-social .wp-social-link svg { width: 1.5rem; height: 1.5rem; }
.tf-social.wp-block-social-links { font-size: 1rem !important; }
.tf-social .wp-social-link span.wp-block-social-link-label { font-size: 1rem; font-weight: 700; margin: 0; }
.tf-social .wp-social-link a:hover .wp-block-social-link-label { text-decoration: underline; }
