/*
 * HMP Events front-end styles.
 * Colors and spacing are CSS custom properties; override them in your theme, e.g.
 * .hmp-events { --hmp-accent: #b4005a; }
 */
.hmp-events {
	--hmp-accent: #334aff;
	--hmp-accent-contrast: #fff;
	--hmp-text: #141827;
	--hmp-muted: #5d5d5d;
	--hmp-border: #d5d5d5;
	--hmp-surface: #fff;
	--hmp-surface-alt: #f6f7f9;
	--hmp-today: #eef0ff;
	--hmp-featured: #f5b800;
	--hmp-danger: #b3261e;
	--hmp-radius: 6px;
	--hmp-gap: 16px;
	color: var(--hmp-text);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.hmp-events *, .hmp-events *::before, .hmp-events *::after { box-sizing: inherit; }
.hmp-events a { color: inherit; }
.hmp-events-container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.hmp-events-page-title { margin: 0 0 16px; }

/* Buttons */
.hmp-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid var(--hmp-accent);
	border-radius: var(--hmp-radius);
	background: var(--hmp-accent);
	color: var(--hmp-accent-contrast) !important;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}
.hmp-button--secondary { background: transparent; color: var(--hmp-text) !important; border-color: var(--hmp-border); }
.hmp-button:hover, .hmp-button:focus-visible { filter: brightness(.95); }
.hmp-events :focus-visible { outline: 2px solid var(--hmp-accent); outline-offset: 2px; }
.hmp-events .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Toolbar */
.hmp-bar { margin-bottom: 20px; }
.hmp-bar__search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px;
	border: 1px solid var(--hmp-border);
	border-radius: var(--hmp-radius);
	background: var(--hmp-surface);
	margin-bottom: 16px;
}
.hmp-bar__search input[type=search] {
	flex: 1 1 220px;
	min-width: 0;
	padding: 8px 12px;
	border: 1px solid var(--hmp-border);
	border-radius: var(--hmp-radius);
	font: inherit;
}
.hmp-bar__search select { padding: 8px; border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); font: inherit; max-width: 100%; }
.hmp-bar__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hmp-bar__arrows { display: flex; align-items: center; gap: 4px; }
.hmp-nav-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--hmp-border);
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	text-decoration: none;
}
.hmp-nav-link.is-disabled { opacity: .35; }
.hmp-today { margin-left: 6px; }
.hmp-bar__title { flex: 1 1 auto; margin: 0; font-size: 22px; line-height: 1.3; }
.hmp-bar__views { display: flex; border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); overflow: hidden; }
.hmp-view-link { padding: 7px 14px; font-size: 14px; text-decoration: none; border-left: 1px solid var(--hmp-border); }
.hmp-view-link:first-child { border-left: 0; }
.hmp-view-link.is-active { background: var(--hmp-accent); color: var(--hmp-accent-contrast) !important; }
.hmp-events.is-loading .hmp-events__body { opacity: .4; transition: opacity .2s; pointer-events: none; }

