/* WU Events — frontend styles */

/* Do NOT put `container-type: inline-size` here. Page builders (Elementor, Divi) wrap
   shortcodes in flex containers whose width comes from their content; inline-size
   containment stops the content from reporting a width, and the whole widget collapses
   to 0px. The layout below uses viewport media queries for that reason. */
.wu-events {
	width: 100%;
}

.wu-events-wrapper {
	--wu-primary: #025eb8;
	--wu-primary-dark: #21477c;
	--wu-ink: #012a52;
	--wu-muted: rgba(1, 42, 82, 0.5);
	--wu-border: rgba(1, 42, 82, 0.08);
	--wu-bg-soft: #f4f7fa;
	--wu-radius-lg: 28px;
	--wu-radius-md: 16px;

	display: grid;
	/* minmax on the calendar column too, so a narrow theme container shrinks it
	   instead of overflowing. */
	grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	font-family: "Futura Std", sans-serif;
	color: var(--wu-ink);
	box-sizing: border-box;
}

.wu-events-wrapper *,
.wu-events-wrapper *::before,
.wu-events-wrapper *::after {
	box-sizing: border-box;
}

/* Hard reset so the host theme's global button/select styles (borders, padding,
   pill radii, full-width selects) can never bleed into this widget's own components. */
.wu-events-wrapper button,
.wu-events-wrapper select,
.wu-events-wrapper input,
.wu-events-wrapper textarea {
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: inherit;
	outline: none;
}

.wu-events-wrapper select {
	width: auto !important;
}

.wu-events-wrapper__calendar,
.wu-events-wrapper__carousel {
	min-width: 0;
}

/* Single column on narrow screens. */
@media (max-width: 900px) {
	.wu-events-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.wu-events-wrapper__calendar {
		width: 100%;
		max-width: 420px;
	}
}

/* ---------- Calendar ---------- */

.wu-calendar {
	border-radius: var(--wu-radius-lg);
	border: 0.909px solid rgba(1, 42, 82, 0.08);
	background: rgba(255, 255, 255, 0);
	box-shadow: 0 8px 40px 0 rgba(1, 42, 82, 0.13);
	overflow: hidden;
}

.wu-calendar__header {
	background: linear-gradient(135deg, var(--wu-primary) 0%, var(--wu-primary-dark) 100%);
	color: #fff;
	padding: 18px 20px 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Note: these interactive components are prefixed with .wu-events-wrapper on purpose.
   The form-control reset above matches ".wu-events-wrapper button" (specificity 0,1,1),
   so a bare ".wu-calendar__nav" (0,1,0) would lose to it even with !important. */
.wu-events-wrapper .wu-calendar__nav {
	background: rgba(255, 255, 255, 0.18) !important;
	color: #fff !important;
	width: 32px;
	height: 32px;
	line-height: 0;
	border-radius: 50% !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
	flex-shrink: 0;
}

.wu-events-wrapper .wu-calendar__nav svg {
	width: 10px;
	height: 10px;
}

.wu-events-wrapper .wu-calendar__nav:hover {
	background: rgba(255, 255, 255, 0.3) !important;
}

.wu-calendar__title {
	text-align: center;
}

.wu-calendar__month {
	display: block;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.wu-calendar__year {
	display: block;
	font-size: 14px;
	opacity: 0.85;
}

.wu-calendar__body {
	background: #fff;
}

.wu-calendar__count {
	margin: -14px 20px 0;
	background: #fff;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wu-primary-dark);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 10px rgba(1, 42, 82, 0.12);
	position: relative;
}

.wu-calendar__count-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wu-primary);
	flex-shrink: 0;
}

.wu-calendar__weekdays,
.wu-calendar__days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	padding: 0 16px;
}

.wu-calendar__weekdays {
	margin-top: 22px;
	padding-top: 0;
}

.wu-calendar__weekdays span {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--wu-muted);
	padding-bottom: 6px;
}

.wu-calendar__days {
	padding-bottom: 12px;
}

.wu-calendar__day {
	position: relative;
	aspect-ratio: 1 / 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	font-size: 13px;
	color: var(--wu-ink);
}

