/**
 * CNZ Theme — Custom Styles
 * Climbing New Zealand child theme of Twenty Twenty-Five
 * Black & white design inspired by NZ sport identity
 */

/* ===== GLOBAL ===== */

:root {
	--cnz-accent-text: #006B35;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ===== SKIP LINK ===== */

.cnz-skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: 999;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary);
	padding: 0.75rem 1.5rem;
	font-weight: 700;
	font-size: 0.875rem;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cnz-skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	z-index: 10000;
}

/* ===== FOCUS STYLES ===== */

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* White outline on dark backgrounds */
.cnz-header-wrap :focus-visible,
.cnz-footer :focus-visible,
.cnz-next-event :focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* Suppress outline for mouse clicks */
:focus:not(:focus-visible) {
	outline: none;
}

/* ===== HEADER (sticky) ===== */

.cnz-header-wrap {
	border-top: 4px solid var(--wp--preset--color--accent);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
}

/* Cover subpixel gap between fixed header and content */
.cnz-header-wrap::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 1px;
	background-color: var(--wp--preset--color--primary);
}

.admin-bar .cnz-header-wrap {
	top: 32px;
}

/* Compact header on scroll */
.cnz-header--compact {
	padding-top: 0.25rem !important;
	padding-bottom: 0.25rem !important;
	border-top-width: 2px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.cnz-header-wrap .cnz-header-logo {
	transition: height 0.3s ease;
}

.cnz-header-wrap .cnz-header-logo img {
	transition: height 0.3s ease;
}

.cnz-header--compact .cnz-header-logo {
	height: 36px !important;
	width: auto !important;
}

.cnz-header--compact .cnz-header-logo img {
	height: 36px !important;
	width: auto !important;
}

/* Offset body content for fixed header height */
.wp-site-blocks > header:first-child {
	margin-bottom: 0 !important;
}

/* ===== HEADER LOGO ===== */

.cnz-header-logo {
	margin: 0;
	flex-shrink: 0;
}

.cnz-header-logo img {
	display: block;
}

/* ===== HEADER BAR LAYOUT + ACCOUNT ICON ===== */

.cnz-header-bar {
	align-items: center;
	width: 100%;
}

.cnz-header-actions {
	align-items: center;
	flex-shrink: 0;
	margin-left: auto;
}

.cnz-account-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	/* Sit it apart from the nav so it reads as its own action, not part of the
	   adjacent menu item (the header group's blockGap alone is too tight). */
	margin-left: 0.5rem;
	color: inherit;
	text-decoration: none;
	/* Circular hit area so the hover/focus highlight reads as a round icon button
	   (the box is 44x44, so 50% is a true circle). */
	border-radius: 50%;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.cnz-account-icon:hover,
.cnz-account-icon:focus-visible {
	opacity: 1;
	text-decoration: none;
	/* Visible affordance: the most important header action gets a home. */
	background-color: rgba(255, 255, 255, 0.2);
}

/* Thin rule between the nav and the account zone so the account entry reads as its
   own action, not a trailing menu item. Hidden on tablet/mobile (icon-only). */
.cnz-account-divider {
	align-self: center;
	flex-shrink: 0;
	width: 1px;
	height: 22px;
	margin-left: 0.4rem;
	background-color: rgba(255, 255, 255, 0.2);
	/* Match the account label's optical lift so the rule spans the nav's centre line. */
	position: relative;
	top: -3px;
}

/* Glyph + badge wrapper: the badge's positioning context, so it pins to the icon
   and doesn't drift to the end of a labelled anchor. */
.cnz-account-icon__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cnz-account-icon__glyph {
	display: block;
	width: 26px;
	height: 26px;
	/* Optical lift: a person glyph is bottom-heavy (small head, wide shoulders),
	   so its optical centre reads low — nudge up to align with the nav text. */
	transform: translateY(-1px);
}

.cnz-account-icon__badge {
	position: absolute;
	right: -4px;
	bottom: -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 1.5px var(--wp--preset--color--primary);
}

.cnz-account-icon__badge-svg {
	display: block;
	width: 10px;
	height: 10px;
}

.cnz-account-icon__badge--done {
	background-color: #008B45;
	color: #fff;
}

.cnz-account-icon__badge--action {
	background-color: #E6A817;
	color: var(--wp--preset--color--primary);
}

/* "Attention" = a club has rejected one of your athletes (2026-07-27).
   Deliberately NOT red any more. Since the tier change, a rejection is a thing
   CNZ resolves with the club — the member has nothing to do, and is told in the
   portal that it's usually a mix-up. A red alarm outranking the amber we use for
   genuinely outstanding money contradicted that, and its old label literally read
   "action needed". Slate says "there's something here to read", which is true. */
.cnz-account-icon__badge--attention {
	background-color: #54606E;
	color: #fff;
}

/* Badge tooltip. The status badge is a 14px dot; without this the only
   explanation was a native `title`, which needs a hover-and-wait, never fires on
   touch and is unreachable by keyboard — so the dot was unreadable (Kit,
   2026-07-27). Same idiom as the portal's photo tip: hidden bubble, revealed on
   :hover AND :focus-within so pointer and keyboard both get it. On touch there is
   no hover, but tapping the icon goes to the portal, which explains the state in
   full — the badge only ever has to say "there is something here". */
.cnz-account-icon__tip {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	z-index: 20;
	width: max-content;
	max-width: 15rem;
	padding: 0.5rem 0.65rem;
	border-radius: 6px;
	background: #1c1c1c;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.4;
	text-align: left;
	white-space: normal;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	pointer-events: none;
}
.cnz-account-icon:hover .cnz-account-icon__tip,
.cnz-account-icon:focus-visible .cnz-account-icon__tip,
.cnz-account-icon:focus-within .cnz-account-icon__tip { display: block; }
@media (prefers-reduced-motion: no-preference) {
	.cnz-account-icon__tip { animation: cnz-tip-in 120ms ease-out; }
	@keyframes cnz-tip-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
}

/* Logged-out register CTA: a restrained outlined pill (person glyph + "Register")
   so the standing registration action reads as an action without a loud solid
   fill — it only fills accent-green on hover. Sized to the nav metrics so it sits
   WITH the menu. The returning-cookie script downgrades it to the quiet --labelled
   "Log in" state for visitors who already have an account. */
.cnz-account-icon--cta {
	width: auto;
	height: auto;
	gap: 0.35rem;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background-color: transparent;
	border: 1.5px solid var(--wp--preset--color--accent);
	color: #fff;
	/* Match the main nav item metrics (0.875rem / 600 / uppercase / 0.05em) so the
	   CTA sits WITH the menu rather than smaller beside it; line-height:1 keeps the
	   label on the nav baseline. */
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1;
	/* Optical nudge: the bordered pill's box-centre reads ~3px below the nav text's
	   optical centre, so lift it onto the menu's centre line. Reset on mobile. */
	position: relative;
	top: -3px;
}

.cnz-account-icon--cta:hover,
.cnz-account-icon--cta:focus-visible {
	background-color: var(--wp--preset--color--accent);
	color: #fff;
}

/* Compact inline glyph beside the label. Keep the optical lift — the person glyph
   is bottom-heavy so it reads low against the nav text without it. */
.cnz-account-icon--cta .cnz-account-icon__glyph {
	width: 16px;
	height: 16px;
	transform: translateY(-1px);
}

/* Quiet labelled state (logged-in "Account", returning-visitor "Log in"): a plain
   nav-weight label + icon, no pill/border — a calm portal entry that reads as an
   obvious action without nagging account holders the way the green CTA converts
   new visitors. */
.cnz-account-icon--labelled {
	width: auto;
	height: auto;
	gap: 0.4rem;
	padding: 0 0.15rem;
	border-radius: 0;
	background-color: transparent;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1;
	/* Same optical lift as the CTA so it sits on the nav centre line. */
	position: relative;
	top: -3px;
}

.cnz-account-icon--labelled:hover,
.cnz-account-icon--labelled:focus-visible {
	background-color: transparent;
	color: var(--wp--preset--color--accent);
}

.cnz-account-icon--labelled .cnz-account-icon__glyph {
	width: 20px;
	height: 20px;
	transform: translateY(-1px);
}

.cnz-account-icon__label {
	white-space: nowrap;
	line-height: 1;
}

/* Tablet/mobile — and any time the full menu is tight: drop the label + divider and
   revert to a compact circle (outlined for the CTA, plain for the account icon) so a
   crowded nav never wraps. 1024px keeps the label for wide desktop only. */
@media (max-width: 1024px) {
	.cnz-account-icon--cta,
	.cnz-account-icon--labelled {
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 50%;
		top: 0;
	}

	.cnz-account-icon--cta .cnz-account-icon__glyph,
	.cnz-account-icon--labelled .cnz-account-icon__glyph {
		width: 26px;
		height: 26px;
	}

	.cnz-account-icon__label {
		display: none;
	}

	.cnz-account-divider {
		display: none;
	}
}

/* ===== HERO ===== */

.cnz-hero {
	position: relative;
	background: #000 url('../images/hero.jpg') center 30% / cover no-repeat;
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cnz-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.55) 0%,
		rgba(0, 0, 0, 0.75) 50%,
		rgba(0, 0, 0, 0.6) 100%
	);
	z-index: 1;
}