.hmp-notice {
	padding: 12px 16px;
	border-radius: var(--hmp-radius);
	background: var(--hmp-surface-alt);
	color: var(--hmp-muted);
}
.hmp-status-badge {
	display: inline-block;
	margin-right: 4px;
	padding: 0 6px;
	border-radius: 3px;
	background: var(--hmp-danger);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	vertical-align: middle;
}
.hmp-event--canceled .hmp-month__event-title,
.hmp-event--canceled .hmp-row-event__title a { text-decoration: line-through; }
.hmp-featured-label { color: #8a6800; font-weight: 700; font-size: 13px; margin-right: 6px; }
.hmp-featured-label::before { content: "★ "; color: var(--hmp-featured); }

/* Month view */
.hmp-month { border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); overflow: visible; background: var(--hmp-surface); }
.hmp-month__head, .hmp-month__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hmp-month__weekday { padding: 8px; font-size: 13px; font-weight: 700; text-align: center; border-bottom: 1px solid var(--hmp-border); color: var(--hmp-muted); }
.hmp-month__weekday .hmp-short { display: none; }
.hmp-month__weekday abbr { text-decoration: none; border: 0; }
.hmp-month__week + .hmp-month__week .hmp-month__day { border-top: 1px solid var(--hmp-border); }
.hmp-month__day { position: relative; min-height: 120px; padding: 6px; border-left: 1px solid var(--hmp-border); min-width: 0; }
.hmp-month__day:first-child { border-left: 0; }
.hmp-month__day.is-other-month { background: var(--hmp-surface-alt); }
.hmp-month__day.is-other-month .hmp-month__date { color: var(--hmp-muted); }
.hmp-month__day.is-past { color: var(--hmp-muted); }
.hmp-month__day.is-today { background: var(--hmp-today); }
.hmp-month__day.is-today .hmp-month__date time { background: var(--hmp-accent); color: var(--hmp-accent-contrast); border-radius: 50%; }
.hmp-month__date { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
.hmp-month__date time { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; }
.hmp-month__date a { text-decoration: none; }
.hmp-month__dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--hmp-accent); }
.hmp-month__event { position: relative; margin-bottom: 4px; font-size: 13px; line-height: 1.3; }
.hmp-month__event-link { display: block; padding: 2px 4px; border-radius: 3px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.hmp-month__event-link:hover, .hmp-month__event-link:focus { background: var(--hmp-surface-alt); }
.hmp-month__event.hmp-event--all-day .hmp-month__event-link,
.hmp-month__event.hmp-event--multiday .hmp-month__event-link { background: var(--hmp-today); border-left: 3px solid var(--hmp-accent); }
.hmp-month__event.hmp-event--featured .hmp-month__event-link { border-left: 3px solid var(--hmp-featured); }
.hmp-month__event.is-continued .hmp-month__event-title::before { content: "… "; }
.hmp-month__event-time { display: block; color: var(--hmp-muted); font-size: 12px; }
.hmp-month__event-title { font-weight: 600; }
.hmp-month__more { display: inline-block; font-size: 12px; font-weight: 700; margin-top: 2px; }
.hmp-tooltip {
	display: none;
	position: absolute;
	z-index: 50;
	left: 0;
	top: 100%;
	width: 260px;
	max-width: 80vw;
	padding: 12px;
	border: 1px solid var(--hmp-border);
	border-radius: var(--hmp-radius);
	background: var(--hmp-surface);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
	color: var(--hmp-text);
	pointer-events: none;
}
.hmp-month__day:nth-child(n+5) .hmp-tooltip { left: auto; right: 0; }
.hmp-month__event:hover .hmp-tooltip, .hmp-month__event:focus-within .hmp-tooltip { display: block; }
.hmp-tooltip__image { display: block; width: 100%; height: auto; margin-bottom: 8px; border-radius: 4px; }
.hmp-tooltip__schedule { font-size: 12px; color: var(--hmp-muted); }
.hmp-tooltip__title { font-weight: 700; margin: 2px 0 4px; }
.hmp-tooltip__excerpt { margin: 0; font-size: 13px; }
.hmp-tooltip__cost { margin-top: 4px; font-weight: 600; font-size: 13px; }
.hmp-month-mobile { display: none; }

/* Date tag */
.hmp-date-tag { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; }
.hmp-date-tag__weekday { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--hmp-muted); }
.hmp-date-tag__day { font-size: 26px; font-weight: 700; }