.wu-calendar__day--empty {
	pointer-events: none;
}

.wu-calendar__day.has-events {
	background: var(--wu-bg-soft);
	font-weight: 600;
}

.wu-calendar__day-number {
	line-height: 1;
}

.wu-calendar__day-dots {
	display: flex;
	gap: 2px;
	margin-top: 4px;
}

.wu-calendar__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
}

.wu-calendar__legend {
	border-top: 1px solid var(--wu-border);
	padding: 14px 20px 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
}

.wu-calendar__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--wu-muted);
}

/* ---------- Carousel ---------- */

.wu-carousel {
	/* No container box: the cards sit directly on the page background. */
	background: none;
	border: none;
	box-shadow: none;
	padding: 0;
}

.wu-carousel__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	color: var(--wu-muted);
	margin-bottom: 16px;
}

.wu-carousel__icon {
	flex-shrink: 0;
	display: inline-flex;
	width: 14px;
	height: 14px;
}

.wu-carousel__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.wu-carousel__label {
	font-size: 14px;
	font-weight: 600;
	color: var(--wu-muted);
}

.wu-carousel__select-wrap {
	display: inline-flex;
}

.wu-events-wrapper .wu-carousel__select {
	/* Explicit dropdown affordance: bordered control with its own chevron. */
	width: auto !important;
	max-width: 100%;
	font-size: 14px;
	font-weight: 600;
	color: var(--wu-ink) !important;
	cursor: pointer;
	padding: 8px 34px 8px 14px !important;
	border: 1px solid rgba(1, 42, 82, 0.2) !important;
	border-radius: 999px !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23012A52' stroke-opacity='0.6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center !important;
	transition: border-color 0.15s ease;
}

.wu-events-wrapper .wu-carousel__select:hover,
.wu-events-wrapper .wu-carousel__select:focus {
	border-color: var(--wu-primary) !important;
}

.wu-carousel__hint {
	font-size: 12px;
	color: var(--wu-muted);
}

.wu-carousel__viewport {
	display: flex;
	align-items: center;
	gap: 4px;
}

.wu-events-wrapper .wu-carousel__arrow {
	background: none !important;
	color: var(--wu-primary) !important;
	width: 20px;
	height: 20px;
	line-height: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: opacity 0.15s ease;
}

.wu-events-wrapper .wu-carousel__arrow svg {
	width: 16px;
	height: 16px;
}

.wu-events-wrapper .wu-carousel__arrow:hover {
	opacity: 0.7;
}

.wu-events-wrapper .wu-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Everything already fits: no arrows, no dots, more room for the cards. */
.wu-carousel.is-static .wu-carousel__arrow,
.wu-carousel.is-static .wu-carousel__dots {
	display: none;
}

.wu-carousel__track-wrap {
	overflow: hidden;
	flex: 1;
	min-width: 0;
}

.wu-carousel__track {
	display: flex;
	gap: 18px;
	transition: transform 0.35s ease;
	align-items: stretch;
}

.wu-carousel__empty {
	padding: 40px 0;
	text-align: center;
	color: var(--wu-muted);
	width: 100%;
}

.wu-carousel__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
}

.wu-events-wrapper .wu-carousel__dots button {
	width: 8px !important;
	height: 8px !important;
	min-width: 8px;
	border-radius: 999px !important;
	background: var(--wu-muted) !important;
	cursor: pointer;
	transition: width 0.2s ease, background 0.2s ease;
}

.wu-events-wrapper .wu-carousel__dots button.is-active {
	background: var(--wu-primary-dark) !important;
	width: 22px !important;
}

/* ---------- Event card ---------- */

