/**
 * Events listing redesign: toolbar, results grid, cards, load-more, and
 * the minimal empty state. Applies to the events_listing view block_2
 * display only.
 */

/* Toolbar ------------------------------------------------------------------ */

.events-listing {
	padding-bottom: 56px;
	padding-top: 40px;
}

.events-listing__toolbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 24px;
}

.events-listing__filters-btn {
	background: #FFFFFF;
	border: 1px solid #253FD6;
	border-radius: 1000px;
	color: #253FD6;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	transition: transform 160ms ease;
}

.events-listing__filters-btn:hover,
.events-listing__filters-btn:focus-visible {
	transform: translateY(-2px);
}

.events-listing__heading {
	color: #2D2F3B;
	font-size: 28px;
	font-weight: 600;
	margin: 0;
}

.events-listing__summary {
	color: #6C6D72;
	font-size: 14px;
	margin-left: auto;
}

/* Grid --------------------------------------------------------------------- */
/*
 * The views_infinite_scroll pager wraps all rows in a single
 * .views-infinite-scroll-content-wrapper div inside our grid element,
 * so the grid definition must live on that wrapper (with a plain-grid
 * fallback on the outer element if the pager is ever swapped).
 * .views-row gets display:contents so the cards themselves are the
 * grid items - equal-height cards for free, and items the pager
 * appends inherit the same layout.
 */

.events-listing__grid,
.events-listing__grid > .views-infinite-scroll-content-wrapper {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(3, 1fr);
}

.events-listing__grid > .views-infinite-scroll-content-wrapper {
	grid-column: 1 / -1;
}

.events-listing__grid .views-row {
	display: contents;
}