.cnz-hero__content {
	position: relative;
	z-index: 2;
	padding: 5rem 1.5rem;
}

.cnz-hero__content h1 {
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	margin-bottom: 0.5rem;
}

.cnz-hero__content p {
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}


@media (max-width: 768px) {
	.cnz-hero {
		min-height: 300px;
	}

	.cnz-hero__content {
		padding: 3rem 1rem;
	}

	.cnz-hero__content h1 {
		font-size: clamp(1.75rem, 6vw, 3rem) !important;
	}
}

/* ===== TABLES ===== */

.wp-block-table {
	border: none !important;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
	border: none !important;
}

.wp-block-table thead {
	border-bottom: none !important;
}

.wp-block-table th,
.wp-block-table td {
	border: none !important;
}

.wp-block-table th {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8rem;
	padding: 0.75rem 1rem;
	text-align: left;
}

.wp-block-table td {
	padding: 0.6rem 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border) !important;
	vertical-align: middle;
}

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

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

.wp-block-table.is-style-stripes tbody tr:hover {
	background-color: var(--wp--preset--color--border);
}

/* ===== BADGES ===== */

.cnz-badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 0;
}

.cnz-badge--discretionary {
	background-color: var(--wp--preset--color--border);
	color: var(--wp--preset--color--secondary);
}

.cnz-badge--record {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.cnz-badge--merit {
	background-color: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--primary);
	border: 1px solid var(--wp--preset--color--primary);
}

/* ===== MEDAL INDICATORS ===== */

.cnz-medal {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	font-size: 0.7rem;
	font-weight: 800;
	color: #fff;
	line-height: 1;
}