.wu-event-card {
	flex: 0 0 calc((100% - 36px) / 3);
	border-radius: 16px;
	border: 0.909px solid rgba(1, 42, 82, 0.06);
	background: #fff;
	box-shadow: 0 4px 24px 0 rgba(1, 42, 82, 0.1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.wu-event-card__media {
	position: relative;
	aspect-ratio: 500 / 250;
	overflow: hidden;
	background: #025eb8;
}

.wu-event-card__img,
.wu-event-card__img--placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.wu-event-card__img--placeholder {
	background: #025eb8;
}

/* Tint over the thumbnail. As the media box's last child it would paint above the badge
   and the date chip, so the stacking order is set explicitly below. */
.wu-event-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(1, 42, 82, 0.5);
	z-index: 1;
	pointer-events: none;
}

.wu-event-card__badge {
	position: absolute;
	z-index: 2;
	top: 12px;
	left: 12px;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 5px 10px;
	border-radius: 999px;
}

.wu-event-card__date-chip {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: 12px;
	background: #fff;
	border-radius: 10px;
	padding: 6px 10px;
	text-align: center;
	line-height: 1.1;
	box-shadow: 0 4px 10px rgba(1, 42, 82, 0.18);
}

.wu-event-card__date-chip strong {
	display: block;
	font-size: 16px;
	color: var(--wu-primary-dark);
}

.wu-event-card__date-chip em {
	display: block;
	font-size: 10px;
	font-style: normal;
	font-weight: 700;
	color: var(--wu-muted);
	letter-spacing: 0.04em;
}

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

.wu-event-card__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--wu-ink);
}

.wu-event-card__meta-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wu-event-card__meta {
	margin: 0;
	font-size: 13px;
	color: var(--wu-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}

.wu-event-card__meta a {
	color: var(--wu-muted);
	text-decoration: underline;
}

.wu-event-card__icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	display: inline-flex;
}

.wu-event-card__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.wu-event-card__description {
	margin: 0;
	font-size: 13px;
	color: var(--wu-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wu-event-card__actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	padding-top: 4px;
}

/* Prefixed with .wu-events-wrapper and forced on every link state: themes (Elementor's
   global link colour here) set anchor colours with enough weight to repaint this button,
   and :visited / :hover / :focus each need covering or the label flips colour. */
.wu-events-wrapper .wu-event-card__cta,
.wu-events-wrapper a.wu-event-card__cta {
	display: inline-block;
	text-align: center;
	background: linear-gradient(180deg, var(--wu-primary-dark) 0%, var(--wu-primary) 100%);
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	text-transform: capitalize;
	text-decoration: none !important;
	padding: 12px 16px;
	border-radius: 999px;
	transition: background 0.25s ease;
}

.wu-events-wrapper a.wu-event-card__cta:link,
.wu-events-wrapper a.wu-event-card__cta:visited,
.wu-events-wrapper a.wu-event-card__cta:hover,
.wu-events-wrapper a.wu-event-card__cta:focus,
.wu-events-wrapper a.wu-event-card__cta:active {
	color: #fff !important;
	text-decoration: none !important;
}

.wu-events-wrapper .wu-event-card__cta:hover {
	/* Same 2-stop gradient shape as the base state (both stops = the hover color) so the
	   browser can interpolate it smoothly instead of snapping/flickering between a
	   gradient and a flat color. */
	background: linear-gradient(180deg, var(--wu-primary-dark) 0%, var(--wu-primary-dark) 100%);
}

/* Secondary, quieter action: link to the full event detail page. Same theme-proofing as
   the CTA above — a global anchor rule would otherwise recolour and underline it. */
.wu-events-wrapper .wu-event-card__details,
.wu-events-wrapper a.wu-event-card__details:link,
.wu-events-wrapper a.wu-event-card__details:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wu-primary) !important;
	text-decoration: none !important;
	padding: 2px 0;
	transition: opacity 0.15s ease;
}

.wu-events-wrapper a.wu-event-card__details:hover,
.wu-events-wrapper a.wu-event-card__details:focus {
	color: var(--wu-primary) !important;
	text-decoration: underline !important;
	opacity: 0.8;
}

.wu-event-card__details svg {
	width: 9px;
	height: 9px;
	flex-shrink: 0;
}

/* ---------- Cards per view: desktop 3 / tablet 2 / mobile 1 ---------- */

@media (max-width: 1199px) {
	.wu-event-card {
		flex: 0 0 calc((100% - 18px) / 2);
	}
}

@media (max-width: 767px) {
	.wu-calendar__day {
		font-size: 12px;
	}

	.wu-event-card {
		flex: 0 0 100%;
	}
}
