/**
 * TMC Event Widgets — frontend CSS.
 *
 * Shared stylesheet for the Calendar, Grid, and Hybrid widgets.
 * Style variants live under modifier classes (e.g. `.tmc-event-calendar--classic`)
 * set by Elementor's `prefix_class` pattern.
 */

/* ────────────────────────────────────────────────────────────────────
 * Calendar — base (Classic)
 * ─────────────────────────────────────────────────────────────────── */

.tmc-event-calendar {
	--tmc-cal-border: #dcdcde;
	--tmc-cal-bg: #fff;
	--tmc-cal-muted: #646970;
	--tmc-cal-today-bg: #2271b1;
	--tmc-cal-today-fg: #fff;
	--tmc-cal-hover: rgba( 34, 113, 177, 0.05 );
	--tmc-cal-chip-bg: rgba( 34, 113, 177, 0.08 );
	--tmc-cal-chip-fg: #1d2327;
	font-size: 14px;
	line-height: 1.4;
}

.tmc-event-calendar.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.tmc-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 12px;
	gap: 12px;
}
.tmc-cal__title {
	margin: 0;
	font-size: 1.4em;
	font-weight: 600;
	text-align: center;
	flex: 1;
}

/* Two-class specificity beats theme `button[type="button"]` rules on
   specificity alone (0,2,0 > 0,1,1), so Global-Colour CSS variables
   picked by users (which Elementor emits *without* `!important`) can
   still override our baseline. `box-sizing` / `padding` / `min-width`
   still use `!important` because theme-painted button padding would
   otherwise stretch our square arrows into ovals. */
.tmc-event-calendar .tmc-cal__nav {
	box-sizing: border-box !important;
	padding: 0 !important;
	min-width: 0 !important;
	background: transparent;
	border: 1px solid var( --tmc-cal-border );
	border-radius: 4px;
	width: 36px; height: 36px;
	cursor: pointer;
	font-size: 16px;
	color: var( --tmc-cal-muted );
	line-height: 1;
	display: flex; align-items: center; justify-content: center;
	transition: background 0.15s;
}
.tmc-cal__nav:hover, .tmc-cal__nav:focus {
	background: var( --tmc-cal-hover );
}
/* Mouse clicks get no outline; keyboard focus gets a ring in the icon colour
   (it used to be `outline: none` with only the 5% hover tint, which can't be
   seen; border audit, Oct 2026). Two classes so a theme's `[type=button]:focus`
   outline can't win. The colour is the widget's "Keyboard focus outline". */
.tmc-event-calendar .tmc-cal__nav:focus:not( :focus-visible ) {
	outline: none;
}
.tmc-event-calendar .tmc-cal__nav:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Every grid line reads the same three variables: colour, style and weight
   (the Day cells "Grid lines" controls). The fallbacks are the old 1px solid,
   so a calendar nobody styled is unchanged. */
.tmc-cal__grid {
	display: grid;
	grid-template-rows: auto 1fr;
	border: var( --tmc-cal-border-w, 1px ) var( --tmc-cal-border-s, solid ) var( --tmc-cal-border );
	border-radius: 6px;
	overflow: hidden;
	background: var( --tmc-cal-bg );
}

.tmc-cal__dow-row {
	display: grid;
	/* minmax( 0, 1fr ), never a bare 1fr. A bare `1fr` is `minmax( auto, 1fr )`,
	   so the track refuses to shrink below its content's min-content width — and
	   grid items default to `min-width: auto`, which propagates that up from the
	   event chips. Measured on a 600px calendar: the header row sat at a perfect
	   7x85.4px while the day columns came out 62.5 / 62.5 / 62.5 / 62.5 / 146.2 /
	   62.5 / 139.4, so the two columns holding chips were more than twice the
	   width of the rest and every weekday below the header pointed at the wrong
	   column. The header staying correct is what makes it obvious. */
	grid-template-columns: repeat( 7, minmax( 0, 1fr ) );
	background: #f6f7f7;
	border-bottom: var( --tmc-cal-border-w, 1px ) var( --tmc-cal-border-s, solid ) var( --tmc-cal-border );
}
.tmc-cal__dow {
	min-width: 0;
	overflow: hidden;
	padding: 8px 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var( --tmc-cal-muted );
	text-align: center;
}