.cnz-medal--gold {
	background-color: #C5A44E;
}

.cnz-medal--silver {
	background-color: #8C8C8C;
}

.cnz-medal--bronze {
	background-color: #9A6B42;
}

/* ===== CALLOUT BOXES ===== */

.cnz-callout {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.cnz-callout h4 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.85rem;
}

/* ===== TABLE OF CONTENTS ===== */

.cnz-toc {
	padding-left: 1.5rem;
}

.cnz-toc li {
	margin-bottom: 0.5rem;
}

.cnz-toc a {
	text-decoration: none;
	font-weight: 500;
}

.cnz-toc a:hover {
	text-decoration: underline;
}

/* ===== EVENT CARD ===== */

.cnz-event-card {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.cnz-event-card .wp-block-column > p {
	margin-block: 0;
}

.cnz-event-card .wp-block-column > p + p {
	margin-top: 0.25rem;
}

/* ===== NEXT EVENT BANNER ===== */

.cnz-next-event-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.cnz-next-event-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: 1;
	min-width: 0;
}

.cnz-next-event-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1;
	color: var(--wp--preset--color--base);
	opacity: 0.85;
	flex-shrink: 0;
}

.cnz-next-event-title {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wp--preset--color--base);
	text-decoration: none;
	flex: 1;
	min-width: 0;
}

.cnz-next-event-title:hover {
	color: var(--wp--preset--color--accent);
}

.cnz-next-event-details {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	flex-shrink: 0;
}

.cnz-next-event-detail {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.cnz-next-event-detail-label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.7);
}

.cnz-next-event-detail-value {
	font-size: 0.9rem;
	font-weight: 500;
}

/* ===== EVENT LIST ===== */

.cnz-event-list {
	display: flex;
	flex-direction: column;
}


.cnz-event-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	padding: 1rem 0;
	gap: 0.75rem;
	transition: background-color 0.2s ease;
}

.cnz-event-item:hover {
	background-color: rgba(0, 0, 0, 0.03);
}

.cnz-event-item--bordered {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.cnz-event-item-left {
	display: flex;
	align-items: flex-start;
	gap: 1.25rem;
}

.cnz-event-date {
	width: 52px;
	flex-shrink: 0;
	text-align: center;
	line-height: 1.1;
	padding-top: 0.1rem;
}

.cnz-event-date-month {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cnz-accent-text);
}

.cnz-event-date-day {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1;
}

.cnz-event-date-end {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--wp--preset--color--tertiary);
	line-height: 1.3;
}

.cnz-event-info {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cnz-event-info > * {
	margin-block: 0;
	margin: 0;
	padding: 0;
}

.cnz-event-item {
	position: relative;
	cursor: pointer;
}

.cnz-event-title {
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	color: inherit;
}

.cnz-event-title::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cnz-event-item:hover .cnz-event-title {
	color: var(--wp--preset--color--accent);
}

.cnz-event-meta {
	font-size: 0.85rem;
	color: var(--wp--preset--color--tertiary);
}

/* ===== EVENTS PAGE TOOLBAR ===== */

.cnz-events-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	gap: 1rem;
}

.cnz-events-filters {
	display: flex;
	gap: 0;
	outline: 1px solid var(--wp--preset--color--primary);
}

.cnz-filter-btn {
	padding: 0.5rem 1.25rem;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-family: inherit;
}

.cnz-filter-btn--active {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.cnz-filter-btn:not(.cnz-filter-btn--active):hover {
	background-color: var(--wp--preset--color--base-alt);
}

.cnz-events-view-toggle {
	display: flex;
	gap: 0.25rem;
}

.cnz-view-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 1px solid var(--wp--preset--color--border);
	cursor: pointer;
	color: var(--wp--preset--color--tertiary);
	transition: all 0.2s ease;
}

.cnz-view-btn--active {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.cnz-view-btn:not(.cnz-view-btn--active):hover {
	border-color: var(--wp--preset--color--tertiary);
	color: var(--wp--preset--color--primary);
}

/* ===== EVENT MONTH GROUPING ===== */

.cnz-event-month-group {
	margin-bottom: 2rem;
}

.cnz-event-month-header {
	font-size: 0.85rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--tertiary);
	border-bottom: 2px solid var(--wp--preset--color--primary);
	padding-bottom: 0.5rem;
	margin-bottom: 0;
	margin-top: 0;
}

/* ===== EVENT TYPE CHIPS ===== */

.cnz-event-title-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
}

.cnz-event-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1;
	white-space: nowrap;
	flex-shrink: 0;
	color: var(--wp--preset--color--tertiary);
}

.cnz-event-chip-dot {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--tertiary);
}

.cnz-event-chip--national {
	color: var(--cnz-accent-text);
}

.cnz-event-chip--national .cnz-event-chip-dot {
	background-color: var(--cnz-accent-text);
}

.cnz-event-chip--competition {
	color: #B45309;
}

.cnz-event-chip--competition .cnz-event-chip-dot {
	background-color: #B45309;
}

.cnz-event-chip--international-competition {
	color: #1A3A5C;
}

.cnz-event-chip--international-competition .cnz-event-chip-dot {
	background-color: #1A3A5C;
}

/* On-dark variant for next-event banner */
.cnz-event-chip--on-dark {
	color: rgba(255, 255, 255, 0.85);
	flex-shrink: 0;
}

.cnz-events-empty {
	color: var(--wp--preset--color--tertiary);
	font-style: italic;
}

/* ===== CUSTOM CALENDAR GRID ===== */

