/*
Theme Name: Hampton Chase
Theme URI: https://hcrafairfax.org/
Author: Hampton Chase Recreation Association
Author URI: https://hcrafairfax.org/
Description: A block theme for the Hampton Chase Recreation Association pool and clubhouse in Fairfax, Virginia. Every page, the header, the footer and the colors can be edited in the WordPress editor. Includes ready-made page layouts for Home, Pool, Membership, Clubhouse, Community, FAQ and Contact, and a setup screen that creates them as drafts.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hcra
Tags: block-patterns, full-site-editing, custom-colors, editor-style
*/

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

:where(.wp-site-blocks) *:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Header navigation: highlight the current page as a soft pill. */
.hcra-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
}
.hcra-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.hcra-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary-dark);
}

/* Card block style (Group block → Styles → Card). */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
	padding: var(--wp--preset--spacing--50);
}
.wp-block-group.is-style-card-highlight {
	background: var(--wp--preset--color--surface);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 20px;
	padding: var(--wp--preset--spacing--50);
}

/* Rows of hours or schedule items (List block → Styles → Divided rows). */
.wp-block-list.is-style-divided {
	list-style: none;
	padding-left: 0;
}
.wp-block-list.is-style-divided > li {
	padding: 0.8rem 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

/* Numbered step badge (Paragraph block → Styles → Step number). */
p.is-style-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	font-weight: 600;
}

/* Small uppercase label above a heading (Paragraph block → Styles → Eyebrow). */
p.is-style-eyebrow {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* FAQ accordion (Details block). */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 1.1rem 0;
}
.wp-block-details summary {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	flex-shrink: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
}
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details > :not(summary) { color: var(--wp--preset--color--muted); }

/* Mobile adjustments. */
@media (max-width: 781px) {
	.hcra-header .hcra-header-actions { display: none; }
}

/* Page sections sit flush against the header and footer. */
.wp-site-blocks > * + * { margin-block-start: 0; }
.hcra-main > .wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Footer link lists. */
.wp-block-list.is-style-plain { list-style: none; padding-left: 0; }
.wp-block-list.is-style-plain > li + li { margin-top: 0.35rem; }
.wp-block-list.is-style-plain a,
footer.wp-block-group a { text-decoration: none; }
footer.wp-block-group a:hover { text-decoration: underline; }

/* Hours rows: label on the left, time on the right. */
.wp-block-list.is-style-divided > li:has(> strong) {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

/* Quick-action cards: the whole card is clickable. */
.hcra-action { position: relative; transition: border-color 0.15s ease; }
.hcra-action:hover { border-color: var(--wp--preset--color--primary); }
.hcra-action h3 a { color: inherit; text-decoration: none; }
.hcra-action h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.hcra-icon { flex-shrink: 0; margin: 0; }
.hcra-icon img { background: var(--wp--preset--color--primary-soft); padding: 8px; box-sizing: border-box; }
.hcra-wordmark a { text-decoration: none; }
.wp-block-list.is-style-divided { align-self: stretch; }
.is-style-card a, .is-style-card-highlight a { overflow-wrap: anywhere; }

/* Header fits on one line on laptops; on phones the menu collapses instead. */
@media (min-width: 782px) {
	.hcra-header .wp-block-button__link,
	.hcra-header .wp-block-navigation .wp-block-navigation-item__content { white-space: nowrap; }
	.hcra-header .wp-block-navigation__container { flex-wrap: nowrap; }
}
@media (min-width: 782px) and (max-width: 1250px) {
	.hcra-header .wp-block-navigation { font-size: 0.95rem; }
	.hcra-header .wp-block-navigation .wp-block-navigation-item__content { padding: 0.5rem 0.45rem; }
}
@media (min-width: 782px) and (max-width: 1150px) {
	.hcra-header .hcra-header-actions .wp-block-button.is-style-outline { display: none; }
}

/* Grid and card contents may shrink below their natural width on phones. */
.wp-block-group.is-layout-grid > * { min-width: 0; }
.hcra-action > .wp-block-group { min-width: 0; }