@media (max-width: 991.98px) {
	.events-listing__grid,
	.events-listing__grid > .views-infinite-scroll-content-wrapper {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 575.98px) {
	.events-listing__grid,
	.events-listing__grid > .views-infinite-scroll-content-wrapper {
		grid-template-columns: 1fr;
	}
}

/* Card --------------------------------------------------------------------- */

.event-card {
	background: #FFFFFF;
	border: 1px solid rgba(18, 146, 255, 0.3);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(45, 47, 59, 0.08);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.event-card--cobranded {
	border-color: rgba(81, 182, 143, 0.5);
}

.event-card:hover,
.event-card:focus-within {
	border-color: #1292FF;
	box-shadow: 0 4px 30px rgba(18, 46, 82, 0.13);
	transform: translateY(-2px);
}

.event-card--cobranded:hover,
.event-card--cobranded:focus-within {
	border-color: #51B68F;
}

.event-card__media {
	aspect-ratio: 16 / 9;
	background: #EDFBFF;
	display: block;
	position: relative;
}

.event-card__image {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.event-card__brand-card {
	background: #FFFFFF;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(45, 47, 59, 0.25);
	display: inline-flex;
	left: 8px;
	padding: 13px 14px;
	position: absolute;
	top: 8px;
	z-index: 1;
}

.event-card__brand-logo {
	display: block;
	height: 29px;
	width: auto;
}

.event-card--hosted .event-card__brand-card {
	padding: 8px 10px;
}

.event-card--hosted .event-card__brand-logo {
	height: 40px;
}

.event-card__media::after {
	background: #253FD6;
	content: "";
	inset: 0;
	opacity: 0;
	pointer-events: none;
	position: absolute;
	transition: opacity 160ms ease;
}

.event-card--cobranded .event-card__media::after {
	background: #077B90;
}

.event-card:hover .event-card__media::after,
.event-card:focus-within .event-card__media::after {
	opacity: 0.14;
}

.event-card--cobranded:hover .event-card__media::after,
.event-card--cobranded:focus-within .event-card__media::after {
	opacity: 0.2;
}

.event-card__date-unit {
	border-radius: 10px;
	bottom: 8px;
	display: inline-flex;
	flex-direction: column;
	overflow: hidden;
	position: absolute;
	right: 8px;
	text-align: center;
	min-width: 94px;
	z-index: 1;
}

.event-card__date-badge {
	background: #2D2F3B;
	color: #FFFFFF;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	padding: 8px 10px;
	text-align: center;
}

.event-card--cobranded .event-card__date-badge {
	background: #067B90;
}

.event-card__date-month {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.event-card__date-day {
	font-size: 40px;
	font-weight: 400;
	margin: 2px 0;
}

.event-card__date-year {
	font-size: 11px;
	font-weight: 300;
}

.event-card__countdown {
	background: #253FD6;
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 300;
	line-height: 1;
	padding: 6px 4px;
	white-space: nowrap;
}

.event-card__closed-chip {
	background: #FFFFFF;
	color: #2D2F3B;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 7px 10px;
	text-transform: uppercase;
	white-space: nowrap;
}

.event-card--closed .event-card__date-badge {
	background: linear-gradient(180deg, #F2F2F1 0%, #DEDEDD 100%);
	color: #444651;
}

.event-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 8px;
	padding: 16px 20px 8px;
}

.event-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.event-card__tag {
	background: #EDFBFF;
	border-radius: 1000px;
	color: #253FD6;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 5px 10px;
}

.event-card__closed-banner {
	align-self: flex-start;
	background: #FDEEBD;
	border-radius: 1000px;
	color: #2D2F3B;
	font-size: 13px;
	font-weight: 600;
	margin: 0;
	padding: 8px 14px;
}

.event-card__eyebrow {
	color: #067B90;
	font-size: 13px;
	font-weight: 600;
	margin: 0;
}

.event-card__title {
	font-size: 28px;
	font-weight: 600;
	line-height: 32px;
	margin: 0;
}

.event-card__title a {
	color: #2D2F3B;
	text-decoration: none;
}

.event-card__title a:hover {
	color: #253FD6;
}

.event-card__badge {
	align-self: flex-start;
	background: #EFEFEF;
	border-radius: 1000px;
	color: #2D2F3B;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	padding: 5px 10px;
}

.event-card__teaser {
	color: #6C6D72;
	font-size: 14px;
	font-weight: 300;
	line-height: 20px;
	margin: 0;
}

.event-card__meta-icon {
	fill: #253FD6;
	height: 14px;
	margin-right: 6px;
	vertical-align: -2px;
	width: 14px;
}

.event-card__meta {
	color: #2D2F3B;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 4px 16px;
	justify-content: space-between;
	list-style: none;
	margin: 0;
	padding: 0;
}

.event-card__footer {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-top: auto;
	padding: 12px 20px 16px;
}

.event-card__speakers {
	align-items: center;
	display: flex;
}

.event-card__speakers-label {
	color: #6C6D72;
	font-size: 13px;
	margin-right: 8px;
}

.event-card__avatar {
	background: #EDFBFF;
	border: 2px solid #FFFFFF;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(45, 47, 59, 0.2);
	height: 36px;
	object-fit: cover;
	width: 36px;
}

.event-card__avatar + .event-card__avatar {
	margin-left: -8px;
}

.event-card__avatar--overflow {
	align-items: center;
	background: #FFFFFF;
	color: #2D2F3B;
	display: inline-flex;
	font-size: 12px;
	font-weight: 600;
	justify-content: center;
}

.event-card__cta {
	margin-left: auto;
	background: #03CFFF;
	border-radius: 1000px;
	color: #2D2F3B;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	padding: 10px 24px;
	text-decoration: none;
	transition: transform 160ms ease, filter 160ms ease;
}

.event-card__cta:hover,
.event-card__cta:focus-visible {
	background: linear-gradient(225deg, #03CFFF 0.53%, #2E5FFF 100.53%);
	color: #FFFFFF;
	transform: translateY(-2px);
}

.events-listing__filters-icon {
	fill: currentColor;
	height: 14px;
	margin-right: 6px;
	vertical-align: -2px;
	width: 14px;
}

/* Empty state + pager -------------------------------------------------------- */

.events-listing__empty {
	background: #F7F7F7;
	border-radius: 12px;
	color: #2D2F3B;
	padding: 48px 24px;
	text-align: center;
}

.events-listing__clear {
	background: none;
	border: 1px solid #253FD6;
	border-radius: 1000px;
	color: #253FD6;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	margin-top: 16px;
	padding: 10px 20px;
}

.events-listing__pager {
	margin-top: 32px;
	text-align: center;
}

.events-listing__pager ul,
.events-listing__pager li {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Outline pill per the mock. VIS renders the button through two
   different wrappers depending on render path (initial vs appended),
   so style the anchor on both. */
.events-listing__pager .pager__item a,
.events-listing__pager .js-pager__items a,
.events-listing__pager a.button {
	background: #FFFFFF;
	border: 1px solid #03CFFF;
	border-radius: 1000px;
	color: #2D2F3B;
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	padding: 14px 32px;
	text-decoration: none;
	transition: transform 160ms ease, filter 160ms ease;
}

.events-listing__pager .pager__item a:hover,
.events-listing__pager .js-pager__items a:hover,
.events-listing__pager a.button:hover {
	filter: brightness(0.97);
	transform: translateY(-2px);
}

/* Applied-filter chips + Filters (N) badge (filterChips.js) ---------------- */

.events-listing__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
}

.events-listing__chip {
	align-items: center;
	background-color: #EDFBFF;
	border: 0;
	border-radius: 1000px;
	color: #253FD6;
	cursor: pointer;
	display: inline-flex;
	font-size: 13px;
	font-weight: 600;
	gap: 6px;
	line-height: 1;
	padding: 8px 14px;
	transition: transform 160ms ease, filter 160ms ease;
}

.events-listing__chip:hover,
.events-listing__chip:focus-visible {
	filter: brightness(0.96);
	transform: translateY(-2px);
}

.events-listing__chip-x {
	font-size: 15px;
}

.events-listing__chip--clear {
	background: none;
	border: 1px solid #253FD6;
}

.events-listing__filters-count {
	font-weight: 600;
}

/* Toolbar Sort by proxy (eventSort.js) --------------------------------------- */

.events-listing__sort {
	align-items: center;
	display: flex;
	gap: 8px;
}

.events-listing__sort[hidden] {
	display: none;
}

.events-listing__sort-label {
	color: #2D2F3B;
	font-size: 14px;
	font-weight: 600;
	margin: 0;
}

.events-listing__sort-select {
	border: 1px solid rgba(45, 47, 59, 0.25);
	border-radius: 8px;
	color: #2D2F3B;
	font-size: 14px;
	padding: 8px 12px;
}