.cnz-cal-month {
	margin-bottom: 4rem;
}

.cnz-cal-month-title {
	font-size: 1rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--primary);
	border-bottom: 2px solid var(--wp--preset--color--primary);
	padding-bottom: 0.5rem;
	padding-top: 0.25rem;
	margin-bottom: 0;
	margin-top: 0;
	position: sticky;
	top: 0;
	background: var(--wp--preset--color--base);
	z-index: 5;
}

/* ===== CALENDAR GRID — CSS Grid layout ===== */

/* Day-name header */
.cnz-cal-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.cnz-cal-header > div {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.5rem 0.25rem;
	text-align: center;
}

/*
 * Week row.
 * 7 equal columns. grid-template-rows set inline by PHP:
 *   1.4rem (day numbers) + N×1.35rem (event tracks) + 0.3rem (bottom pad)
 * --tracks custom property drives row count via repeat().
 */
.cnz-cal-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	min-height: 4rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: relative;
}

/* Background cells — each spans all grid rows; day number lives inside as a child span */
.cnz-cal-cell {
	padding: 0.2rem 0.3rem 0;
	z-index: 0;
	background-color: var(--wp--preset--color--base);
	min-width: 0;
}

.cnz-cal-cell--overflow {
	background-color: var(--wp--preset--color--base-alt);
}

.cnz-cal-cell--today {
	/* circle on day number handles today — no cell background needed */
}

.cnz-cal-day-num {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--tertiary);
}

.cnz-cal-day-num--overflow {
	color: #BDBDBD;
	font-weight: 400;
}

.cnz-cal-day-num--today {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 800;
	line-height: 1;
}

/* ── Event bars ── */

/* Wrapper div — this is the CSS Grid item (block element, immune to wpautop) */
.cnz-cal-event-wrap {
	align-self: center;
	min-width: 0;
	z-index: 2;
}

/* Inner <a> — the visible pill bar that fills the wrapper */
.cnz-cal-event {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	padding: 0.1rem 0.4rem;
	margin: 1px 0;
	text-decoration: none;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--tertiary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	position: relative;
	transition: filter 0.1s ease;
}

/* Category colours — match the chips */
.cnz-cal-event--national {
	background-color: var(--wp--preset--color--accent);
}

.cnz-cal-event--competition {
	background-color: #B45309;
}

.cnz-cal-event--international-competition {
	background-color: #1A3A5C;
}

/* ── Pill shapes ── */
.cnz-cal-event--pill-full  { border-radius: 3px; }
.cnz-cal-event--pill-left  { border-radius: 3px 0 0 3px; margin-right: -1px; }
.cnz-cal-event--pill-right { border-radius: 0 3px 3px 0; margin-left: -1px; }
.cnz-cal-event--pill-mid   { border-radius: 0; margin-left: -1px; margin-right: -1px; }

/* Row-wrap continuation: pill shape (--pill-left / --pill-right) communicates continuity */

/* ── Cross-month boundary indicators ── */
.cnz-cal-event--cross-month-start {
	border-left: 2px dashed rgba(255, 255, 255, 0.45);
	padding-left: 0.25rem;
}

.cnz-cal-event--cross-month-end::after {
	content: ' ▶';
	font-size: 0.5rem;
	opacity: 0.75;
}

/* ── Past scope: mute event bars to signal history ── */
.cnz-cal-scope[data-scope="past"] .cnz-cal-event {
	opacity: 0.55;
	filter: saturate(0.4);
}

/* ── Hover highlight: JS applies this to every segment of the same event ── */
.cnz-cal-event--hovered {
	filter: brightness(1.25);
}

/* ── Floating tooltip ── */
.cnz-cal-tooltip {
	position: fixed;
	background: #111;
	color: #fff;
	padding: 0.3rem 0.65rem;
	font-family: Inter, sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	pointer-events: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	z-index: 9999;
	display: none;
}

/* ── Calendar colour legend ── */

.cnz-cal-legend {
	display: none !important; /* !important to override any leftover MCP debug styles */
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

[data-view="calendar"] .cnz-cal-legend {
	display: flex !important; /* !important to override any leftover MCP debug styles */
}

.cnz-cal-legend-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--tertiary);
}

.cnz-cal-legend-swatch {
	width: 1.5rem;
	height: 0.65rem;
	border-radius: 3px;
	flex-shrink: 0;
	background-color: var(--wp--preset--color--tertiary);
}

.cnz-cal-legend-swatch--national {
	background-color: var(--wp--preset--color--accent);
}

.cnz-cal-legend-swatch--competition {
	background-color: #B45309;
}

.cnz-cal-legend-swatch--international-competition {
	background-color: #1A3A5C;
}

/* ===== QUICK LINKS ===== */

.cnz-quick-links {
	align-items: stretch !important;
}

.cnz-quick-link {
	display: flex;
}

.cnz-quick-link > .wp-block-group {
	flex: 1;
	position: relative;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}

.cnz-quick-link > .wp-block-group:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-bottom-width: 4px;
	border-bottom-color: var(--wp--preset--color--accent);
}

/* Stretch the heading link to cover the entire card */
.cnz-quick-link h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ===== POST CARDS ===== */

.cnz-post-card {
	position: relative;
	padding: 1.25rem !important;
	border: 1px solid transparent;
	background: var(--wp--preset--color--base);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cnz-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: var(--wp--preset--color--border);
}

/* Make the entire card clickable via the title link */
.cnz-post-card > * {
	position: static !important;
}

.cnz-post-card .wp-block-post-title a {
	position: static;
}