/* List & day */
.hmp-list__month { display: flex; align-items: center; gap: 12px; margin: 28px 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--hmp-muted); }
.hmp-list__month::after { content: ""; flex: 1; border-top: 1px solid var(--hmp-border); }
.hmp-list__month:first-child { margin-top: 0; }
.hmp-row-event { display: flex; gap: var(--hmp-gap); padding: 16px 0; border-bottom: 1px solid var(--hmp-border); }
.hmp-row-event__body { flex: 1 1 auto; min-width: 0; }
.hmp-row-event__meta { font-size: 14px; color: var(--hmp-muted); }
.hmp-recurring-icon { margin-left: 6px; cursor: help; }
.hmp-row-event__title { margin: 4px 0; font-size: 20px; line-height: 1.3; }
.hmp-row-event__title a { text-decoration: none; }
.hmp-row-event__title a:hover { text-decoration: underline; }
.hmp-row-event__venue { font-style: normal; font-size: 14px; margin-bottom: 6px; }
.hmp-row-event__venue span { color: var(--hmp-muted); margin-left: 6px; }
.hmp-row-event__excerpt { margin: 6px 0; }
.hmp-row-event__cost { font-weight: 700; font-size: 14px; }
.hmp-row-event__image { flex: 0 0 30%; max-width: 280px; }
.hmp-row-event__image img { display: block; width: 100%; height: auto; border-radius: var(--hmp-radius); }
.hmp-event--featured.hmp-row-event { border-left: 4px solid var(--hmp-featured); padding-left: 12px; }
.hmp-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.hmp-pager__next { margin-left: auto; }
.hmp-day__time { margin: 24px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--hmp-muted); }
.hmp-day__group:first-child .hmp-day__time { margin-top: 0; }

/* Week view */
.hmp-week__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); background: var(--hmp-surface); }
.hmp-week__day { border-left: 1px solid var(--hmp-border); min-height: 260px; min-width: 0; }
.hmp-week__day:first-child { border-left: 0; }
.hmp-week__day.is-today { background: var(--hmp-today); }
.hmp-week__head { padding: 8px; text-align: center; border-bottom: 1px solid var(--hmp-border); }
.hmp-week__head a { text-decoration: none; }
.hmp-week__weekday { display: block; font-size: 12px; text-transform: uppercase; color: var(--hmp-muted); font-weight: 700; }
.hmp-week__date { display: block; font-size: 22px; font-weight: 700; }
.hmp-week__all-day { min-height: 34px; padding: 4px; border-bottom: 1px dashed var(--hmp-border); }
.hmp-week__timed { padding: 4px; }
.hmp-week__event { display: block; margin-bottom: 6px; padding: 6px; border-radius: 4px; border-left: 3px solid var(--hmp-accent); background: var(--hmp-surface-alt); font-size: 13px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.hmp-week__event--all-day { background: var(--hmp-today); font-weight: 600; }
.hmp-week__event.hmp-event--featured { border-left-color: var(--hmp-featured); }
.hmp-week__event-time { display: block; font-size: 12px; color: var(--hmp-muted); }
.hmp-week__event-title { font-weight: 600; }

/* Photo view */
.hmp-photo__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.hmp-photo__card { display: flex; flex-direction: column; border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); overflow: hidden; background: var(--hmp-surface); }
.hmp-photo__image { display: block; aspect-ratio: 16 / 10; background: var(--hmp-surface-alt); overflow: hidden; }
.hmp-photo__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hmp-photo__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--hmp-accent); line-height: 1; }
.hmp-photo__placeholder-month { font-weight: 700; text-transform: uppercase; }
.hmp-photo__placeholder-day { font-size: 48px; font-weight: 700; }
.hmp-photo__body { padding: 12px 14px 16px; }
.hmp-photo__schedule { display: block; font-size: 13px; color: var(--hmp-muted); }
.hmp-photo__title { margin: 4px 0; font-size: 18px; line-height: 1.3; }
.hmp-photo__title a { text-decoration: none; }
.hmp-photo__cost { font-weight: 700; font-size: 14px; }

