/* AQH Event Manager — front-end
   Palette: teal #16453c, sage #c2d2c4, gold #c6a15b, coral #e56a3c, teal-btn #2f7264 */

.aqhem {
	--aqhem-teal: #16453c;
	--aqhem-teal-dark: #123a32;
	--aqhem-gold: #c6a15b;
	--aqhem-sage: #c2d2c4;
	--aqhem-sage-soft: #eef3ee;
	--aqhem-heading: #2c5f54;
	--aqhem-body: #445a51;
	--aqhem-light: #a8c4bc;
	--aqhem-coral: #e56a3c;
	--aqhem-border: #dfe6e0;
	color: var(--aqhem-body);
	line-height: 1.6;
}
.aqhem *, .aqhem *::before, .aqhem *::after { box-sizing: border-box; }
.aqhem a { text-decoration: none; }
.aqhem-empty { color: var(--aqhem-body); font-style: italic; }

/* Buttons */
.aqhem-btn { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .3px; padding: 10px 22px; border-radius: 6px; transition: opacity .15s ease; }
.aqhem-btn-primary { background: var(--aqhem-coral); color: #fff; }
.aqhem-btn-primary:hover { opacity: .9; color: #fff; }

/* Events grid / list */
.aqhem-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 340px)); gap: 24px; justify-content: center; }
.aqhem-page-fullwidth { width: 100%; }
.aqhem-page-inner { max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.aqhem-page-title { font-size: 32px; font-weight: 600; color: #16453c; margin: 0 0 24px; }
.aqhem-events-list { display: flex; flex-direction: column; gap: 18px; }
.aqhem-events-list .aqhem-card-link { display: flex; gap: 18px; }
.aqhem-events-list .aqhem-card-thumb { flex: 0 0 200px; }
.aqhem-events-list .aqhem-card-body { flex: 1 1 auto; }

.aqhem-card { background: #fff; border: 1px solid var(--aqhem-border); border-radius: 12px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.aqhem-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,69,60,0.12); }
.aqhem-card-link { color: inherit; display: block; }
.aqhem-card-thumb { position: relative; aspect-ratio: 3 / 2; background: var(--aqhem-sage-soft); }
.aqhem-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aqhem-datechip { position: absolute; top: 12px; left: 12px; background: var(--aqhem-teal); color: #fff; border-radius: 8px; padding: 6px 10px; text-align: center; line-height: 1; }
.aqhem-datechip-m { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--aqhem-gold); }
.aqhem-datechip-d { display: block; font-size: 20px; font-weight: 700; margin-top: 2px; }
.aqhem-card-body { padding: 16px 18px; }
.aqhem-card-cat { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--aqhem-heading); background: var(--aqhem-sage-soft); padding: 3px 9px; border-radius: 12px; margin-bottom: 8px; }
.aqhem-card-title { font-size: 19px; font-weight: 600; color: var(--aqhem-heading); margin: 0 0 8px; line-height: 1.3; }
.aqhem-card-meta { font-size: 13px; color: var(--aqhem-body); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.aqhem-meta-date { font-weight: 600; }
.aqhem-meta-venue::before { content: "\1F4CD  "; }
.aqhem-card-recur { font-size: 12px; color: var(--aqhem-gold); margin: 0 0 6px; font-weight: 600; }
.aqhem-card-excerpt { font-size: 14px; color: var(--aqhem-body); margin: 0; }

/* Upcoming list */
.aqhem-upcoming ul { list-style: none; margin: 0; padding: 0; }
.aqhem-upcoming li { border-bottom: 1px solid var(--aqhem-border); }
.aqhem-upcoming li:last-child { border-bottom: 0; }
.aqhem-upcoming a { display: flex; align-items: center; gap: 14px; padding: 12px 4px; color: inherit; }
.aqhem-up-date { flex: 0 0 auto; width: 48px; text-align: center; background: var(--aqhem-sage-soft); border-radius: 8px; padding: 6px 0; line-height: 1; }
.aqhem-up-m { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--aqhem-heading); }
.aqhem-up-d { display: block; font-size: 18px; font-weight: 700; color: var(--aqhem-teal); margin-top: 2px; }
.aqhem-up-text { display: flex; flex-direction: column; }
.aqhem-up-title { font-weight: 600; color: var(--aqhem-heading); }
.aqhem-up-range { font-size: 13px; color: var(--aqhem-body); }

/* Calendar */
.aqhem-calendar { border: 1px solid var(--aqhem-border); border-radius: 12px; overflow: hidden; background: #fff; }
.aqhem-cal-head { display: flex; align-items: center; justify-content: space-between; background: var(--aqhem-teal); color: #fff; padding: 14px 18px; }
.aqhem-cal-title { font-size: 18px; font-weight: 600; letter-spacing: .3px; }
.aqhem-cal-nav { color: var(--aqhem-gold); font-size: 26px; line-height: 1; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--aqhem-gold); border-radius: 50%; }
.aqhem-cal-nav:hover { background: rgba(198,161,91,0.15); color: var(--aqhem-gold); }
.aqhem-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.aqhem-cal-wd { text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--aqhem-heading); padding: 10px 0; background: var(--aqhem-sage); }
.aqhem-cal-cell { min-height: 92px; min-width: 0; border-right: 1px solid var(--aqhem-border); border-bottom: 1px solid var(--aqhem-border); padding: 6px; position: relative; overflow: hidden; }
.aqhem-cal-grid { min-width: 0; }
.aqhem-calendar { max-width: 100%; overflow: hidden; }
.aqhem-cal-cell:nth-child(7n) { border-right: 0; }
.aqhem-cal-empty { background: #fafbfa; }
.aqhem-cal-num { font-size: 13px; color: var(--aqhem-body); font-weight: 600; }
.aqhem-is-today .aqhem-cal-num { background: var(--aqhem-coral); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.aqhem-cal-events { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.aqhem-cal-event { display: block; font-size: 11px; line-height: 1.25; background: var(--aqhem-teal); color: #fff; padding: 4px 6px; border-radius: 4px; overflow: hidden; white-space: normal; overflow-wrap: break-word; word-break: break-word; }
.aqhem-cal-ev-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.aqhem-cal-ev-meta { display: block; font-size: 10px; opacity: .9; margin-top: 2px; }
.aqhem-cal-event:hover { background: #2f7264; color: #fff; }

/* Single event banner */
.aqhem-banner { background: var(--aqhem-teal); color: #fff; padding: 28px 24px; }
.aqhem-banner-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.aqhem-banner-date { display: flex; align-items: center; gap: 14px; }
.aqhem-clock { width: 54px; height: 54px; border: 1.5px solid var(--aqhem-gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--aqhem-gold); flex: 0 0 auto; }
.aqhem-day { font-size: 12px; letter-spacing: 2px; color: var(--aqhem-gold); text-transform: uppercase; }
.aqhem-date-big { font-size: 30px; font-weight: 600; line-height: 1.1; color: #fff; }
.aqhem-date-sub { font-size: 13px; color: var(--aqhem-light); }
.aqhem-date-recur { font-size: 12px; color: var(--aqhem-gold); margin-top: 2px; }
.aqhem-banner-venue { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 240px; padding-left: 28px; border-left: 1px solid rgba(255,255,255,0.15); }
.aqhem-pin { color: var(--aqhem-gold); flex: 0 0 auto; margin-top: 2px; }
.aqhem-venue-name { font-size: 16px; font-weight: 600; letter-spacing: .3px; color: #fff; text-transform: uppercase; }
.aqhem-venue-address { font-size: 13px; color: var(--aqhem-light); line-height: 1.5; }
.aqhem-banner-map { flex: 0 0 240px; max-width: 240px; }
.aqhem-banner-map iframe { width: 100%; height: 96px; border: 0; border-radius: 10px; display: block; }
.aqhem-banner-actions { max-width: 1140px; margin: 18px auto 0; display: flex; gap: 12px; flex-wrap: wrap; }
.aqhem-hero img { display: block; width: 100%; height: auto; }
.aqhem-content { max-width: 1140px; margin: 0 auto; padding: 32px 24px 0; }
.aqhem-single-title { font-size: 30px; font-weight: 600; color: var(--aqhem-heading); margin: 0; }
.aqhem-back { margin: 8px 0 40px; }
.aqhem-back a { color: var(--aqhem-heading); font-weight: 600; }

/* Content rows (alternating image / content) */
.aqhem-rows { margin-top: 8px; }
.aqhem-row { padding: 40px 24px; }
.aqhem-row:nth-child(even) { background: var(--aqhem-sage-soft); }
.aqhem-row-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; gap: 48px; }
.aqhem-row-media, .aqhem-row-text { flex: 1 1 0; min-width: 0; }
.aqhem-row-img { width: 100%; height: auto; border-radius: 8px; display: block; }
.aqhem-row-heading { font-size: 24px; font-weight: 600; color: var(--aqhem-heading); margin: 0 0 14px; line-height: 1.3; }
.aqhem-row-content { font-size: 16px; }
.aqhem-row-content :first-child { margin-top: 0; }
.aqhem-row-content :last-child { margin-bottom: 0; }
.aqhem-row-noimg .aqhem-row-inner { display: block; max-width: 820px; }

/* Responsive */
@media (max-width: 860px) {
	.aqhem-banner-venue { border-left: 0; padding-left: 0; flex-basis: 100%; }
	.aqhem-banner-map { flex-basis: 100%; max-width: 100%; }
	.aqhem-banner-map iframe { height: 160px; }
	.aqhem-events-list .aqhem-card-link { flex-direction: column; }
	.aqhem-events-list .aqhem-card-thumb { flex-basis: auto; }
	.aqhem-cal-cell { min-height: 64px; }
	.aqhem-cal-event { font-size: 0; padding: 4px; }
	.aqhem-cal-event::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
	.aqhem-row-inner { flex-direction: column; gap: 24px; }
	/* Keep image above text on mobile regardless of desktop side */
	.aqhem-row-pos-right .aqhem-row-media { order: -1; }
	.aqhem-row { padding: 32px 20px; }
}

/* Registration button states */
.aqhem-btn-soldout { background: #d3d1c7; color: #5f5e5a; cursor: not-allowed; }
.aqhem-reg-price { color: var(--aqhem-light); font-size: 14px; align-self: center; }
.aqhem-reg-stock { color: var(--aqhem-gold); font-size: 13px; align-self: center; }

/* ===== v3: view toggle ===== */
.aqhem-viewtoggle { display: flex; justify-content: center; margin: 0 0 24px; }
.aqhem-vt-btn { background: #fff; border: 1px solid var(--aqhem-teal); color: var(--aqhem-teal); font-weight: 600; font-size: 15px; padding: 10px 24px; cursor: pointer; line-height: 1; }
.aqhem-vt-btn:first-child { border-radius: 6px 0 0 6px; }
.aqhem-vt-btn:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.aqhem-vt-btn.is-active { background: var(--aqhem-teal); color: #fff; }
.aqhem-eventspage[data-view="calendar"] .aqhem-view-list { display: none; }
.aqhem-eventspage[data-view="list"] .aqhem-view-calendar { display: none; }

/* ===== v3.3: header row + 3-column info banner ===== */
.aqhem-ebanner {
	background: radial-gradient(130% 130% at 50% 38%, #1c5249 0%, #164a40 55%, #0f342d 100%);
	color: #fff;
	padding: 30px 30px 34px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Top header row: title + price on the left, register on the right. */
.aqhem-ebanner-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	position: relative;
	padding-bottom: 22px;
	margin-bottom: 26px;
	border-bottom: 1px solid rgba(198, 161, 91, 0.45);
}
.aqhem-ebanner-head::before,
.aqhem-ebanner-head::after {
	content: "";
	position: absolute;
	bottom: -4px;
	width: 7px;
	height: 7px;
	background: var(--aqhem-gold);
	transform: rotate(45deg);
}
.aqhem-ebanner-head::before { left: 0; }
.aqhem-ebanner-head::after { right: 0; }
.aqhem-ehead-main { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.aqhem-ev-title { font-size: 30px; font-weight: 600; color: #fff; margin: 0; line-height: 1.15; }
.aqhem-ev-price { color: var(--aqhem-gold); font-size: 20px; font-weight: 600; margin: 0; }
.aqhem-ehead-cta .aqhem-banner-actions { margin: 0; max-width: none; }

/* Three info columns beneath. */
.aqhem-ebanner-cols {
	display: grid;
	grid-template-columns: 1fr 1fr 1.1fr;
	gap: 0;
	align-items: center;
}
.aqhem-ecol { min-width: 0; position: relative; padding: 4px 28px; }
.aqhem-ecol:first-child { padding-left: 2px; }
.aqhem-ecol:last-child { padding-right: 2px; }
.aqhem-ecol + .aqhem-ecol { border-left: 1px solid rgba(198, 161, 91, 0.45); }
.aqhem-ecol + .aqhem-ecol::before,
.aqhem-ecol + .aqhem-ecol::after {
	content: "";
	position: absolute;
	left: -4px;
	width: 7px;
	height: 7px;
	background: var(--aqhem-gold);
	transform: rotate(45deg);
}
.aqhem-ecol + .aqhem-ecol::before { top: 4px; }
.aqhem-ecol + .aqhem-ecol::after { bottom: 4px; }
.aqhem-ecol-when, .aqhem-ecol-where { display: flex; gap: 12px; align-items: flex-start; }
.aqhem-ebanner .aqhem-clock { width: 58px; height: 58px; }
.aqhem-ebanner .aqhem-date-big { font-size: 26px; }

/* Map card: gold border, rounded, soft shadow. */
.aqhem-ecol-map iframe {
	width: 100%;
	height: 150px;
	border: 2px solid var(--aqhem-gold);
	border-radius: 12px;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
	display: block;
}
@media (max-width: 820px) {
	.aqhem-ebanner-cols { grid-template-columns: 1fr; gap: 20px; }
	.aqhem-ecol { border-left: 0 !important; padding: 4px 2px !important; }
	.aqhem-ecol::before, .aqhem-ecol::after { display: none !important; }
	.aqhem-ecol-map iframe { height: 200px; }
}

/* ===== v3: per-day sign-up ===== */
.aqhem-signup { background: var(--aqhem-sage-soft); padding: 32px 24px; }
.aqhem-signup-inner { max-width: 1180px; margin: 0 auto; }
.aqhem-signup-title { margin: 0 0 16px; }
.aqhem-day-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.aqhem-day-row { background: #fff; border: 1px solid var(--aqhem-border); border-radius: 8px; padding: 12px 14px; }
.aqhem-day-row label { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.aqhem-day-date { font-weight: 600; color: var(--aqhem-heading); }
.aqhem-day-price { margin-left: auto; color: #024c4b; }
.aqhem-day-full { opacity: .6; display: flex; align-items: center; }
.aqhem-day-soldout { margin-left: auto; color: #b32d2e; font-weight: 600; }
.aqhem-signup-note { color: #b32d2e; font-weight: 600; }

/* ===== v3: heading + content typography (client spec) ===== */
.aqhem-row-heading,
.aqhem-row-content h1,
.aqhem-row-content h2,
.aqhem-signup-title {
	color: #2c5f54;
	font-family: 'gillsansmt', 'Gill Sans MT', sans-serif;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.25;
}
.aqhem-row-content h3,
.aqhem-row-content h4,
.aqhem-row-content h5,
.aqhem-row-content h6 {
	color: #2c5f54;
	font-family: 'gillsansmt', 'Gill Sans MT', sans-serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}
.aqhem-row-content,
.aqhem-row-content p,
.aqhem-row-content ul,
.aqhem-row-content ol,
.aqhem-row-content li {
	color: #024c4b;
	font-family: 'Poppins', sans-serif;
	font-size: 18px;
	font-weight: 400;
}

/* ===== v3.5: sessions sign-up ===== */
.aqhem-sess-date { font-size: 18px; color: var(--aqhem-heading); margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--aqhem-border); }
.aqhem-sess-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.aqhem-sess-row { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--aqhem-border); border-radius: 8px; padding: 12px 14px; cursor: pointer; }
.aqhem-sess-row input { margin-top: 4px; }
.aqhem-sess-title { font-weight: 600; color: var(--aqhem-heading); }
.aqhem-sess-meta { color: #024c4b; margin-left: 6px; }
.aqhem-sess-desc { font-size: 14px; color: var(--aqhem-body); margin-top: 4px; }
.aqhem-sess-full { opacity: .65; cursor: default; justify-content: space-between; }
.aqhem-sess-fulltag { color: #b32d2e; font-weight: 600; white-space: nowrap; }

/* ===== v3.6: read-more + modal ===== */
.aqhem-readmore { background: none; border: 0; color: var(--aqhem-heading); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; margin-left: 8px; font-size: 14px; }
.aqhem-readmore:hover { color: var(--aqhem-coral); }
.aqhem-modal[hidden] { display: none; }
.aqhem-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.aqhem-modal-overlay { position: absolute; inset: 0; background: rgba(15, 52, 45, 0.55); }
.aqhem-modal-box { position: relative; background: #fff; max-width: 620px; width: calc(100% - 40px); max-height: 80vh; overflow: auto; border-radius: 12px; padding: 28px 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.aqhem-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--aqhem-body); cursor: pointer; }
.aqhem-modal-title { color: var(--aqhem-heading); margin: 0 0 14px; font-size: 22px; }
.aqhem-modal-content { color: #024c4b; font-size: 16px; line-height: 1.6; }
.aqhem-modal-content h1, .aqhem-modal-content h2, .aqhem-modal-content h3 { color: var(--aqhem-heading); }

/* Modal paragraph + list spacing (in case the theme resets them) */
.aqhem-modal-content p { margin: 0 0 1em; }
.aqhem-modal-content p:last-child { margin-bottom: 0; }
.aqhem-modal-content ul, .aqhem-modal-content ol { margin: 0 0 1em 1.4em; }
.aqhem-modal-content li { margin: 0 0 .4em; }

/* Wait list */
.aqhem-sess-wl { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aqhem-wl-toggle { background: none; border: 1px solid var(--aqhem-heading); color: var(--aqhem-heading); font-weight: 600; font-size: 13px; padding: 4px 12px; border-radius: 5px; cursor: pointer; }
.aqhem-wl-toggle:hover { background: var(--aqhem-sage-soft); }
.aqhem-wl-fields { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.aqhem-wl-fields input { padding: 6px 8px; border: 1px solid var(--aqhem-border); border-radius: 5px; font-size: 14px; }
.aqhem-wl-submit { background: var(--aqhem-coral); color: #fff; border: 0; border-radius: 5px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.aqhem-wl-done { color: var(--aqhem-heading); font-weight: 600; }

/* Calendar event label truncation (prevents column overflow) */
.aqhem-cal-events { min-width: 0; }
.aqhem-cal-event { max-width: 100%; }

/* List card price */
.aqhem-card-price { font-weight: 600; color: #024c4b; margin: 0 0 6px; }

/* ===== v3.9: single-row list ===== */
.aqhem-elist { display: flex; flex-direction: column; border: 1px solid var(--aqhem-border); border-radius: 12px; overflow: hidden; }
.aqhem-erow { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--aqhem-border); color: inherit; background: #fff; transition: background .12s ease; }
.aqhem-erow:last-child { border-bottom: 0; }
.aqhem-erow:hover { background: var(--aqhem-sage-soft); }
.aqhem-erow-date { flex: 0 0 auto; width: 54px; text-align: center; background: var(--aqhem-sage-soft); border-radius: 8px; padding: 8px 0; line-height: 1; }
.aqhem-erow-m { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--aqhem-heading); }
.aqhem-erow-d { display: block; font-size: 20px; font-weight: 700; color: var(--aqhem-teal); margin-top: 2px; }
.aqhem-erow-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aqhem-erow-title { font-weight: 600; color: var(--aqhem-heading); font-size: 17px; }
.aqhem-erow-sub { color: #024c4b; font-size: 15px; }
.aqhem-erow-meta { color: var(--aqhem-body); font-size: 13px; }

/* ===== v3.9: calendar hover popover ===== */
.aqhem-cal-popover { position: absolute; z-index: 100001; background: #fff; border: 1px solid var(--aqhem-border); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.18); padding: 12px 14px; max-width: 320px; }
.aqhem-pop-sess { padding: 6px 0; border-bottom: 1px solid var(--aqhem-border); }
.aqhem-pop-sess:last-child { border-bottom: 0; }
.aqhem-pop-t { display: block; font-weight: 600; color: var(--aqhem-heading); font-size: 14px; }
.aqhem-pop-m { display: block; color: #024c4b; font-size: 13px; }