.cnz-post-card .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.cnz-post-card[style*="border-bottom"] {
	border-bottom-color: transparent !important;
	border-bottom-width: 0 !important;
}

.cnz-post-card .wp-block-post-featured-image {
	overflow: hidden;
}

.cnz-post-card .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: transform 0.3s ease;
}

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

/* ===== CATEGORY BADGES ===== */

.cnz-category-badge a {
	display: inline-block;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base) !important;
	padding: 0.2rem 0.5rem;
	font-size: 0.65rem;
	text-decoration: none !important;
	letter-spacing: 0.05em;
	border-radius: 2px;

}

.cnz-category-badge a:hover {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base) !important;
}

/* Only show event/team/results badges — hide everything else. */
.cnz-category-badge a {
	display: none;
}

.cnz-category-badge a[href*="/event"],
.cnz-category-badge a[href*="/team"],
.cnz-category-badge a[href*="/results"] {
	display: inline-block;
}

/* ===== NEWS LIST (home.html) ===== */

.cnz-news-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.cnz-news-item {
	position: relative;
	padding: 1.5rem;
	margin-bottom: 0.75rem;
	gap: 1.5rem !important;
	align-items: flex-start !important;
	border: 1px solid transparent;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cnz-news-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: var(--wp--preset--color--border);
	cursor: pointer;
}

/* Stretch the title link to cover the entire card.
   The news item has position:relative from its base rule.
   Inner containers must be static so ::after reaches the outer card. */
.cnz-news-item > * {
	position: static !important;
}

.cnz-news-item .wp-block-post-title a {
	position: static;
}

.cnz-news-item .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.cnz-news-item .wp-block-post-featured-image {
	flex-shrink: 0;
	width: 220px;
	overflow: hidden;
}

/* When no featured image, WP omits the figure entirely.
   Use consistent left margin on the text column so all items align. */
.cnz-news-item > .wp-block-group:last-child {
	margin-left: calc(220px + 1.5rem);
}

/* When an image IS present, reset the margin — flex handles it */
.cnz-news-item .wp-block-post-featured-image ~ .wp-block-group:last-child {
	margin-left: 0;
}

.cnz-news-item .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cnz-news-item:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

/* Hide excerpt "Read more" link — title is the link */
.cnz-news-item .wp-block-post-excerpt__more-link {
	display: none;
}

/* ===== SINGLE POST ===== */

.cnz-post-back {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	color: var(--wp--preset--color--tertiary) !important;
	transition: color 0.2s ease;
}

.cnz-post-back:hover {
	color: var(--wp--preset--color--primary) !important;
}

/* Eliminate any gap between site header and post header */
.cnz-post-header {
	margin-block: 0 !important;
	margin-top: -1px !important;
}

.cnz-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
}

.cnz-post-nav a {
	text-decoration: none;
	font-weight: 600;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--wp--preset--color--primary);
	transition: color 0.2s ease;
}

.cnz-post-nav a:hover {
	color: var(--wp--preset--color--accent);
}

/* ===== NAVIGATION ===== */

.wp-block-navigation a {
	text-decoration: none;
	transition: color 0.2s ease;
	position: relative;
}

.wp-block-navigation a::after {
	content: "";
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--wp--preset--color--accent);
	transition: width 0.25s ease;
}

.wp-block-navigation a:hover {
	color: var(--wp--preset--color--accent) !important;
	text-decoration: none;
}

.wp-block-navigation a:hover::after {
	width: 100%;
}

.wp-block-navigation__submenu-container {
	min-width: 260px;
}

/* ===== MEGA MENU (NEW ZEALAND TEAM) ===== */

.wp-block-navigation-item.cnz-mega-menu > .wp-block-navigation__submenu-container {
	min-width: 300px !important;
	padding: 0.5rem 0;
}

/* Section header labels */
.wp-block-navigation-item.cnz-mega-menu .cnz-mega-header > .wp-block-navigation-item__content {
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.45);
	padding: 0.75rem 1rem 0.5rem;
	cursor: default;
	pointer-events: none;
	display: block;
}

/* Horizontal divider above each section header except the first */
.wp-block-navigation-item.cnz-mega-menu .cnz-mega-header:not(:first-child) {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin-top: 0.25rem;
}

/* Horizontal divider before footer items (Speed Record Holders, Selection Policies) */
.wp-block-navigation-item.cnz-mega-menu .cnz-mega-divider {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin-top: 0.25rem;
}

/* Suppress hover underline and colour change on headers */
.wp-block-navigation-item.cnz-mega-menu .cnz-mega-header > .wp-block-navigation-item__content::after {
	display: none !important;
}

.wp-block-navigation-item.cnz-mega-menu .cnz-mega-header > .wp-block-navigation-item__content:hover {
	color: rgba(255, 255, 255, 0.45) !important;
}

/* ===== LISTS IN CONTENT ===== */

.wp-block-post-content ul,
.wp-block-group ul {
	padding-left: 1.5rem;
}

.wp-block-post-content ul li,
.wp-block-group ul li {
	margin-bottom: 0.4rem;
	line-height: 1.6;
}

.wp-block-post-content ol,
.wp-block-group ol {
	padding-left: 1.5rem;
}

.wp-block-post-content ol li,
.wp-block-group ol li {
	margin-bottom: 0.4rem;
	line-height: 1.6;
}

/* ===== BUTTONS ===== */

