/**
 * BuddyPress integration surfaces — shared styling.
 *
 * Keeps the group Events tab visually consistent with the native BuddyPress
 * profile subnav (text tabs with an underline on the active one) and the
 * Eventonomy design tokens. Loaded on BP group + member pages by the module.
 */

/* Group Events tab toolbar. */
.evnm-bp-group-events__bar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--evnm-space-4, 1rem);
	flex-wrap: wrap;
	border-bottom: 1px solid var(--evnm-border, #e5e7eb);
	margin-bottom: var(--evnm-space-4, 1rem);
}

.evnm-bp-group-events__views {
	display: flex;
	gap: 0;
}

/* View toggle = native-style subnav text tabs (matches the profile Events tab). */
.evnm-bp-group-events__view {
	display: inline-block;
	padding: 0.6rem 1rem;
	margin-bottom: -1px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--evnm-text-muted, #6b7280);
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.evnm-bp-group-events__view:hover,
.evnm-bp-group-events__view:focus {
	color: var(--evnm-accent, #2271b1);
}

.evnm-bp-group-events__view.is-active {
	color: var(--evnm-accent, #2271b1);
	border-bottom-color: var(--evnm-accent, #2271b1);
}

.evnm-bp-group-events__create {
	margin-bottom: 0.35rem;
	white-space: nowrap;
}

/* Empty-state placeholder — centered, muted, breathing room (both surfaces). */
.evnm-bp-group-events .evnm-empty,
.evnm-bp-group-events .evnm-events-list__empty,
.evnm-mbe .evnm-empty {
	text-align: center;
	color: var(--evnm-text-muted, #6b7280);
	padding: var(--evnm-space-6, 2.5rem) var(--evnm-space-4, 1rem);
	margin: 0;
}

/* Owner "Create Event" on the profile Events tab. */
.evnm-bp-profile-events__bar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: var(--evnm-space-4, 1rem);
}

/* Load more on the member profile buckets — quiet, centered secondary button.
   Scoped .evnm-scope prefix (0,2,0) so the !important resets beat both the Free
   .evnm-scope .evnm-btn guard and community-theme bare-<button> skinning. */
.evnm-scope .evnm-mbe__more {
	display: block;
	margin: var(--evnm-space-5, 1.5rem) auto 0;
	padding: 0.55rem 1.5rem;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	border-radius: var(--evnm-radius, 999px);
	background: transparent !important;
	border: 1px solid var(--evnm-border, #d1d5db) !important;
	color: var(--evnm-text, #1e1e1e) !important;
	box-shadow: none !important;
}

.evnm-scope .evnm-mbe__more:hover,
.evnm-scope .evnm-mbe__more:focus {
	border-color: var(--evnm-accent, #2271b1) !important;
	color: var(--evnm-accent, #2271b1) !important;
}

.evnm-scope .evnm-mbe__more[hidden] {
	display: none;
}

@media (max-width: 480px) {
	.evnm-bp-group-events__bar {
		align-items: stretch;
	}

	.evnm-bp-group-events__create {
		margin-top: 0.5rem;
	}
}

/* Event card in the activity stream (BuddyPress and BuddyBoss).
   Tokens only, so it follows the theme, dark mode and RTL. */
.evnm-scope.evnm-activity-event {
	display: flex;
	flex-direction: column;
	margin-block: var(--evnm-space-sm, 0.5rem);
	border: 1px solid var(--evnm-border, #dcdcde);
	border-radius: var(--evnm-radius-lg, 12px);
	background: var(--evnm-surface, #fff);
	color: var(--evnm-text, #1e1e1e);
	overflow: hidden;
	text-align: start;
}

.evnm-scope .evnm-activity-event__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 1;
	max-block-size: 15rem;
	background: linear-gradient(135deg, hsl(var(--evnm-ph-hue, 220) 58% 52%), hsl(calc(var(--evnm-ph-hue, 220) + 35) 55% 42%));
}

.evnm-scope .evnm-activity-event__img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.evnm-scope .evnm-activity-event__chip {
	position: absolute;
	inset-block-start: var(--evnm-space-sm, 0.5rem);
	inset-inline-start: var(--evnm-space-sm, 0.5rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	min-inline-size: 3rem;
	padding: 0.25rem 0.5rem;
	border-radius: var(--evnm-radius, 8px);
	background: var(--evnm-surface, #fff);
	color: var(--evnm-text, #1e1e1e);
	line-height: 1.15;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}

.evnm-scope .evnm-activity-event__chip-mon {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--evnm-accent, #2271b1);
}

.evnm-scope .evnm-activity-event__chip-day {
	font-size: 1.125rem;
	font-weight: 700;
}

.evnm-scope .evnm-activity-event__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: var(--evnm-space-md, 0.75rem) var(--evnm-space-lg, 1rem);
}

.evnm-scope .evnm-activity-event__title {
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	/* !important: community themes colour every link in an activity item with an
	   id-qualified rule (#buddypress .activity-inner a) no class selector beats. */
	color: var(--evnm-text, #1e1e1e) !important;
	text-decoration: none;
}

.evnm-scope .evnm-activity-event__title:hover,
.evnm-scope .evnm-activity-event__title:focus-visible {
	color: var(--evnm-accent, #2271b1) !important;
	text-decoration: underline;
}

.evnm-scope .evnm-activity-event__meta {
	font-size: 0.875rem;
	color: var(--evnm-text-muted, #646970);
}

.evnm-scope .evnm-activity-event__excerpt {
	margin-block-start: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--evnm-text, #1e1e1e);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.evnm-scope .evnm-activity-event__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--evnm-space-md, 0.75rem);
	margin-block-start: var(--evnm-space-sm, 0.5rem);
}

.evnm-scope .evnm-activity-event__going {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--evnm-text-muted, #646970);
}

.evnm-scope .evnm-activity-event__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: var(--evnm-control-h, 40px);
	padding-inline: var(--evnm-space-lg, 1rem);
	margin-inline-start: auto;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 480px) {
	.evnm-scope .evnm-activity-event__foot {
		flex-wrap: wrap;
	}

	.evnm-scope .evnm-activity-event__cta {
		inline-size: 100%;
	}
}