.tmc-cal__days {
	display: grid;
	/* Must match .tmc-cal__dow-row exactly — see the note there. */
	grid-template-columns: repeat( 7, minmax( 0, 1fr ) );
	grid-auto-rows: minmax( 90px, auto );
}

.tmc-cal__day {
	border-right: var( --tmc-cal-border-w, 1px ) var( --tmc-cal-border-s, solid ) var( --tmc-cal-border );
	border-bottom: var( --tmc-cal-border-w, 1px ) var( --tmc-cal-border-s, solid ) var( --tmc-cal-border );
	padding: 6px 8px 8px;
	/* Grid items default to min-width:auto; without this the chips inside set a
	   floor on the column and the 1fr above cannot do its job. */
	min-width: 0;
	min-height: 90px;
	position: relative;
	display: flex; flex-direction: column; gap: 4px;
	background: var( --tmc-cal-bg );
}
.tmc-cal__day:nth-child( 7n ) { border-right: none; }
.tmc-cal__day--blank {
	background: #fafbfc;
	cursor: default;
}
.tmc-cal__day--has-event {
	cursor: pointer;
	transition: background 0.12s;
}
.tmc-cal__day--has-event:hover,
.tmc-cal__day--has-event:focus-visible {
	background: var( --tmc-cal-hover );
}
/* The tint alone was the only sign of keyboard focus and is too faint to see
   (border audit, Oct 2026). The ring sits INSIDE the cell: the grid clips its
   edges and the next cell paints over anything outside. */
.tmc-cal__day--has-event:focus:not( :focus-visible ) {
	outline: none;
}
.tmc-cal__day--has-event:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.tmc-cal__day-num {
	font-size: 12px;
	font-weight: 600;
	color: var( --tmc-cal-muted );
	line-height: 1;
}

.tmc-cal__day--today {
	background: var( --tmc-cal-today-bg );
	color: var( --tmc-cal-today-fg );
}
.tmc-cal__day--today .tmc-cal__day-num {
	color: var( --tmc-cal-today-fg );
}
.tmc-cal__day--today .tmc-cal__chip,
.tmc-cal__day--today .tmc-cal__more {
	background: rgba( 255, 255, 255, 0.2 );
	color: var( --tmc-cal-today-fg );
}
.tmc-cal__day--today .tmc-cal__dot {
	background: var( --tmc-cal-today-fg );
}

.tmc-cal__day-events {
	display: flex; flex-direction: column; gap: 2px;
	min-width: 0;
}
.tmc-cal__chip {
	display: flex; align-items: flex-start; gap: 4px;
	/* Flex items default to min-width:auto too, so the ellipsis on the title
	   below only works once the chip itself is allowed to shrink. */
	min-width: 0;
	padding: 2px 6px;
	background: var( --tmc-cal-chip-bg );
	color: var( --tmc-cal-chip-fg );
	border-radius: 3px;
	font-size: 11px;
	line-height: 1.3;
	overflow: hidden;
}
.tmc-cal__chip-title {
	min-width: 0;
	overflow: hidden;
	/* One line, ellipsised, unless the operator raises the clamp. `nowrap` used
	   to do this, but it makes the title's min-content the WHOLE string, which
	   is what let a long title widen its column. line-clamp lets the text wrap,
	   so min-content is only the longest word — and overflow-wrap handles even
	   that. At 1 the rendered result is identical to the old behaviour. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var( --tmc-cal-chip-lines, 1 );
	line-clamp: var( --tmc-cal-chip-lines, 1 );
	overflow-wrap: anywhere;
}
.tmc-cal__dot {
	width: 6px; height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
	background: currentColor;
	/* Optically centred on the FIRST line rather than on the whole chip, so a
	   two- or three-line title does not push the dot into the middle of the
	   block. Matches the single-line position exactly when the clamp is 1. */
	margin-top: calc( ( 1.3em - 6px ) / 2 );
}
.tmc-cal__more {
	font-size: 10px;
	color: var( --tmc-cal-muted );
	padding: 2px 6px;
}

/* ── Inline preview panel ─────────────────────────────────────────── */