.wp-block-button__link {
	padding: 0.75rem 2rem;
	outline: 2px solid transparent;
	outline-offset: -2px;
	transition: background-color 0.25s ease, color 0.25s ease, outline-color 0.25s ease;
}

.wp-block-button__link:hover {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--primary) !important;
	outline-color: var(--wp--preset--color--primary);
}

/* ===== ACCENT BUTTONS ===== */

.cnz-btn-accent {
	display: inline-block;
	background-color: var(--wp--preset--color--accent);
	color: #fff;
	padding: 0.65rem 1.75rem;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	border: 2px solid var(--wp--preset--color--accent);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cnz-btn-accent:hover {
	background-color: #006B35;
	border-color: #006B35;
	color: #fff;
}

/* ===== VIEW ALL LINK ===== */

.cnz-view-all a {
	color: var(--cnz-accent-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.cnz-view-all a:hover {
	color: #006B35;
}

/* ===== SEPARATORS ===== */

.wp-block-separator.is-style-wide {
	border-color: var(--wp--preset--color--border);
}

/* ===== FOOTER ===== */

.cnz-footer .wp-block-column > .wp-block-heading {
	margin-bottom: 0.5rem;
}

.cnz-footer .wp-block-column > .wp-block-heading + p,
.cnz-footer .wp-block-column > .wp-block-heading + ul {
	margin-top: 0;
}

.cnz-footer .wp-block-column > p + .wp-block-heading {
	margin-top: 1rem;
}

.cnz-footer-logo img {
	display: block;
}

.cnz-footer-links {
	list-style: none;
	padding-left: 0;
}

.cnz-footer-links li {
	margin-top: 0 !important;
	margin-bottom: 0.1rem !important;
	padding: 0;
	line-height: 1.8;
}

.cnz-footer-links a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
	padding-bottom: 1px;
}

.cnz-footer-links a:hover {
	border-bottom-color: rgba(255, 255, 255, 0.5);
}

.cnz-social-links a {
	transition: opacity 0.2s ease;
}

.cnz-social-links a:hover {
	opacity: 0.7;
}

/* Member of links */
.cnz-footer .wp-block-column > .wp-block-heading + p a {
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
	padding-bottom: 1px;
}

.cnz-footer .wp-block-column > .wp-block-heading + p a:hover {
	border-bottom-color: rgba(255, 255, 255, 0.5);
}

.cnz-partner-row a {
	transition: opacity 0.2s ease;
}

.cnz-partner-row a:hover {
	opacity: 0.7;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
	.cnz-quick-links {
		flex-wrap: wrap !important;
	}

	.cnz-quick-links .wp-block-column {
		flex-basis: calc(50% - 1rem) !important;
	}
}

@media (max-width: 768px) {
	/* News list: stack vertically on mobile */
	.cnz-news-item {
		flex-direction: column !important;
		gap: 0.75rem !important;
	}

	.cnz-news-item .wp-block-post-featured-image {
		width: 100% !important;
	}

	.cnz-news-item > .wp-block-group:last-child {
		margin-left: 0 !important;
	}

	/* Single post header */
	.cnz-post-header .wp-block-post-title {
		font-size: 1.5rem !important;
	}

	.wp-block-table {
		overflow-x: auto;
		display: block;
	}

	.wp-block-table table {
		min-width: 500px;
	}

	.cnz-event-card .wp-block-columns {
		flex-direction: column;
	}

	/* Next event banner: stack vertically */
	.cnz-next-event-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	/* Keep label+chip on one line, push title to its own full-width row below */
	.cnz-next-event-left {
		flex-wrap: wrap;
		align-items: center;
		gap: 0.25rem 0.75rem;
	}

	.cnz-next-event-left .cnz-next-event-title {
		flex-basis: 100%;
	}

	/* Quick links: single column */
	.cnz-quick-links .wp-block-column {
		flex-basis: 100% !important;
	}

	/* Event list items */
	.cnz-event-item {
		gap: 0.5rem;
	}

	/* Events page toolbar: stack on mobile */
	.cnz-events-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.cnz-events-view-toggle {
		justify-content: flex-end;
	}

	/* Calendar: smaller cells on mobile */
	.cnz-cal-cell {
		padding: 0.1rem;
	}

	.cnz-cal-event {
		font-size: 0.65rem;
		padding: 0.1rem 0.2rem;
	}

	/* Single event: stack card vertically */
	.cnz-single-event-card {
		flex-direction: column;
	}

	.cnz-single-event-date-block {
		text-align: left;
		flex-direction: row;
		align-items: baseline;
		gap: 0.5rem;
		min-width: auto;
		border-right: none;
		border-bottom: 1px solid var(--wp--preset--color--border);
		padding: 1rem 1.25rem;
	}

	.cnz-single-event-date-days {
		font-size: 1.75rem;
	}

	.cnz-single-event-details {
		padding: 1rem 1.25rem;
	}

	.cnz-single-event-link-bar {
		padding: 0.75rem 1.25rem;
	}

	.cnz-single-event-nav {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.cnz-single-event-map {
		height: 220px;
	}

	/* Footer: stack columns on tablet */
	.cnz-footer .wp-block-columns {
		flex-direction: column !important;
	}

	.cnz-footer .wp-block-column + .wp-block-column {
		margin-top: 1.5rem;
	}

	/* Header: reduce logo for tablets */
	.cnz-header-logo img {
		height: 48px !important;
		width: auto !important;
	}

	/* Post nav bar: allow wrapping */
	.cnz-post-nav-bar .wp-block-group {
		flex-wrap: wrap;
		gap: 0.75rem;
	}

	/* Fix Mobile Menu Alignment - Bulletproof override for all WP core alignment variables in mobile overlay */
	.wp-block-navigation__responsive-container.is-menu-open,
	.wp-block-navigation__responsive-container.is-menu-open * {
		--navigation-layout-justification-setting: flex-start !important;
		--navigation-layout-justify: flex-start !important;
		--navigation-layout-align: flex-start !important;
	}
	
	/* Force the flex containers themselves to align cross-axis items left */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
		align-items: flex-start !important;
	}
	
	/* Ensure all menu item links stretch fully and align text left */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		text-align: left !important;
		width: 100%;
		justify-content: flex-start !important;
	}
}

/* ===== RESPONSIVE: SMALL PHONES ===== */

@media (max-width: 480px) {
	/* Hero: compact on small phones */
	.cnz-hero {
		min-height: 240px;
	}

	.cnz-hero__content {
		padding: 2rem 1rem;
	}

	h1, .wp-block-heading:where(h1) {
		font-size: clamp(1.75rem, 6vw, 2.25rem) !important;
	}

	.cnz-hero__content p {
		font-size: 0.95rem !important;
	}

	/* Header: smaller logo */
	.cnz-header-logo img {
		height: 44px !important;
		width: auto !important;
	}

	/* Touch-friendly buttons (min 44px tap target) */
	.wp-block-button__link,
	.cnz-btn-accent,
	.cnz-filter-btn {
		min-height: 44px;
		padding: 0.75rem 1.5rem;
		font-size: 0.85rem;
	}

	.cnz-view-btn {
		width: 44px;
		height: 44px;
	}

	/* Dynamic heading scaling */
	h1, .wp-block-heading:where(h1) {
		font-size: clamp(1.5rem, 5vw, 2.25rem) !important;
	}

	h2, .wp-block-heading:where(h2) {
		font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
	}

	/* Tighter content padding */
	.wp-block-group.alignfull {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* Post cards */
	.cnz-post-card {
		padding: 1rem !important;
	}

	/* Next event banner: tighter layout */
	.cnz-next-event-details {
		gap: 0.75rem;
	}

	.cnz-next-event-title {
		font-size: 0.9rem;
	}

	/* Event list: compact date column */
	.cnz-event-date {
		min-width: 48px;
	}

	.cnz-event-date-day {
		font-size: 1.25rem;
	}

	/* Calendar: smaller cells */
	.cnz-cal-cell {
		padding: 0;
	}

	/* Footer: tighter padding */
	.cnz-footer .wp-block-group.alignfull {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* Tables: touch-friendly scroll hint */
	.wp-block-table {
		-webkit-overflow-scrolling: touch;
	}

	/* Single event: smaller map */
	.cnz-single-event-map {
		height: 180px;
	}
}

/* ===== EVENT ORGANISER — HIDE DEFAULT META ===== */

.eventorganiser-event-meta {
	display: none !important;
}

/* ===== SINGLE EVENT — HEADER TYPOGRAPHY ===== */

.single-event h1.wp-block-post-title {
	text-transform: none !important;
	font-weight: 700 !important;
	letter-spacing: -0.02em !important;
	font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
}

/* ===== SINGLE EVENT — NAVIGATION ===== */

.cnz-single-event-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-block: 0;
	margin-bottom: 1rem;
}

.cnz-single-event-back {
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	color: var(--wp--preset--color--tertiary);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	transition: color 0.2s ease;
}

.cnz-single-event-back:hover {
	color: var(--wp--preset--color--primary);
}

/* ===== SINGLE EVENT — CARD ===== */

.cnz-single-event-card {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	align-items: stretch;
	background-color: var(--wp--preset--color--base-alt);
	border-left: 3px solid var(--wp--preset--color--primary);
	padding: 0;
	margin-block: 0;
	margin-top: 1.5rem;
}

/* Date block (left) */
.cnz-single-event-date-block {
	min-width: 100px;
	text-align: center;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1.75rem 1.5rem;
	border-right: 1px solid var(--wp--preset--color--border);
}

.cnz-single-event-date-month {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cnz-accent-text);
}

.cnz-single-event-date-days {
	display: block;
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	margin-top: 0.1rem;
}

.cnz-single-event-date-end {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wp--preset--color--tertiary);
	line-height: 1.3;
}

