/* Scoped to .cns-mec-event-mgmt — BuddyBoss Created / Group event management lists */

.cns-mec-event-mgmt .cns-mec-event-mgmt-toolbar {
	margin: 0 0 1rem;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	position: relative;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-field {
	flex: 0 1 auto;
	min-width: 0;
	position: static;
	float: none;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-time {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.65rem;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-time-opt {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	font-size: 0.875rem;
	cursor: pointer;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-search input[type="search"] {
	width: 7.5rem;
	max-width: 100%;
}

/*
 * MEC BuddyBoss sets `.buddypress-wrap .select-wrap { position:absolute; right:5px; top:50% }`
 * which tears Category out of the filter row. Keep it inline next to Search.
 */
.buddypress-wrap .cns-mec-event-mgmt .select-wrap,
.cns-mec-event-mgmt .cns-mec-event-mgmt-category .select-wrap,
.cns-mec-event-mgmt .select-wrap {
	position: static !important;
	right: auto !important;
	top: auto !important;
	left: auto !important;
	transform: none !important;
	float: none !important;
	display: block;
	min-width: 8.5rem;
	max-width: 12rem;
	margin: 0;
}

/* Keep Search + Category + Sort as one cluster before the count */
.cns-mec-event-mgmt .cns-mec-event-mgmt-search,
.cns-mec-event-mgmt .cns-mec-event-mgmt-category,
.cns-mec-event-mgmt .cns-mec-event-mgmt-sort {
	flex: 0 0 auto;
	order: 0;
}

.buddypress-wrap .cns-mec-event-mgmt .cns-mec-event-mgmt-sort .select-wrap,
.cns-mec-event-mgmt .cns-mec-event-mgmt-sort .select-wrap {
	min-width: 11rem;
	max-width: 16rem;
}

@media (min-width: 768px) {
	.cns-mec-event-mgmt .cns-mec-event-mgmt-search input[type="search"] {
		width: 9rem;
	}
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-count {
	margin-left: auto;
	font-size: 0.875rem;
	white-space: nowrap;
	font-weight: 600;
}

/* Compact cards: larger side thumb + details; 2 columns on desktop */
.cns-mec-event-mgmt .cns-mec-event-mgmt-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem 1.25rem;
}

@media (min-width: 900px) {
	.cns-mec-event-mgmt .cns-mec-event-mgmt-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-item {
	margin: 0;
	padding: 0.85rem 0;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	min-width: 0;
}

@media (min-width: 900px) {
	.cns-mec-event-mgmt .cns-mec-event-mgmt-item {
		padding: 0.85rem 0.15rem 0.85rem 0;
		border-bottom: 0;
		border-top: 1px solid rgba(0, 0, 0, 0.06);
	}

	.cns-mec-event-mgmt .cns-mec-event-mgmt-empty {
		grid-column: 1 / -1;
	}
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-item-grid {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 0.75rem 0.9rem;
	align-items: start;
}

@media (min-width: 600px) {
	.cns-mec-event-mgmt .cns-mec-event-mgmt-item-grid {
		grid-template-columns: 140px minmax(0, 1fr);
		gap: 0.85rem 1rem;
	}
}

@media (max-width: 420px) {
	.cns-mec-event-mgmt .cns-mec-event-mgmt-item-grid {
		grid-template-columns: 96px minmax(0, 1fr);
	}
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-thumb {
	display: block;
	width: 100%;
	min-width: 0;
	background: transparent;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-thumb img,
.cns-mec-event-mgmt .cns-mec-event-mgmt-thumb-fallback {
	display: block;
	width: 100%;
	height: auto;
	max-height: none;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 6px;
	background: linear-gradient(135deg, #e8edf2 0%, #d9e1e8 100%);
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.65rem;
	margin-bottom: 0.05rem;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-title {
	font-weight: 650;
	font-size: 1rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-status {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.72;
	white-space: nowrap;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-dates,
.cns-mec-event-mgmt .cns-mec-event-mgmt-location,
.cns-mec-event-mgmt .cns-mec-event-mgmt-organizer {
	font-size: 0.8125rem;
	line-height: 1.4;
	opacity: 0.9;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 0.85rem;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-location-name {
	display: block;
	overflow-wrap: anywhere;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-date-label,
.cns-mec-event-mgmt .cns-mec-event-mgmt-organizer-label {
	font-weight: 600;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-actions {
	margin-top: 0.4rem;
	padding-top: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.85rem;
	font-size: 0.875rem;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-actions a,
.cns-mec-event-mgmt .cns-mec-event-mgmt-duplicate-btn {
	white-space: nowrap;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-edit {
	line-height: 1.4;
	text-decoration: underline;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-duplicate {
	display: inline-flex;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

/*
 * Beat BuddyBoss/theme global `button` / submit styles that turn Duplicate
 * into a large filled primary CTA. Keep weight close to Edit.
 */
.cns-mec-event-mgmt .cns-mec-event-mgmt-actions button.cns-mec-event-mgmt-duplicate-btn,
.cns-mec-event-mgmt button.cns-mec-event-mgmt-duplicate-btn {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 0.15rem 0.55rem !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
	max-width: 100%;
	border: 1px solid currentColor !important;
	border-radius: 3px !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit !important;
	font-size: inherit !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
	opacity: 0.92;
	transition: background-color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-actions button.cns-mec-event-mgmt-duplicate-btn:hover,
.cns-mec-event-mgmt .cns-mec-event-mgmt-actions button.cns-mec-event-mgmt-duplicate-btn:focus,
.cns-mec-event-mgmt button.cns-mec-event-mgmt-duplicate-btn:hover,
.cns-mec-event-mgmt button.cns-mec-event-mgmt-duplicate-btn:focus {
	background: rgba(0, 0, 0, 0.04) !important;
	opacity: 1;
	outline: none;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-actions button.cns-mec-event-mgmt-duplicate-btn:focus-visible,
.cns-mec-event-mgmt button.cns-mec-event-mgmt-duplicate-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-actions button.cns-mec-event-mgmt-duplicate-btn:disabled,
.cns-mec-event-mgmt button.cns-mec-event-mgmt-duplicate-btn:disabled {
	opacity: 0.55 !important;
	cursor: wait;
}

.cns-mec-event-mgmt .cns-mec-event-mgmt-empty {
	list-style: none;
	padding: 1rem 0;
}

.cns-mec-event-mgmt.cns-mec-event-mgmt-loading {
	opacity: 0.65;
	pointer-events: none;
}