/* Footer / subscribe */
.hmp-footer { margin-top: 24px; display: flex; justify-content: flex-end; }
.hmp-subscribe { position: relative; display: inline-block; }
.hmp-subscribe summary { list-style: none; }
.hmp-subscribe summary::-webkit-details-marker { display: none; }
.hmp-subscribe summary::after { content: "▾"; }
.hmp-subscribe__list {
	position: absolute;
	z-index: 40;
	right: 0;
	min-width: 200px;
	margin: 6px 0 0;
	padding: 6px 0;
	list-style: none;
	border: 1px solid var(--hmp-border);
	border-radius: var(--hmp-radius);
	background: var(--hmp-surface);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.hmp-subscribe__list a { display: block; padding: 6px 14px; text-decoration: none; font-size: 14px; }
.hmp-subscribe__list a:hover { background: var(--hmp-surface-alt); }
.hmp-single__export .hmp-subscribe__list { left: 0; right: auto; }

/* Single event */
.hmp-single__back { font-size: 14px; }
.hmp-single__status { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--hmp-radius); background: var(--hmp-surface-alt); }
.hmp-single__status--canceled, .hmp-single__status--postponed { background: #fdecea; color: var(--hmp-danger); }
.hmp-single__status span { margin-left: 8px; color: var(--hmp-text); }
.hmp-single__schedule { font-size: 18px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.hmp-single__cost { color: var(--hmp-muted); }
.hmp-single__recurrence, .hmp-single__series { margin: 6px 0; color: var(--hmp-muted); font-size: 15px; }
.hmp-single__content { margin: 20px 0; }
.hmp-single__export { margin: 8px 0 24px; }
.hmp-single__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding: 20px; border-radius: var(--hmp-radius); background: var(--hmp-surface-alt); }
.hmp-meta-block__title { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.hmp-meta-block dl { margin: 0 0 12px; }
.hmp-meta-block dt { font-weight: 700; font-size: 14px; margin-top: 8px; }
.hmp-meta-block dd { margin: 0; font-size: 15px; }
.hmp-meta-block address { font-style: normal; }
.hmp-meta-block__name { font-weight: 600; }
.hmp-single__map { margin: 20px 0; }
.hmp-single__map iframe { width: 100%; height: 320px; border: 0; border-radius: var(--hmp-radius); }
.hmp-single__dates ul { padding-left: 20px; }
.hmp-single__dates .is-current a { font-weight: 700; }
.hmp-single__adjacent { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0; padding-top: 16px; border-top: 1px solid var(--hmp-border); font-size: 15px; }
.hmp-single__next { margin-left: auto; text-align: right; }
.hmp-single__related { margin-top: 28px; }
.hmp-upcoming-for { margin-top: 28px; }

/* Widgets */
.hmp-widget-list__items { list-style: none; margin: 0; padding: 0; }
.hmp-widget-list__item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--hmp-border); }
.hmp-widget-list__item .hmp-date-tag { flex-basis: 44px; }
.hmp-widget-list__item .hmp-date-tag__day { font-size: 20px; }
.hmp-widget-list__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hmp-widget-list__name { font-weight: 700; text-decoration: none; }
.hmp-widget-list__schedule, .hmp-widget-list__venue { font-size: 13px; color: var(--hmp-muted); }
.hmp-widget-list__excerpt { margin: 4px 0 0; font-size: 13px; }
.hmp-widget-list__image img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.hmp-widget-list__all { margin-top: 10px; font-size: 14px; font-weight: 600; }