.tmc-cal__preview {
	margin-top: 16px;
	padding: 16px 20px;
	background: var( --tmc-cal-bg );
	border: 1px solid var( --tmc-cal-border );
	border-radius: 6px;
}
.tmc-cal__preview-head {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 12px;
}
.tmc-cal__preview-date {
	margin: 0;
	font-size: 1.15em;
}
.tmc-cal__preview-close {
	background: none; border: none; cursor: pointer;
	font-size: 24px; line-height: 1;
	color: var( --tmc-cal-muted );
	width: 32px; height: 32px;
}
.tmc-cal__preview-list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-direction: column; gap: 12px;
}
.tmc-cal__preview-item {
	display: grid;
	grid-template-columns: 100px minmax( 0, 1fr );
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var( --tmc-cal-border );
}
.tmc-cal__preview-item:last-child { border-bottom: none; padding-bottom: 0; }
/* "Line between events" switched off (the class is added in render). */
.tmc-cal__preview--no-divider .tmc-cal__preview-item { border-bottom: none; }
.tmc-cal__preview-thumb img {
	width: 100%; height: auto; aspect-ratio: 1 / 1;
	object-fit: cover; border-radius: 4px;
}
.tmc-cal__preview-thumb + .tmc-cal__preview-body { grid-column: 2; }
.tmc-cal__preview-item:not( :has( .tmc-cal__preview-thumb ) ) {
	grid-template-columns: 1fr;
}
.tmc-cal__preview-title {
	margin: 0 0 4px;
	font-size: 1em;
}
.tmc-cal__preview-when {
	font-size: 12px;
	color: var( --tmc-cal-muted );
	margin-bottom: 2px;
}
.tmc-cal__preview-venue {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 4px;
}
.tmc-cal__preview-excerpt {
	margin: 0;
	font-size: 13px;
	color: var( --tmc-cal-muted );
}
.tmc-cal__preview-empty,
.tmc-cal__preview-loading,
.tmc-cal__preview-error {
	margin: 0;
	text-align: center;
	color: var( --tmc-cal-muted );
	padding: 12px 0;
}

/* ────────────────────────────────────────────────────────────────────
 * Calendar — Mini variant
 *
 * Sidebar-friendly compact style. Shrinks day cells to a uniform grid
 * of ~48px squares and replaces text chips with coloured dots. The
 * expanded preview panel below the grid (if enabled) still shows the
 * full event details, so information density stays high without
 * visual noise in the grid itself.
 * ─────────────────────────────────────────────────────────────────── */

.tmc-event-calendar--mini {
	font-size: 12px;
	max-width: 360px;
}
.tmc-event-calendar--mini .tmc-cal__title    { font-size: 1.1em; }
.tmc-event-calendar--mini .tmc-cal__nav      { width: 28px; height: 28px; font-size: 13px; }
.tmc-event-calendar--mini .tmc-cal__dow      { padding: 4px 2px; font-size: 10px; }
.tmc-event-calendar--mini .tmc-cal__days     { grid-auto-rows: minmax( 48px, auto ); }
.tmc-event-calendar--mini .tmc-cal__day      { min-height: 48px; padding: 4px 4px 6px; }
.tmc-event-calendar--mini .tmc-cal__day-num  { font-size: 11px; }

/* Replace chips with a neat row of dots at the bottom of each day. */
.tmc-event-calendar--mini .tmc-cal__day-events {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 3px;
	margin-top: auto;
}
.tmc-event-calendar--mini .tmc-cal__chip {
	padding: 0;
	background: transparent;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var( --chip-color, var( --tmc-cal-today-bg ) );
}
.tmc-event-calendar--mini .tmc-cal__chip-title,
.tmc-event-calendar--mini .tmc-cal__chip > .tmc-cal__dot {
	display: none;
}
.tmc-event-calendar--mini .tmc-cal__more {
	font-size: 9px;
	padding: 0;
	line-height: 1;
	align-self: center;
}

/* ────────────────────────────────────────────────────────────────────
 * Calendar — Color-coded variant
 *
 * Classic layout but every chip gets a per-category coloured
 * background. The colour is supplied inline as a CSS custom property
 * (`--chip-color`) from the server/REST response, with a stable HSL
 * fallback derived from the category slug if nothing is configured.
 * ─────────────────────────────────────────────────────────────────── */

.tmc-event-calendar--color .tmc-cal__chip {
	background: var( --chip-color, var( --tmc-cal-chip-bg ) );
	color: #fff;
}
.tmc-event-calendar--color .tmc-cal__dot {
	background: rgba( 255, 255, 255, 0.9 );
}
.tmc-event-calendar--color .tmc-cal__day--today .tmc-cal__chip {
	/* On today's highlighted cell, chips need a little more contrast. The
	   colour is the Event chips "Outline on today's chips" control. */
	box-shadow: 0 0 0 1px var( --tmc-cal-today-ring, rgba( 255, 255, 255, 0.4 ) );
}

