/* CarShowHub Events */
.csh {
	/* CarShowHub look: yellow gold on dark slate, like the site header and the other CarShowHub tools.
	   The four --csh-brand values come from the Accent color setting (text colours are worked out from it). */
	--csh-accent: var(--csh-brand, #f2b705);          /* fills: buttons, date bands, map pins */
	--csh-accent-hi: var(--csh-brand-hi, #ffb700);    /* brighter yellow for hover */
	--csh-on-accent: var(--csh-on-brand, #1d2328);    /* text that sits on the gold */
	--csh-accent-ink: var(--csh-brand-ink, #856503);  /* gold dark enough to read as text on white */
	--csh-dark: #1d2328;
	--csh-ink: #222222;
	--csh-muted: #616161;
	--csh-line: #e4e4e4;
	--csh-bg: #ffffff;
	--csh-soft: #f7f7f7;
	--csh-radius: 12px;
	--csh-btn-radius: 9px;
	color: var(--csh-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.csh *, .csh *::before, .csh *::after { box-sizing: border-box; }
.csh [hidden] { display: none !important; }

/* Buttons */
.csh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 18px; border: 2px solid var(--csh-accent); border-radius: var(--csh-btn-radius);
	background: var(--csh-accent); color: var(--csh-on-accent) !important; font: inherit; font-weight: 700; font-size: 15px;
	text-decoration: none !important; cursor: pointer; white-space: nowrap; line-height: 1;
	transition: background .15s, border-color .15s, color .15s;
}
.csh-btn:hover { background: var(--csh-accent-hi); border-color: var(--csh-accent-hi); }
.csh-btn:focus-visible { outline: 3px solid var(--csh-dark); outline-offset: 2px; }
.csh-btn--outline { background: #fff; color: var(--csh-dark) !important; }
.csh-btn--outline:hover { background: var(--csh-accent); border-color: var(--csh-accent); color: var(--csh-on-accent) !important; }
.csh-btn--ghost { background: #fff; border-color: var(--csh-line); color: var(--csh-dark) !important; font-weight: 600; }
.csh-btn--ghost:hover { background: var(--csh-soft); border-color: var(--csh-accent); }
.csh-btn--lg { min-height: 52px; padding: 0 28px; font-size: 17px; }
.csh-btn.is-busy { opacity: .6; cursor: progress; }

/* Filters */
.csh-filters {
	background: var(--csh-soft); border: 1px solid var(--csh-line); border-radius: var(--csh-radius);
	padding: 16px; display: grid; gap: 12px; margin: 0 0 14px;
}
.csh-filters__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.csh-field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; flex: 1 1 150px; margin: 0; }
.csh-field--grow { flex: 2 1 240px; }
.csh-field--sm { flex: 0 1 110px; min-width: 100px; }
.csh-field > span:first-child { font-size: 13px; font-weight: 600; color: var(--csh-muted); letter-spacing: .01em; }
.csh-field em { color: var(--csh-accent-ink); font-style: normal; font-weight: 700; }
.csh input[type=text], .csh input[type=search], .csh input[type=email], .csh input[type=url], .csh input[type=tel],
.csh input[type=date], .csh input[type=time], .csh select, .csh textarea {
	width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #cfcfcf; border-radius: 8px;
	background: #fff; color: var(--csh-ink); font: inherit; font-size: 16px; margin: 0;
}
.csh textarea { min-height: 120px; resize: vertical; }
.csh input:focus, .csh select:focus, .csh textarea:focus { outline: none; border-color: var(--csh-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--csh-accent) 35%, transparent); }
.csh-dates { flex-direction: row; gap: 8px; flex: 2 1 280px; }
.csh-dates label { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.csh-dates span { font-size: 13px; font-weight: 600; color: var(--csh-muted); }
.csh-near { display: flex; gap: 8px; }
.csh-near input { flex: 1; min-width: 0; }
.csh-near .csh-btn { padding: 0 12px; }
.csh-or { align-self: center; padding-top: 18px; color: var(--csh-muted); font-size: 13px; font-style: italic; }
.csh-actions { display: flex; gap: 12px; align-items: center; }
.csh-reset { color: var(--csh-muted) !important; font-size: 14px; }

/* Category chips */
.csh-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 8px; scrollbar-width: thin; }
.csh-chip {
	flex: 0 0 auto; padding: 7px 14px; border: 1px solid var(--csh-line); border-radius: 999px; background: #fff;
	color: var(--csh-ink) !important; text-decoration: none !important; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.csh-chip:hover { border-color: var(--csh-accent); }
.csh-chip.is-active { background: var(--csh-dark); border-color: var(--csh-dark); color: var(--csh-accent) !important; }

/* Toolbar */
.csh-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 8px 0 16px; }
.csh-toolbar__right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.csh-heading { margin: 0 !important; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; font-weight: 700; color: var(--csh-ink); }
.csh-count { margin: 4px 0 0 !important; color: var(--csh-muted); font-size: 14px; }
.csh-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--csh-muted); }
.csh-sort select { min-width: 120px; }
.csh-notice { padding: 12px 16px; border-radius: 8px; background: #fff7e0; border: 1px solid #f0d58a; margin: 0 0 16px; }

/* Map */
.csh-map { height: 380px; border-radius: var(--csh-radius); border: 1px solid var(--csh-line); margin-bottom: 20px; z-index: 0; }
.csh-map--single { height: 280px; margin-top: 16px; }
.csh-pin span {
	display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--csh-accent);
	transform: rotate(-45deg); border: 3px solid var(--csh-dark); box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.csh .leaflet-popup-content { font-size: 14px; line-height: 1.4; color: var(--csh-ink); }
.csh .leaflet-popup-content a { color: var(--csh-dark); text-decoration: underline; text-decoration-color: var(--csh-accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* Cards */
.csh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.csh-card {
	display: flex; flex-direction: column; background: var(--csh-bg); border: 1px solid var(--csh-line);
	border-radius: var(--csh-radius); overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.csh-card:hover { box-shadow: 0 10px 28px rgba(20,20,30,.14); transform: translateY(-2px); border-color: var(--csh-accent); }
.csh-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--csh-dark); overflow: hidden; }
.csh-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csh-card__ph { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--csh-accent) 45%, transparent);
	background: radial-gradient(circle at 30% 20%, #2f383f, #14181b); }
.csh-card__ph svg { width: 45%; }
.csh-datebadge {
	position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; align-items: center;
	min-width: 52px; padding: 0; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); line-height: 1; overflow: hidden;
}
.csh-datebadge b { align-self: stretch; text-align: center; padding: 5px 8px 4px; background: var(--csh-accent); color: var(--csh-on-accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.csh-datebadge i { font-style: normal; font-size: 24px; font-weight: 800; color: var(--csh-dark); padding: 4px 8px 5px; }
.csh-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.csh-card__title { margin: 2px 0 4px !important; font-size: 18px !important; line-height: 1.25 !important; font-weight: 700; }
.csh-card__title a { color: var(--csh-ink) !important; text-decoration: none !important; }
.csh-card__title a:hover { color: var(--csh-accent-ink) !important; }
.csh-line { margin: 0 !important; font-size: 14px; color: var(--csh-muted); }
.csh-line--when { color: var(--csh-ink); font-weight: 600; }
.csh-line--meta { margin-top: auto !important; padding-top: 6px; font-size: 13px; }
.csh-line--meta:empty { display: none; }
.csh-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.csh-pill {
	display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
	background: color-mix(in srgb, var(--csh-accent) 22%, #fff); color: var(--csh-dark) !important;
	text-decoration: none !important;
}

.csh-empty { padding: 40px 20px; text-align: center; border: 2px dashed var(--csh-line); border-radius: var(--csh-radius); color: var(--csh-muted); }

/* Pager */
.csh-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 28px 0 8px; }
.csh-pager a { min-width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--csh-line); border-radius: 8px;
	text-decoration: none !important; color: var(--csh-ink) !important; font-weight: 600; }
.csh-pager a:hover { border-color: var(--csh-accent); }
.csh-pager a.is-active { background: var(--csh-dark); border-color: var(--csh-dark); color: var(--csh-accent) !important; }

/* Browse by state */
.csh-states { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--csh-line); }
.csh-states ul { list-style: none; margin: 14px 0 0 !important; padding: 0 !important; columns: 4 180px; column-gap: 24px; }
.csh-states li { break-inside: avoid; display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--csh-soft); margin: 0 !important; font-size: 15px; }
.csh-states li a { color: var(--csh-ink) !important; text-decoration: none !important; }
.csh-states li a:hover { color: var(--csh-accent-ink) !important; }
.csh-states li span { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--csh-accent); color: var(--csh-on-accent); }
.csh-states li.is-empty a { color: var(--csh-muted) !important; }

/* Single event */
.csh-single { margin-bottom: 24px; }
.csh-single .csh-pills { margin-bottom: 12px; }
.csh-details { background: var(--csh-soft); border: 1px solid var(--csh-line); border-radius: var(--csh-radius); padding: 18px 20px; }
.csh-details dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.csh-details dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--csh-muted); margin: 0; }
.csh-details dd { margin: 2px 0 0; font-size: 16px; }
.csh-details a { color: var(--csh-dark) !important; text-decoration: underline; text-decoration-color: var(--csh-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.csh-details a:hover { color: var(--csh-accent-ink) !important; }
.csh-details a.csh-btn { text-decoration: none; }
.csh-details a.csh-btn:hover { color: var(--csh-on-accent) !important; }
.csh-details a.csh-btn--ghost:hover { color: var(--csh-dark) !important; }
.csh-cal { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--csh-line); }
.csh-back { margin-top: 28px; font-weight: 600; }
.csh-back a { color: var(--csh-dark) !important; text-decoration: underline; text-decoration-color: var(--csh-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.csh-empty a, .csh-count a, .csh-notice a { color: var(--csh-dark) !important; text-decoration: underline; text-decoration-color: var(--csh-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Submission form */
.csh-submit { max-width: 820px; }
.csh-submit fieldset { border: 1px solid var(--csh-line); border-top: 3px solid var(--csh-accent); border-radius: var(--csh-radius); padding: 18px 20px 20px; margin: 0 0 18px; background: #fff; }
.csh-submit legend { font-weight: 700; font-size: 18px; padding: 0 8px; margin-left: -8px; color: var(--csh-ink); }
.csh-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.csh-form-grid--tight { grid-template-columns: 2fr 1fr; gap: 12px; }
.csh-span-2 { grid-column: 1 / -1; }
.csh-submit .csh-field { min-width: 0; }
.csh-submit small { color: var(--csh-muted); font-size: 13px; }
.csh-help { margin: 10px 0 0 !important; font-size: 14px; color: var(--csh-muted); }
.csh-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.csh-errors { border: 1px solid #e8a4a4; background: #fdeeee; border-radius: 10px; padding: 14px 18px; margin-bottom: 18px; color: #7d1a1a; }
.csh-errors ul { margin: 6px 0 0 18px !important; }
.csh-captcha { margin: 0 0 16px; min-height: 65px; }
.csh-secure { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0 !important; font-size: 14px; color: var(--csh-muted); max-width: 640px; }
.csh-secure svg { flex: 0 0 auto; margin-top: 3px; color: #2e7d32; }
.csh-thanks { text-align: center; padding: 40px 20px; border: 1px solid var(--csh-line); border-radius: var(--csh-radius); background: var(--csh-soft); }
.csh-thanks p:last-child { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }


/* List / Map switch */
.csh-view { display: inline-flex; border: 1px solid var(--csh-line); border-radius: var(--csh-btn-radius); background: #fff; overflow: hidden; }
.csh-view__item {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
	font-size: 15px; font-weight: 700; line-height: 1; color: var(--csh-dark) !important; text-decoration: none !important;
}
.csh-view__item:hover { background: var(--csh-soft); }
.csh-view__item.is-active { background: var(--csh-dark); color: var(--csh-accent) !important; }

/* Collapsible filters on the map view (keeps the map near the top of the page) */
.csh-filterbox { margin: 0 0 12px; }
.csh-filterbox > summary { list-style: none; width: fit-content; user-select: none; }
.csh-filterbox > summary::-webkit-details-marker { display: none; }
.csh-filterbox[open] > summary { margin-bottom: 10px; background: var(--csh-dark); border-color: var(--csh-dark); color: var(--csh-accent) !important; }
.csh-filterbox .csh-filters { margin-bottom: 0; }

/* Standalone map view: list beside the map, both inside one fixed-height frame (no long page scroll) */
.csh-mapview { container-type: inline-size; }
.csh-mapview__body {
	display: grid; grid-template-columns: 1fr; height: var(--csh-map-h, 600px);
	border: 1px solid var(--csh-line); border-radius: var(--csh-radius); overflow: hidden; background: #fff;
}
.csh-mapview__body.has-list { grid-template-columns: minmax(240px, 34%) 1fr; }
.csh-mapview__body .csh-map--view { height: 100%; margin: 0; border: 0; border-radius: 0; }
.csh-maplist { position: relative; overflow-y: auto; border-right: 1px solid var(--csh-line); background: #fff; overscroll-behavior: contain; }
.csh-maprow {
	display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--csh-soft);
	color: var(--csh-ink) !important; text-decoration: none !important;
}
.csh-maprow:hover { background: var(--csh-soft); }
.csh-maprow.is-active { background: color-mix(in srgb, var(--csh-accent) 14%, #fff); box-shadow: inset 4px 0 0 var(--csh-accent); }
.csh-maprow__date { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; padding: 0; border: 1px solid var(--csh-line); border-radius: 8px; background: #fff; line-height: 1; overflow: hidden; }
.csh-maprow__date b { align-self: stretch; text-align: center; padding: 4px 0 3px; background: var(--csh-accent); color: var(--csh-on-accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.csh-maprow__date i { font-style: normal; font-size: 19px; font-weight: 800; color: var(--csh-dark); padding: 3px 0 4px; }
.csh-maprow__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.csh-maprow__text strong { font-size: 15px; line-height: 1.25; }
.csh-maprow__text span { font-size: 13px; color: var(--csh-muted); }
.csh-mapview__more { margin: 10px 0 0 !important; font-weight: 600; font-size: 15px; }
.csh-mapview__more a { color: var(--csh-dark) !important; text-decoration: underline; text-decoration-color: var(--csh-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.csh-popup-link { font-weight: 700; }

@container (max-width: 700px) {
	.csh-mapview__body, .csh-mapview__body.has-list { display: flex; flex-direction: column; height: auto; }
	.csh-mapview__body .csh-map--view { order: 1; height: min(var(--csh-map-h, 600px), 62vh); min-height: 300px; }
	.csh-maplist { order: 2; display: flex; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--csh-line); scroll-snap-type: x proximity; }
	.csh-maprow { flex: 0 0 min(78%, 280px); border-bottom: 0; border-right: 1px solid var(--csh-soft); scroll-snap-align: start; }
	.csh-maprow.is-active { box-shadow: inset 0 4px 0 var(--csh-accent); }
}

@media (max-width: 640px) {
	.csh-mapview__body, .csh-mapview__body.has-list { display: flex; flex-direction: column; height: auto; }
	.csh-mapview__body .csh-map--view { order: 1; height: min(var(--csh-map-h, 600px), 62vh); min-height: 300px; }
	.csh-maplist { order: 2; display: flex; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--csh-line); scroll-snap-type: x proximity; }
	.csh-maprow { flex: 0 0 min(78%, 280px); border-bottom: 0; border-right: 1px solid var(--csh-soft); scroll-snap-align: start; }
	.csh-maprow.is-active { box-shadow: inset 0 4px 0 var(--csh-accent); }

	.csh-filters { padding: 12px; }
	.csh-field, .csh-field--grow, .csh-field--sm { flex: 1 1 100%; }
	.csh-or { display: none; }
	.csh-actions { width: 100%; }
	.csh-actions .csh-btn { flex: 1; }
	.csh-near .csh-btn span { display: none; }
	.csh-map { height: 300px; }
	.csh-form-grid { grid-template-columns: 1fr; }
	.csh-toolbar__right { width: 100%; }
}

/* Event pages: hide the theme's author / "posted on" line (classic themes). Block themes are handled in PHP. */
body.csh-no-byline .entry-meta,
body.csh-no-byline .post-meta,
body.csh-no-byline .posted-on,
body.csh-no-byline .byline,
body.csh-no-byline .author.vcard,
body.csh-no-byline .entry-author,
body.csh-no-byline .post-author,
body.csh-no-byline .author-box,
body.csh-no-byline .author-bio,
body.csh-no-byline .entry-date,
body.csh-no-byline .post-date,
body.csh-no-byline .ast-single-post .entry-meta,
body.csh-no-byline .elementor-post-info,
body.csh-no-byline .kadence-post-meta,
body.csh-no-byline .single-post-meta,
body.csh-no-byline li.meta-date,
body.csh-no-byline li.meta-author,
body.csh-no-byline ul.meta:has(> .meta-date),
body.csh-no-byline ul.meta:has(> .meta-author) { display: none !important; } /* last four: Total theme */

/* Visually hidden helper text */
.csh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