.cnz-single-event-date-year {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--tertiary);
	margin-top: 0.25rem;
}

/* Details column (right) */
.cnz-single-event-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 1.25rem 1.75rem;
}

.cnz-single-event-detail-row {
	display: flex;
	gap: 1.25rem;
	padding: 0.6rem 0;
}

.cnz-single-event-separator + .cnz-single-event-detail-row {
	border-top: none;
}

.cnz-single-event-detail-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--tertiary);
	min-width: 90px;
	flex-shrink: 0;
	padding-top: 0.15rem;
}

.cnz-single-event-detail-value {
	font-weight: 500;
	font-size: 0.95rem;
}

.cnz-single-event-detail-value a {
	text-decoration: none;
	font-weight: 500;
	color: var(--wp--preset--color--primary);
}

.cnz-single-event-detail-value a:hover {
	color: var(--wp--preset--color--accent);
}

/* External link arrow (inline SVG via CSS) */
.cnz-single-event-detail-value .cnz-external-arrow {
	display: inline-block;
	width: 0.75em;
	height: 0.75em;
	margin-left: 0.3em;
	vertical-align: baseline;
	position: relative;
	top: 0.05em;
}

.cnz-single-event-detail-value .cnz-external-arrow svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cnz-single-event-separator {
	height: 0;
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0.25rem 0;
}