/* ────────────────────────────────────────────────────────────────────
 * Upcoming Events — list widget.
 *
 * Four distinct LIST styles (intentionally not cards — the Event Grid
 * widget owns card layouts). All four variants share one markup shape
 * (`<ul class="tmc-upcoming-events"><li class="tmc-upcoming-event">`)
 * and are differentiated by the modifier class on the <ul>.
 *
 *   --default   Stacked rows: title, date/time, venue, optional excerpt.
 *               Zero chrome. Original pre-1.17.2 appearance.
 *
 *   --compact   One line per event: "Apr 24 · Title · Venue".
 *               Excerpt hidden. Highest information density.
 *
 *   --divided   Stacked rows with a horizontal rule between each event.
 *               No card background / shadow — just the divider.
 *
 *   --date-tab  Small coloured month/day tab on the left, stacked title
 *               + meta on the right. Calendar-entry feel.
 * ─────────────────────────────────────────────────────────────────── */

.tmc-upcoming-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.tmc-upcoming-event {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tmc-upcoming-event__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.tmc-upcoming-event__title {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
}
.tmc-upcoming-event__title a {
	color: inherit;
	text-decoration: none;
}
.tmc-upcoming-event__title a:hover,
.tmc-upcoming-event__title a:focus {
	text-decoration: underline;
}

.tmc-upcoming-event__meta {
	font-size: 13px;
	color: #646970;
}
.tmc-upcoming-event__when {
	font-weight: 600;
	color: #1d2327;
}
.tmc-upcoming-event__venue {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.tmc-upcoming-event__venue-icon {
	opacity: 0.75;
	flex-shrink: 0;
}
/* The [tmc_events] shortcode's venue pin (no icon font outside Elementor).
   Sized to the text like a Font Awesome glyph; the SVG's own width/height
   attributes hold the box before this loads. */
.tmc-events-inline-icon {
	display: inline-block;
	width: 0.75em;
	height: 1em;
	vertical-align: -0.125em;
}
.tmc-upcoming-event__excerpt {
	margin: 4px 0 0;
	font-size: 14px;
	color: #3c434a;
	line-height: 1.5;
}
.tmc-upcoming-events__empty {
	margin: 0;
	padding: 16px 0;
	color: #646970;
}

/* ── Variant: Compact (one line per event) ────────────────────────── */

.tmc-upcoming-events--compact {
	gap: 8px;
}
.tmc-upcoming-events--compact .tmc-upcoming-event {
	flex-direction: row;
	align-items: baseline;
	gap: 10px;
	padding: 4px 0;
}
.tmc-upcoming-events--compact .tmc-upcoming-event__body {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}
.tmc-upcoming-events--compact .tmc-upcoming-event__title {
	font-size: 1em;
	font-weight: 600;
	line-height: 1.35;
	flex: 0 1 auto;
	/* Let title wrap gracefully when the row is too narrow for date + title + venue */
	white-space: normal;
}
.tmc-upcoming-events--compact .tmc-upcoming-event__meta {
	font-size: 0.9em;
	color: #646970;
	/* Prepend a subtle dot separator between title and meta */
}

/* ── Variant: Divided (stacked rows with a horizontal rule) ───────── */

.tmc-upcoming-events--divided {
	gap: 0;
}
.tmc-upcoming-events--divided .tmc-upcoming-event {
	padding: 14px 0;
	border-bottom: 1px solid #e4e4e7;
}
.tmc-upcoming-events--divided .tmc-upcoming-event:first-child {
	padding-top: 0;
}
.tmc-upcoming-events--divided .tmc-upcoming-event:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

/* ── Variant: Date tab (left-aligned coloured date block) ─────────── */

.tmc-upcoming-events--date-tab {
	gap: 0;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event {
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #e4e4e7;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event:first-child {
	padding-top: 0;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event:last-child {
	padding-bottom: 0;
	border-bottom: none;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event__date {
	flex: 0 0 60px;
	padding: 8px 6px;
	background: #2271b1;
	color: #fff;
	border-radius: 6px;
	text-align: center;
	line-height: 1.1;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event__month {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	opacity: 0.85;
}
.tmc-upcoming-events--date-tab .tmc-upcoming-event__day {
	display: block;
	font-size: 22px;
	font-weight: 700;
	margin-top: 2px;
}

/* ── Variant: Photo (thumbnail on the left) ───────────────────────── */

.tmc-upcoming-events--photo {
	gap: 0;
}
.tmc-upcoming-events--photo .tmc-upcoming-event {
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #e4e4e7;
}
.tmc-upcoming-events--photo .tmc-upcoming-event:first-child {
	padding-top: 0;
}
.tmc-upcoming-events--photo .tmc-upcoming-event:last-child {
	padding-bottom: 0;
	border-bottom: none;
}
.tmc-upcoming-events--photo .tmc-upcoming-event__thumb {
	flex: 0 0 96px;
	aspect-ratio: 1 / 1;        /* default; overridden by data-ratio attribute */
	background: #f6f7f7;
	border-radius: 6px;
	overflow: hidden;
	display: block;
	position: relative;
	text-decoration: none;
}
/* Aspect-ratio overrides driven by the `photo_ratio` control. Note the
   descendant form: the control's selectors target the `data-ratio` attr
   which is emitted on every <a class="__thumb"> element. */
.tmc-upcoming-events--photo .tmc-upcoming-event__thumb[data-ratio="4-3"]  { aspect-ratio: 4 / 3; }
.tmc-upcoming-events--photo .tmc-upcoming-event__thumb[data-ratio="16-9"] { aspect-ratio: 16 / 9; }
.tmc-upcoming-events--photo .tmc-upcoming-event__thumb[data-ratio="3-4"]  { aspect-ratio: 3 / 4; }

.tmc-upcoming-events--photo .tmc-upcoming-event__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}
.tmc-upcoming-events--photo .tmc-upcoming-event__thumb-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba( 0, 0, 0, 0.04 ) 0%,
		rgba( 0, 0, 0, 0.1 ) 100%
	);
}

/* ────────────────────────────────────────────────────────────────────
 * Event Grid — shared base
 *
 * Card grid using CSS `grid` with a column count driven by the Elementor
 * `columns` control via the `--tmc-grid-cols` custom property. Variants
 * (Classic stacked / Side horizontal / b4's Minimal + Date-forward) are
 * applied by modifier classes on `.tmc-event-grid--<variant>` via
 * prefix_class and swap the card layout without duplicating the grid.
 * ─────────────────────────────────────────────────────────────────── */

.tmc-event-grid {
	--tmc-grid-cols: 3;
	display: grid;
	grid-template-columns: repeat( var( --tmc-grid-cols ), minmax( 0, 1fr ) );
	gap: 20px;
}
.tmc-event-grid__empty {
	margin: 0;
	padding: 24px;
	text-align: center;
	color: #646970;
	border: 1px dashed #dcdcde;
	border-radius: 6px;
	background: #f6f7f7;
}

.tmc-event-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	overflow: hidden;
	min-width: 0;          /* prevents long titles from blowing out the grid column */
	transition: box-shadow 0.15s, transform 0.15s;
}
/* No lift unless the widget's "Lift on hover" switch writes one into the
   variable: a moving card moves what the visitor is reading (Oct 2026). The
   shadow has the Hover shadow control. */
.tmc-event-card:hover,
.tmc-event-card:focus-within {
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.08 );
	transform: var( --tmc-event-card-lift, none );
}

.tmc-event-card__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background: #f6f7f7;
	overflow: hidden;
}
.tmc-event-card__thumb-img,
.tmc-event-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.tmc-event-card__thumb-placeholder {
	background: linear-gradient(
		135deg,
		rgba( 0, 0, 0, 0.04 ) 0%,
		rgba( 0, 0, 0, 0.08 ) 100%
	);
}

