/**
 * Single-event template.
 *
 * Tokens resolve to the header's values when pahls-header.css is on the page
 * and otherwise fall back to the THEME's palette (#004b2a / #cb9d18), which is
 * what the rest of the site is actually using today. The home blocks still
 * fall back to the header spec's #047835 — those two should be reconciled.
 */

.pm-ev-when,
.pm-ev-meta,
.pm-ev-reg,
.pm-ev-ics {
	--ev-green: var( --pm-green, var( --wp--preset--color--primary, #004b2a ) );
	--ev-gold: var( --pm-gold, var( --wp--preset--color--secondary, #cb9d18 ) );
	--ev-ink: var( --pm-ink, var( --wp--preset--color--foreground, #09090b ) );
	--ev-muted: var( --pm-muted, var( --wp--preset--color--muted-foreground, #71717a ) );
	--ev-line: var( --pm-line, var( --wp--preset--color--border, #e4e4e7 ) );
	--ev-paper: #fafaf9;
	--ev-r: 12px;
}

/* ------------------------------------------------------------ status/date */

.pm-ev-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 14px;
	padding: 6px 13px;
	border-radius: 999px;
	background: var( --ev-gold );
	color: #3d2f05;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.pm-ev-pill.is-live {
	background: var( --ev-green );
	color: #fff;
}

.pm-ev-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	animation: pm-ev-pulse 2s infinite;
}

@keyframes pm-ev-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

@media ( prefers-reduced-motion: reduce ) {
	.pm-ev-dot { animation: none; }
}

.pm-ev-dt {
	margin: 0 0 18px;
	padding: 16px 0;
	border-top: 1px solid var( --ev-line );
	border-bottom: 1px solid var( --ev-line );
}

.pm-ev-dt__k {
	margin-bottom: 5px;
	color: var( --ev-muted );
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.pm-ev-dt__v {
	color: var( --ev-ink );
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
}

.pm-ev-dt__s {
	margin-top: 3px;
	color: var( --ev-muted );
	font-size: 14px;
	font-weight: 500;
}

/* ----------------------------------------------------------------- chips */

.pm-ev-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 22px;
}

.pm-ev-chip {
	padding: 7px 14px;
	border: 1px solid var( --ev-line );
	border-radius: 999px;
	background: #fff;
	color: var( --ev-ink );
	font-size: 12.5px;
	font-weight: 600;
}

/* ---------------------------------------------------------- registration */

.pm-ev-reg {
	overflow: hidden;
	margin: 0 0 26px;
	border: 2px solid var( --ev-green );
	border-radius: var( --ev-r );
}

.pm-ev-reg__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 24px;
	background: var( --ev-green );
}

.pm-ev-reg__h {
	margin: 0;
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}

.pm-ev-reg__n {
	color: rgba( 255, 255, 255, 0.84 );
	font-size: 12.5px;
	font-weight: 600;
}

.pm-ev-reg__bd {
	padding: 24px;
	background: #fff;
}

.pm-ev-reg__bd .gform_wrapper {
	margin: 0;
}

/* ------------------------------------------------------- add to calendar */

.pm-ev-ics {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0 0 26px;
	padding: 16px 22px;
	border: 1px solid var( --ev-line );
	border-radius: var( --ev-r );
	background: var( --ev-paper );
}

.pm-ev-ics__t {
	margin-right: auto;
	color: var( --ev-ink );
	font-size: 13.5px;
	font-weight: 700;
}

.pm-ev-ics__b {
	padding: 9px 18px;
	border: 1px solid var( --ev-line );
	border-radius: 999px;
	background: #fff;
	color: var( --ev-green );
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.pm-ev-ics__b:hover {
	border-color: var( --ev-green );
}

/* ------------------------------------------------------------ side panel */

.pm-ev-search {
	display: flex;
	overflow: hidden;
	border: 1px solid var( --pm-line, #e4e4e7 );
	border-radius: 999px;
}

.pm-ev-search input {
	flex: 1;
	min-width: 0;
	padding: 10px 15px;
	border: 0;
	font-size: 13.5px;
}

.pm-ev-search input:focus {
	outline: 2px solid var( --wp--preset--color--primary, #004b2a );
	outline-offset: -2px;
}

.pm-ev-search button {
	padding: 0 18px;
	border: 0;
	background: var( --wp--preset--color--primary, #004b2a );
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

/* ------------------------------------------------------------------ hint */

.pm-ev-hint {
	margin: 12px 0;
	padding: 12px 16px;
	border: 1px dashed #d19b2c;
	border-radius: 8px;
	background: #fdf7e9;
	color: #6b4e08;
	font-size: 14px;
}

/* ---------------------------------------------- search field, one border
 *
 * The wrapper draws the pill. The input inside it was also drawing the
 * theme's own form border and radius, which is the second outline.
 */

.pm-ev-search input[type="search"] {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: 0;
}

.pm-ev-search input[type="search"]:focus,
.pm-ev-search input[type="search"]:focus-visible {
	border: 0;
	box-shadow: none;
	outline: 0;
}

.pm-ev-search:focus-within {
	border-color: var( --wp--preset--color--primary, #004b2a );
}

/* ---------------------------------------------------- search suggestions */

.pm-ev-searchwrap {
	position: relative;
}

.pm-ev-sugg {
	position: absolute;
	z-index: 30;
	top: calc( 100% + 6px );
	right: 0;
	left: 0;
	overflow: hidden;
	border: 1px solid var( --pm-line, #e4e4e7 );
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 4px rgba( 0, 0, 0, 0.05 ), 0 16px 40px rgba( 0, 0, 0, 0.12 );
}

.pm-ev-sugg__i {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 15px;
	border-bottom: 1px solid var( --pm-line, #e4e4e7 );
	color: inherit;
	text-decoration: none;
}

.pm-ev-sugg__i:last-child {
	border-bottom: 0;
}

.pm-ev-sugg__i:hover,
.pm-ev-sugg__i.is-on {
	background: #f6f7f6;
}

.pm-ev-sugg__t {
	color: var( --wp--preset--color--foreground, #09090b );
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
}

.pm-ev-sugg__d {
	flex: none;
	color: var( --wp--preset--color--muted-foreground, #71717a );
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

/* --------------------------------------------- upcoming widget date badge
 *
 * Class names taken from the widget's rendered output, not guessed. Month
 * above the day, as the widget already does it, in the green box from the
 * mockup.
 */

/*
 * Fixed square, aligned to the top of its row. min-height let the badge
 * stretch to whatever the title next to it needed, so a two-line title gave
 * a tall badge and a one-line title a short one.
 */
.tribe-events-widget-events-list__event-date-tag-datetime {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	flex: none;
	align-self: flex-start;
	padding: 6px 4px;
	border-radius: 10px;
	background: var( --pm-green, var( --wp--preset--color--primary, #004b2a ) );
}

/*
 * These two carry TEC's own typography classes — tribe-common-b3 and
 * tribe-common-h4 — and TEC colours them through `.tribe-common .tribe-common-h4`,
 * which is a two-class selector and was beating our one-class rule. The number
 * kept rendering in the theme's near-black on a dark green badge.
 */
.tribe-common .tribe-events-widget-events-list__event-date-tag-month,
.tribe-events-widget-events-list__event-date-tag-month {
	color: rgba( 255, 255, 255, 0.75 ) !important;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
}

.tribe-common .tribe-events-widget-events-list__event-date-tag-daynum,
.tribe-events-widget-events-list__event-date-tag-daynum {
	margin: 0;
	padding: 0;
	color: #fff !important;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.05;
}

.tribe-events-widget-events-list__event-date-tag {
	align-items: flex-start;
	padding-right: 12px;
}

/* ===========================================================================
 * The sidebar column — .pm-ev-aside on the template's right column.
 *
 * Three cards from three different sources: a legacy TEC widget, our search
 * block, and our campaign promo. Each arrived with its own idea of heading
 * size and its own trailing margin, which is why the boxes were tall, airy
 * and visibly inconsistent with one another. This is the reconciliation.
 * ======================================================================== */

.pm-ev-aside {
	--ev-green: var( --pm-green, var( --wp--preset--color--primary, #004b2a ) );
	--ev-gold: var( --pm-gold, var( --wp--preset--color--secondary, #cb9d18 ) );
	--ev-muted: var( --pm-muted, var( --wp--preset--color--muted-foreground, #71717a ) );
	--ev-line: var( --pm-line, var( --wp--preset--color--border, #e4e4e7 ) );
}

/* One heading size for all three cards, whoever rendered it. */
.pm-ev-aside h2,
.pm-ev-aside h3,
.pm-ev-aside h4,
.pm-ev-aside .tribe-events-widget-events-list__header-title,
.pm-ev-aside .pm-promo__h {
	margin: 0 0 14px;
	color: var( --ev-green );
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
}

/* Nothing adds space after the last thing in a card. */
.pm-ev-aside > .wp-block-group > *:last-child,
.pm-ev-aside .tribe-events-widget,
.pm-ev-aside .tribe-events-widget > *:last-child,
.pm-ev-aside .tribe-common > *:last-child {
	margin-bottom: 0;
}

/*
 * The widget shipped a tall empty well under "View Calendar" — its own
 * container padding plus the block wrapper's. Both go.
 */
.pm-ev-aside .tribe-events-widget,
.pm-ev-aside .tribe-common .tribe-events-widget-events-list {
	padding: 0;
	margin: 0;
}

.pm-ev-aside .tribe-events-widget-events-list__event-row {
	margin-bottom: 14px;
}

.pm-ev-aside .tribe-events-widget-events-list__event-row:last-of-type {
	margin-bottom: 0;
}

.pm-ev-aside .tribe-events-widget-events-list__view-more {
	margin-top: 14px;
	padding: 0;
}

/* ------------------------------------------------- the promo, un-boxed */

/*
 * campaign-promo draws its own bordered card, which is right on the home
 * page and wrong inside a card that is already a bordered box. In the
 * sidebar it becomes flat content and the outer card provides the frame.
 */
.pm-ev-aside .pm-promo {
	--pm-h-green: var( --ev-green );
	--pm-h-gold: var( --ev-gold );
	--pm-h-muted: var( --ev-muted );
	--pm-h-line: var( --ev-line );
	gap: 14px;
}

.pm-ev-aside .pm-promo__c {
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

.pm-ev-aside a.pm-promo__c:hover,
.pm-ev-aside a.pm-promo__c:focus-visible {
	border-color: transparent;
	box-shadow: none;
}

.pm-ev-aside a.pm-promo__c:hover .pm-promo__t,
.pm-ev-aside a.pm-promo__c:focus-visible .pm-promo__t {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pm-ev-aside .pm-promo__ph {
	margin-bottom: 14px;
	border-radius: 10px;
}

.pm-ev-aside .pm-promo__bd {
	padding: 0;
}

/* Matches the gold the rest of this page uses, not the header spec's. */
.pm-ev-aside .pm-promo__w {
	color: #8a6a12;
}

/* ----------------------------------------------------- the excerpt, as lede */

.pm-ev-sum {
	max-width: 46ch;
	margin: 0 0 18px;
	color: var( --pm-muted, var( --wp--preset--color--muted-foreground, #52525b ) );
	font-size: 17px;
	line-height: 1.55;
}

/* ------------------------------------------------- date badge, size locked */

/*
 * Same trap as the colours: TEC sizes these through two-class selectors, so a
 * one-class rule of ours set the width and lost the height — a two-line title
 * stretched its badge and a one-line title did not, which is why the November
 * box was half again as tall as the others.
 *
 * The parent row is a flex container; the badge must not stretch to fill it.
 */
.tribe-common .tribe-events-widget-events-list__event-date-tag,
.tribe-events-widget-events-list__event-date-tag {
	align-items: flex-start !important;
	align-self: flex-start !important;
	flex: none !important;
	padding-right: 12px;
}

.tribe-common .tribe-events-widget-events-list__event-date-tag-datetime,
.tribe-events-widget-events-list__event-date-tag-datetime {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: flex-start !important;
	flex: none !important;
	width: 56px !important;
	min-width: 56px !important;
	max-width: 56px !important;
	height: 56px !important;
	min-height: 56px !important;
	max-height: 56px !important;
	padding: 6px 4px !important;
	border-radius: 10px !important;
	box-sizing: border-box;
}

/* -------------------------------------------------- menu-events, in a panel */

.pm-menu-evs a {
	display: flex;
	align-items: baseline;
	gap: 10px;
	justify-content: space-between;
}

.pm-menu-evs__w {
	flex: none;
	color: var( --pm-muted, var( --wp--preset--color--muted-foreground, #71717a ) );
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.pm-menu-evs__w.is-live {
	color: #8a6a12;
	text-transform: uppercase;
	font-size: 10.5px;
	letter-spacing: 0.08em;
}

/* The panel's own link rule is two classes and wins on display, so the row
   needs matching specificity or the date runs straight into the title —
   "Fall FestivalON NOW". */
.pm-panel .pm-menu-evs li > a,
.pm-panel.pm-panel .pm-menu-evs li > a {
	display: flex;
	align-items: baseline;
	gap: 12px;
	justify-content: space-between;
}

.pm-panel .pm-menu-evs__w {
	margin-left: auto;
}

/* ------------------------------------------- the Events panel's own spacing */

/*
 * The first two columns are both auto-width link lists and sat too close to
 * read as separate things. A menu column gap wants to be wider than a page
 * one — there is no body copy to carry the eye across.
 */
.pm-panel--events .wp-block-columns {
	column-gap: 56px;
}


/* ------------------------------------------------------ tentative (3.11.0) */

/* Not gold: gold is "save the date", and this is the opposite of a date to save. */
.pm-ev-pill.is-tba {
	background: #eef1ee;
	color: #3f4a42;
	box-shadow: inset 0 0 0 1px #c9d3cb;
}

.pm-ev-when.is-tba .pm-ev-dt__v {
	font-style: italic;
}

.pm-ev-tba {
	font-style: italic;
}

/* ------------------------------------------------ event images (3.11.0) */

/*
 * A small featured image was being stretched to the column width and came out
 * soft. Images at least as wide as the column still fill it; smaller ones stay
 * at their own size, centred. Anything given an aspect ratio in the editor is
 * left alone, since that is a deliberate crop.
 */
.single-tribe_events .wp-block-post-featured-image img:not([style*="aspect-ratio"]),
.single-tribe_events .tribe-events-event-image img {
	width: auto;
	max-width: 100%;
	height: auto;
	margin-inline: auto;
}

.single-tribe_events .wp-block-post-featured-image:has(img:not([style*="aspect-ratio"])) {
	text-align: center;
}

/* ==========================================================================
 * 3.14.1 — the /events/ calendar (The Events Calendar's own list, month and
 * day views). Brand colour and type through TEC's custom properties, a visible
 * page heading, and event rows as cards.
 * ========================================================================== */
.tribe-common,
.tribe-events {
	--tec-font-family-sans-serif: Outfit, sans-serif;
	--tec-color-accent-primary: #004b2a;
	--tec-color-accent-primary-hover: #00361e;
	--tec-color-accent-primary-active: #00361e;
	--tec-color-accent-primary-background: rgba(0, 75, 42, 0.07);
	--tec-color-accent-secondary: #cb9d18;
	--tec-color-button-primary: #004b2a;
	--tec-color-button-primary-hover: #00361e;
	--tec-color-button-primary-active: #00361e;
	--tec-color-button-primary-background: rgba(0, 75, 42, 0.07);
	--tec-color-link-accent: #004b2a;
	--tec-color-link-accent-hover: rgba(0, 75, 42, 0.8);
	--tec-color-icon-active: #004b2a;
	--tec-color-background-events-bar-submit-button: #004b2a;
	--tec-color-background-events-bar-submit-button-hover: #00361e;
	--tec-color-background-events-bar-submit-button-active: #00361e;
	--tec-color-text-events-bar-submit-button: #fff;
}

.post-type-archive-tribe_events .tribe-events .tribe-events-l-container {
	padding-top: 40px;
	padding-bottom: 72px;
}

/* TEC hides its page heading; show it. */
.post-type-archive-tribe_events .tribe-events-header__content-title {
	display: block;
	width: 100%;
	margin: 0 0 6px;
}
.post-type-archive-tribe_events .tribe-events-header__content-title .tec-a11y-title-hidden,
.post-type-archive-tribe_events .tribe-events-header__content-title .tribe-events-header__content-title-text {
	position: static !important;
	clip: auto !important;
	-webkit-clip-path: none !important;
	clip-path: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	overflow: visible !important;
	white-space: normal !important;
	font-family: Outfit, sans-serif;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 600;
	line-height: 1.1;
	color: #004b2a;
}
.pm-ev-archive-intro {
	margin: 0 0 20px;
	max-width: 46rem;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: #3f3f46;
}

/* Search bar and view switch. */
.post-type-archive-tribe_events .tribe-events .tribe-events-header__events-bar {
	border: 1px solid #e4e4e7;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.post-type-archive-tribe_events .tribe-events .tribe-events-c-events-bar__search-container,
.post-type-archive-tribe_events .tribe-events .tribe-events-c-events-bar--border {
	border-color: transparent;
	border-radius: 14px;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-c-search__button,
.post-type-archive-tribe_events .tribe-events .tribe-events-c-subscribe-dropdown__button,
.post-type-archive-tribe_events .tribe-events .tribe-events-c-top-bar__today-button {
	border-radius: 999px;
	font-family: Outfit, sans-serif;
	font-weight: 600;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-c-search__button {
	margin-right: 8px;
	padding-left: 22px;
	padding-right: 22px;
}

/* Month heading between groups of events. */
.post-type-archive-tribe_events .tribe-common .tribe-events-calendar-list__month-separator-text,
.post-type-archive-tribe_events .tribe-events-calendar-list__month-separator-text {
	font-family: Outfit, sans-serif;
	font-weight: 600;
	color: #004b2a;
	letter-spacing: 0.01em;
}

/* Event rows as cards. TEC pulls each row 24px past the column on both sides
 * (its gutter grid); the card has to sit inside the column instead. */
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-row {
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 20px !important;
	padding: 22px 22px 22px 0;
	border: 1px solid #e4e4e7;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.post-type-archive-tribe_events .tribe-events-calendar-list__event-row:hover {
	border-color: #c9d6cf;
	box-shadow: 0 6px 20px rgba(0, 75, 42, 0.08);
}
.post-type-archive-tribe_events .tribe-events-calendar-list__event-row--featured {
	border-left: 4px solid #cb9d18;
}
.post-type-archive-tribe_events .tribe-events-calendar-list__event-date-tag-weekday {
	font-family: Outfit, sans-serif;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8a6a0c;
}
.post-type-archive-tribe_events .tribe-common .tribe-events-calendar-list__event-date-tag-daynum,
.post-type-archive-tribe_events .tribe-events-calendar-list__event-date-tag-daynum {
	font-family: Outfit, sans-serif;
	font-weight: 700;
	color: #004b2a;
}
.post-type-archive-tribe_events .tribe-events-calendar-list__event-featured-image {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 12px;
}
.post-type-archive-tribe_events .tribe-common .tribe-events-calendar-list__event-title,
.post-type-archive-tribe_events .tribe-events-calendar-list__event-title {
	font-family: Outfit, sans-serif;
	font-weight: 600;
	line-height: 1.2;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-title-link,
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-title-link:visited {
	color: #004b2a;
	border-bottom: 0;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-title-link:hover,
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-title-link:focus {
	color: #00361e;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.post-type-archive-tribe_events .tribe-events-calendar-list__event-datetime-wrapper {
	margin-bottom: 6px;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-datetime {
	font-family: Outfit, sans-serif;
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8a6a0c;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-venue {
	color: #52525b;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-description {
	color: #3f3f46;
	line-height: 1.55;
}

/* "No events" notice. */
.post-type-archive-tribe_events .tribe-events .tribe-events-c-messages__message {
	border-radius: 14px;
	background: #f4f7f5;
	color: #004b2a;
}

/* Month view: softer grid, rounded outer edge. */
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-month {
	border-radius: 14px;
	overflow: hidden;
}
.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-month__calendar-event-title-link {
	color: #004b2a;
}

@media (max-width: 767px) {
	.post-type-archive-tribe_events .tribe-events .tribe-events-l-container {
		padding-top: 24px;
		padding-bottom: 48px;
	}
	.post-type-archive-tribe_events .tribe-events .tribe-events-calendar-list__event-row {
		padding: 16px 14px 16px 0;
		border-radius: 14px;
	}
}