/* Full-width link bar at bottom of card */
.cnz-single-event-link-bar {
	border-top: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem 1.75rem;
	font-size: 0.9rem;
	font-weight: 500;
	width: 100%;
}

.cnz-single-event-link-bar a {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
	transition: color 0.2s ease;
}

.cnz-single-event-link-bar a:hover {
	color: var(--wp--preset--color--accent);
}

.cnz-single-event-link-bar .cnz-external-arrow {
	display: inline-block;
	width: 0.75em;
	height: 0.75em;
	margin-left: 0.3em;
	vertical-align: baseline;
	position: relative;
	top: 0.05em;
}

.cnz-single-event-link-bar .cnz-external-arrow svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ===== SINGLE EVENT — MAP ===== */

.cnz-single-event-map {
	height: 300px;
	width: 100%;
	margin-block: 0;
	margin-top: 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	position: relative;
	z-index: 1;
}

.cnz-single-event-map .eo-venue-map {
	height: 100% !important;
	width: 100% !important;
}

/* ===== EVENT ORGANISER — EVENT LISTS ===== */

.eo-events {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

.eo-events li {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.eo-events li:last-child {
	border-bottom: none;
}

.eo-events a {
	font-weight: 600;
	text-decoration: none;
}

.eo-events a:hover {
	color: var(--wp--preset--color--accent);
}

.eo-event-venue,
.eo-event-date {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--tertiary);
}

/* ===== EVENT ORGANISER — CALENDAR ===== */

.eo-fullcalendar {
	font-family: var(--wp--preset--font-family--body);
}

.eo-fullcalendar .fc-toolbar h2 {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.eo-fullcalendar .fc-button {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: none;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	padding: 0.4rem 0.8rem;
}

.eo-fullcalendar .fc-button:hover,
.eo-fullcalendar .fc-button.fc-state-active {
	background-color: var(--wp--preset--color--accent);
}

.eo-fullcalendar .fc-day-header {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	padding: 0.5rem;
}

.eo-fullcalendar .fc-event {
	background-color: var(--wp--preset--color--primary);
	border: none;
	border-radius: 0;
	padding: 0.15rem 0.35rem;
	font-size: 0.8rem;
	font-weight: 600;
}

.eo-fullcalendar .fc-event:hover {
	background-color: var(--wp--preset--color--accent);
}

.eo-fullcalendar .fc-today {
	background-color: var(--wp--preset--color--base-alt);
}

/* ===== EVENT ORGANISER — WIDGET ===== */

.widget_event-organiser .eo-widget-cal table {
	width: 100%;
	border-collapse: collapse;
}

.widget_event-organiser .eo-widget-cal th {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
	padding: 0.4rem;
}

.widget_event-organiser .eo-widget-cal td {
	text-align: center;
	padding: 0.3rem;
	font-size: 0.85rem;
}

.widget_event-organiser .eo-widget-cal .eo-today {
	background-color: var(--wp--preset--color--base-alt);
	font-weight: 700;
}

.widget_event-organiser .eo-widget-cal a {
	font-weight: 700;
	text-decoration: none;
}

/* ===== EVENT ORGANISER POSTERBOARD ===== */

.eo-posterboard {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.eo-posterboard .eo-pb-event {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.eo-posterboard .eo-pb-event:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.eo-posterboard .eo-pb-event-image img {
	width: 100%;
	height: auto;
	display: block;
}

.eo-posterboard .eo-pb-event-content {
	padding: 1.25rem;
}

.eo-posterboard .eo-pb-event-title {
	font-weight: 700;
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.eo-posterboard .eo-pb-event-title a {
	text-decoration: none;
	color: var(--wp--preset--color--primary);
}

.eo-posterboard .eo-pb-event-title a:hover {
	color: var(--wp--preset--color--accent);
}

.eo-posterboard .eo-pb-event-date,
.eo-posterboard .eo-pb-event-venue {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--tertiary);
	margin-bottom: 0.25rem;
}

.eo-posterboard .eo-pb-event-excerpt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--tertiary);
	margin-top: 0.5rem;
}

/* ===== SCROLL ANIMATIONS ===== */

.cnz-js .cnz-animate-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.cnz-js .cnz-animate-in.cnz-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.cnz-animate-in {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ===== 404 PAGE ===== */

.cnz-404__heading {
	font-size: clamp(3rem, 10vw, 6rem);
}

/* ===== DOCUMENT CARD ===== */

.cnz-document-card {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.cnz-document-card .wp-block-button__link {
	background-color: var(--wp--preset--color--accent) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.65rem 1.75rem;
	border: 2px solid var(--wp--preset--color--accent);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cnz-document-card .wp-block-button__link:hover {
	background-color: #006B35 !important;
	border-color: #006B35;
	color: #fff !important;
	outline: none;
}


/* ===== PRINT ===== */

@media print {
	body {
		font-size: 11pt;
		line-height: 1.5;
		color: #000;
		background: #fff;
	}

	.wp-block-navigation,
	.wp-block-buttons,
	footer,
	.cnz-event-card,
	.eo-fullcalendar,
	.cnz-single-event-map {
		display: none;
	}

	.wp-block-table th {
		background-color: #ccc !important;
		color: #000 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
		background-color: #f0f0f0 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.wp-block-post-content a[href]:after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #666;
	}

	h1, h2, h3 {
		page-break-after: avoid;
	}

	table, figure {
		page-break-inside: avoid;
	}
}