.tmc-event-card__date-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	min-width: 48px;
	padding: 4px 8px;
	background: #fff;
	color: #1d2327;
	border-radius: 6px;
	text-align: center;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.15 );
	line-height: 1.1;
	/* Classic hides the badge; Side / Date-forward variants opt in. */
	display: none;
}
.tmc-event-card__date-badge-month {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var( --card-accent, #2271b1 );
}
.tmc-event-card__date-badge-day {
	display: block;
	font-size: 20px;
	font-weight: 700;
}

.tmc-event-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.tmc-event-card__cat-chip {
	display: inline-block;
	align-self: flex-start;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var( --card-accent, #2271b1 );
	color: #fff;
	border-radius: 999px;
	line-height: 1.4;
}

.tmc-event-card__title {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
}
.tmc-event-card__title a {
	color: inherit;
	text-decoration: none;
}
.tmc-event-card__title a:hover,
.tmc-event-card__title a:focus {
	text-decoration: underline;
}

.tmc-event-card__meta {
	font-size: 13px;
	color: #646970;
}
.tmc-event-card__when {
	font-weight: 600;
	color: #1d2327;
}
.tmc-event-card__venue .tmc-event-card__venue-icon {
	margin-right: 6px;
	opacity: 0.7;
	color: var( --card-accent, currentColor );
}

.tmc-event-card__excerpt {
	margin: 4px 0 0;
	font-size: 14px;
	color: #3c434a;
	line-height: 1.5;
}

.tmc-event-card__footer {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border-top: 1px solid rgba( 0, 0, 0, 0.05 );
}
/* Card "Line above cost and button" switched off (class added in render). */
.tmc-event-grid--no-footer-divider .tmc-event-card__footer {
	border-top: none;
}
.tmc-event-card__cost {
	font-weight: 600;
	color: var( --card-accent, #1d2327 );
}
.tmc-event-card__button {
	display: inline-block;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	background: var( --card-accent, #2271b1 );
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	transition: opacity 0.12s;
}
/* Variable for the widget's "Fade on hover" switch (widget stylesheet
   coverage, Oct 2026): a set hover background showed 10% see-through. */
.tmc-event-card__button:hover,
.tmc-event-card__button:focus {
	opacity: var( --tmc-event-button-fade, 0.9 );
	color: #fff;
}

/* ── Variant: Classic (stacked) ───────────────────────────────────── */

.tmc-event-grid--classic .tmc-event-card {
	/* default layout — nothing to override */
}

/* ── Variant: Side (thumbnail on the left) ────────────────────────── */

.tmc-event-grid--side .tmc-event-card {
	flex-direction: row;
	align-items: stretch;        /* force children (thumb + body) to same height */
}
.tmc-event-grid--side .tmc-event-card__thumb {
	flex: 0 0 40%;
	aspect-ratio: auto;           /* let the card's body height dictate thumb height */
	align-self: stretch;          /* fill card row vertically */
	min-height: 160px;
}
/* Image must cover the entire thumb area regardless of its native ratio. */
.tmc-event-grid--side .tmc-event-card__thumb-img,
.tmc-event-grid--side .tmc-event-card__thumb-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}
.tmc-event-grid--side .tmc-event-card__date-badge {
	display: block;               /* Side opts in to the corner badge */
}
.tmc-event-grid--side .tmc-event-card__body {
	padding: 14px 16px;
}
/* Narrow columns: collapse to stacked so content stays readable. */
@media ( max-width: 720px ) {
	.tmc-event-grid--side .tmc-event-card { flex-direction: column; }
	.tmc-event-grid--side .tmc-event-card__thumb {
		flex: 0 0 auto;
		aspect-ratio: 16 / 9;
		min-height: 0;
	}
}

/* ── Variant: Minimal (text-only, borderless) ─────────────────────── */

.tmc-event-grid--minimal .tmc-event-card {
	background: transparent;
	border: none;
	border-radius: 0;
	border-bottom: 1px solid #e4e4e7;
	padding: 0;
	transition: none;
}
/* Card "Divider" switched off (class added in render, Minimal only). Same
   0-2-0 as the rule above and after it, so it wins by order and the widget's
   own Border and Divider controls still outrank it. */
.tmc-event-grid--no-divider .tmc-event-card {
	border-bottom: none;
}
.tmc-event-grid--minimal .tmc-event-card:hover,
.tmc-event-grid--minimal .tmc-event-card:focus-within {
	box-shadow: none;
	transform: none;
}
.tmc-event-grid--minimal .tmc-event-card__thumb {
	display: none;             /* minimal = no images */
}
.tmc-event-grid--minimal .tmc-event-card__body {
	padding: 12px 0 16px;
}
.tmc-event-grid--minimal .tmc-event-card__title {
	font-size: 1.05em;
}
.tmc-event-grid--minimal .tmc-event-card__cat-chip {
	background: transparent;
	color: var( --card-accent, #646970 );
	padding: 0;
	letter-spacing: 0.08em;
}
.tmc-event-grid--minimal .tmc-event-card__footer {
	border-top: none;
	padding-top: 4px;
}

/* ── Dedicated date panel (Date-forward variant) ──────────────────── */

/* The date panel is always output in the card markup but only visible in
   Date-forward. Decoupled from the thumbnail so toggling "show thumbnail"
   doesn't break the layout. Classic / Side / Minimal all hide it. */
.tmc-event-card__date-panel { display: none; }

/* ── Variant: Date-forward (big left-side date, meta on right) ────── */

.tmc-event-grid--date-forward .tmc-event-card {
	flex-direction: row;
	align-items: stretch;
	background: #fff;
}
.tmc-event-grid--date-forward .tmc-event-card__thumb {
	display: none;             /* date panel replaces thumbnail */
}
.tmc-event-grid--date-forward .tmc-event-card__body {
	padding: 16px 18px;
	flex: 1;
}
.tmc-event-grid--date-forward .tmc-event-card__date-panel {
	display: flex;
	flex: 0 0 92px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px 8px;
	background: linear-gradient(
		135deg,
		var( --card-accent, #2271b1 ) 0%,
		rgba( 0, 0, 0, 0.12 ) 180%
	);
	color: #fff;
	text-decoration: none;
}
.tmc-event-grid--date-forward .tmc-event-card__date-panel-month {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: rgba( 255, 255, 255, 0.85 );
}
.tmc-event-grid--date-forward .tmc-event-card__date-panel-day {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}
.tmc-event-grid--date-forward .tmc-event-card__title {
	font-size: 1.1em;
}
@media ( max-width: 540px ) {
	.tmc-event-grid--date-forward .tmc-event-card__date-panel { flex: 0 0 72px; }
	.tmc-event-grid--date-forward .tmc-event-card__date-panel-day { font-size: 26px; }
}

/* Responsive column cap: never more than 2 columns on phones, 1 on narrow. */
@media ( max-width: 900px ) {
	.tmc-event-grid {
		grid-template-columns: repeat( min( var( --tmc-grid-cols ), 2 ), minmax( 0, 1fr ) );
	}
}
@media ( max-width: 560px ) {
	.tmc-event-grid { grid-template-columns: 1fr; }
}

/* ────────────────────────────────────────────────────────────────────
 * Event Hybrid — calendar on one side, filtered list on the other.
 *
 * Variants:
 *   - Split   (default) — 50/50 calendar + list
 *   - Sidebar          — narrower calendar, wider list panel
 *
 * Both variants collapse to a single column on narrow screens so the
 * two panels stack vertically without overlap.
 * ─────────────────────────────────────────────────────────────────── */

.tmc-event-hybrid {
	display: grid;
	gap: 24px;
}

.tmc-event-hybrid__calendar {
	min-width: 0;
}

.tmc-event-hybrid__list {
	min-width: 0;
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.tmc-event-hybrid__list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.tmc-event-hybrid__list-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: 600;
}
/* Two-class scoping keeps the trigger free of theme button styling
   without `!important` baselines, so Elementor overrides (including
   Global Colour variables) still win. */
.tmc-event-hybrid .tmc-event-hybrid__clear {
	background: transparent;
	border: none;
	color: #2271b1;
	cursor: pointer;
	font-size: 13px;
	padding: 2px 6px;
}
.tmc-event-hybrid__clear:hover { text-decoration: underline; }
/* Themes frequently apply `display: inline-block` to all `button` elements,
   which defeats the native `[hidden]` attribute. Force hidden with a more
   specific rule so our server-rendered state stays hidden until JS unhides it. */
.tmc-event-hybrid__clear[hidden] {
	display: none !important;
}

.tmc-event-hybrid__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.tmc-event-hybrid__item {
	display: grid;
	grid-template-columns: 64px minmax( 0, 1fr );
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.05 );
}
.tmc-event-hybrid__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}
/* List items "Line between events" switched off (class added in render). */
.tmc-event-hybrid__list--no-divider .tmc-event-hybrid__item {
	border-bottom: none;
}
.tmc-event-hybrid__item:not( :has( .tmc-event-hybrid__item-thumb ) ) {
	grid-template-columns: 1fr;
}
.tmc-event-hybrid__item-thumb img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 4px;
	border-left: 3px solid var( --card-accent, transparent );
}
/* "Category stripe on thumbnails" switched off (class added in render). */
.tmc-event-hybrid__list--no-thumb-accent .tmc-event-hybrid__item-thumb img {
	border-left: none;
}
.tmc-event-hybrid__item-title {
	margin: 0 0 2px;
	font-size: 0.98em;
	line-height: 1.35;
}
.tmc-event-hybrid__item-title a {
	color: inherit;
	text-decoration: none;
}
.tmc-event-hybrid__item-title a:hover { text-decoration: underline; }
.tmc-event-hybrid__item-when {
	font-size: 12px;
	color: #646970;
	font-weight: 600;
}
.tmc-event-hybrid__item-venue {
	font-size: 12px;
	color: #646970;
}
.tmc-event-hybrid__empty {
	margin: 0;
	padding: 16px 0;
	color: #646970;
	text-align: center;
}

/* The variant class is rendered onto the grid element itself. It used to come
   from Elementor's `prefix_class`, which lands on the OUTER widget wrapper and
   forced descendant selectors; the layout dropdown is gone now (a narrow
   Calendar width says the same thing more directly), so the class is written in
   render() and only survives to keep widgets saved as `sidebar` looking the
   way they did. Both forms are matched so a page rendered by an older build,
   or custom CSS written against the wrapper, still works. */

/* ── Split: even by default, adjustable by Calendar width ────────── */

.tmc-event-hybrid--split.tmc-event-hybrid,
.tmc-event-hybrid--split .tmc-event-hybrid {
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr );
}

/* ── Sidebar: legacy. Kept so saved widgets do not jump ───────────── */

.tmc-event-hybrid--sidebar.tmc-event-hybrid,
.tmc-event-hybrid--sidebar .tmc-event-hybrid {
	/* Reads the same variable, so Calendar width is not dead on these.
	   340px, not a round 320: the old rule was minmax( 260px, 340px ), which
	   resolves to 340 at any container wide enough to matter. Rounding it
	   quietly narrowed every saved sidebar widget by 20px. */
	grid-template-columns: minmax( 0, var( --tmc-hybrid-cal-width, 340px ) ) minmax( 0, 1fr );
}
.tmc-event-hybrid--sidebar.tmc-event-hybrid .tmc-event-hybrid__calendar,
.tmc-event-hybrid--sidebar .tmc-event-hybrid__calendar {
	font-size: 12px;
}

/* Operator-set calendar width, with the list taking the remainder.
 *
 * Deliberately driven by a custom property rather than by Elementor writing
 * `grid-template-columns` straight onto the wrapper. Elementor emits a desktop
 * value with NO media query and a selector specific enough to beat the stacking
 * rule below, so a 70% desktop split would have kept two columns on a phone.
 * Feeding a variable into a rule that lives inside this min-width block keeps
 * the breakpoint decision here, next to the stacking rule it has to agree with.
 *
 * Unset falls back to 1fr, which is exactly the previous even split — so
 * existing widgets render identically until someone moves the slider. Note that
 * a set percentage is measured against the container, so the list receives the
 * remainder MINUS the gap; 1fr splits the space after the gap. That is why the
 * default is left unset rather than pinned to 50%. */
@media ( min-width: 781px ) {
	.tmc-event-hybrid--split.tmc-event-hybrid,
	.tmc-event-hybrid--split .tmc-event-hybrid {
		grid-template-columns:
			minmax( 0, var( --tmc-hybrid-cal-width, 1fr ) )
			minmax( 0, 1fr );
	}
}

/* Stack the two panels on narrow viewports so nothing overflows. */
@media ( max-width: 780px ) {
	.tmc-event-hybrid--split.tmc-event-hybrid,
	.tmc-event-hybrid--sidebar.tmc-event-hybrid,
	.tmc-event-hybrid--split   .tmc-event-hybrid,
	.tmc-event-hybrid--sidebar .tmc-event-hybrid {
		grid-template-columns: 1fr;
	}
}

/* ── Responsive: compact on phones ────────────────────────────────── */

@media ( max-width: 600px ) {
	.tmc-cal__days { grid-auto-rows: minmax( 60px, auto ); }
	.tmc-cal__day { min-height: 60px; padding: 4px 4px 6px; }
	.tmc-cal__chip { font-size: 10px; padding: 1px 4px; }
	.tmc-cal__chip-title { display: none; }
	.tmc-cal__more { font-size: 9px; padding: 1px 4px; }
	.tmc-cal__preview-item { grid-template-columns: 60px minmax( 0, 1fr ); }
}
