/**
 * NAFS Events archive listing fixes (JetEngine listing item template 1012)
 *
 * Long event titles used Elementor widget width:auto inside a horizontal flex
 * row, which overflowed and shoved date/meta off-layout. Allow the title to
 * flex/wrap within the row on desktop and mobile.
 */

/* Listing item root should never force horizontal page scroll */
body.post-type-archive-events .jet-listing-grid__item,
body.post-type-archive-events .elementor-1012,
body.post-type-archive-events .elementor-1012 .elementor-section,
body.post-type-archive-events .elementor-1012 .elementor-container {
	max-width: 100%;
	box-sizing: border-box;
}

/* Left meta/title column: wrap widgets when the title is long */
.elementor-1012 .elementor-element.elementor-element-4962d9c > .elementor-widget-wrap {
	flex-wrap: wrap !important;
	align-items: center;
	row-gap: 6px;
	min-width: 0;
	max-width: 100%;
}

/*
 * Title heading (30ea73a): Elementor sets width/max-width:auto which prevents
 * wrapping in the flex row. Give it the remaining space and allow soft wrap.
 */
.elementor-1012 .elementor-element.elementor-element-30ea73a.elementor-widget {
	flex: 1 1 220px !important;
	width: auto !important;
	max-width: 100% !important;
	min-width: 0 !important;
}

.elementor-1012 .elementor-element.elementor-element-30ea73a > .elementor-widget-container {
	max-width: 100%;
	min-width: 0;
}

.elementor-1012 .elementor-element.elementor-element-30ea73a .elementor-heading-title {
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
	hyphens: auto;
}

/* Keep adjacent auto-width chips from forcing overflow */
.elementor-1012 .elementor-element.elementor-element-4962d9c .elementor-widget__width-auto {
	max-width: 100%;
}

@media (max-width: 767px) {
	.elementor-1012 .elementor-element.elementor-element-30ea73a.elementor-widget {
		flex: 1 1 100% !important;
	}

	.elementor-1012 .elementor-element.elementor-element-30ea73a > .elementor-widget-container {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}