.hmp-mini { max-width: 360px; }
.hmp-mini__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.hmp-mini__title { font-weight: 700; }
.hmp-mini__nav { padding: 2px 10px; font-size: 20px; text-decoration: none; }
.hmp-mini__grid { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
.hmp-mini__grid th { font-size: 12px; color: var(--hmp-muted); padding: 4px 0; text-align: center; border: 0; }
.hmp-mini__grid th abbr { text-decoration: none; border: 0; }
.hmp-mini__grid td { padding: 2px; text-align: center; border: 0; }
.hmp-mini__day { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; font: inherit; font-size: 14px; color: inherit; cursor: default; padding: 0; }
button.hmp-mini__day { cursor: pointer; font-weight: 700; position: relative; }
button.hmp-mini__day::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--hmp-accent); }
.hmp-mini__grid td.is-other-month .hmp-mini__day { opacity: .45; }
.hmp-mini__grid td.is-today .hmp-mini__day { box-shadow: inset 0 0 0 1px var(--hmp-accent); }
.hmp-mini__grid td.is-selected .hmp-mini__day { background: var(--hmp-accent); color: var(--hmp-accent-contrast); }
.hmp-mini__grid td.is-selected button.hmp-mini__day::after { background: var(--hmp-accent-contrast); }
.hmp-mini__list { list-style: none; margin: 10px 0 0; padding: 0; }
.hmp-mini__list li { padding: 6px 0; border-top: 1px solid var(--hmp-border); display: flex; flex-direction: column; }
.hmp-mini__list a { font-weight: 600; text-decoration: none; }
.hmp-mini__time { font-size: 13px; color: var(--hmp-muted); }

.hmp-countdown { text-align: center; padding: 16px; border: 1px solid var(--hmp-border); border-radius: var(--hmp-radius); }
.hmp-countdown__heading { margin: 0 0 6px; font-size: 16px; }
.hmp-countdown__title { display: block; font-size: 18px; font-weight: 700; text-decoration: none; margin-bottom: 10px; }
.hmp-countdown__clock { display: flex; justify-content: center; gap: 12px; }
.hmp-countdown__unit { display: flex; flex-direction: column; min-width: 48px; }
.hmp-countdown__value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hmp-countdown__label { font-size: 12px; text-transform: uppercase; color: var(--hmp-muted); }
.hmp-countdown__date { display: block; margin-top: 10px; font-size: 13px; color: var(--hmp-muted); }

/* Small screens */
@media (max-width: 767px) {
	.hmp-bar__title { order: -1; flex-basis: 100%; font-size: 20px; }
	.hmp-bar__views { width: 100%; overflow-x: auto; }
	.hmp-view-link { flex: 1; text-align: center; padding: 8px 6px; }
	.hmp-month__weekday .hmp-long { display: none; }
	.hmp-month__weekday .hmp-short { display: inline; }
	.hmp-month__day { min-height: 52px; padding: 4px 2px; text-align: center; cursor: pointer; }
	.hmp-month__date { justify-content: center; flex-direction: column; gap: 2px; }
	.hmp-month__dot { display: block; }
	.hmp-month__event, .hmp-month__more { display: none; }
	.hmp-month__day.is-selected { box-shadow: inset 0 0 0 2px var(--hmp-accent); }
	.hmp-month-mobile { display: block; margin-top: 16px; }
	.hmp-month-mobile .hmp-month__event { display: block; padding: 10px 0; border-bottom: 1px solid var(--hmp-border); font-size: 15px; }
	.hmp-month-mobile .hmp-tooltip { display: none !important; }
	.hmp-week__grid { grid-template-columns: 1fr; }
	.hmp-week__day { border-left: 0; border-top: 1px solid var(--hmp-border); min-height: 0; display: grid; grid-template-columns: 64px 1fr; }
	.hmp-week__day:first-child { border-top: 0; }
	.hmp-week__head { border-bottom: 0; border-right: 1px solid var(--hmp-border); }
	.hmp-week__all-day { border-bottom: 0; min-height: 0; grid-column: 2; }
	.hmp-week__timed { grid-column: 2; }
	.hmp-week__empty { display: block; min-height: 24px; }
	.hmp-row-event { flex-wrap: wrap; }
	.hmp-row-event__image { order: -1; flex-basis: 100%; max-width: none; }
	.hmp-footer { justify-content: flex-start; }
	.hmp-subscribe__list { left: 0; right: auto; }
}
