/**
 * Activity Popover Styles
 */

/* Activity Popover Backdrop */
.activity-popover-backdrop {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	z-index: 9999;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease-out;

	&.active {
		display: block;
		opacity: 1;
	}
}

/* Activity Popover */
.activity-popover {
	display: none;
	position: fixed;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	z-index: 10000;
	pointer-events: auto;
	overflow: clip;
	border-radius: 12px;
	--color-text: #fff;
	max-width: calc(100vw - 20px);

	a.link {
		--color-text: var(--color-purple-boo);
		margin-left: auto;

		&::before {
			background-color: var(--color-text);
		}

		&::after {
			content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="13.198" height="12.968" viewBox="0 0 13.198 12.968"><path id="Fleche" d="M11.761,12.968V2.48L1.139,12.871l-1-1.042L10.749,1.451H0V0H13.2V12.968Z" fill="%23e3c0f4"/></svg>');
		}

		&:hover {
			color: var(--color-text) !important;
		}
	}
}

/* Disable transition during initial positioning */
.activity-popover.popover-initial-positioning {
	transition: none;
}

.activity-popover-content {
	position: relative;
	background-color: #1a2332;
	width: calc(100vw - 40px);
	max-width: 500px;

	min-height: 400px;
	height: 100%;
	max-height: 70svh;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	border-radius: 16px;
	/* Ensure content doesn't exceed viewport */
	box-sizing: border-box;

	/* Themed visible scrollbar */
	scrollbar-width: thin;
	scrollbar-color: var(--color-purple-boo, #b19cd9) #232b3b; /* thumb color, track color */

	&::-webkit-scrollbar {
		width: 8px;
		background: #232b3b; /* track */
		border-radius: 8px;
	}
	&::-webkit-scrollbar-thumb {
		background: var(--color-purple-boo, #b19cd9); /* thumb color from theme */
		border-radius: 8px;
	}
	&::-webkit-scrollbar-thumb:hover {
		background: #c9b3e6;
	}
}

.activity-popover-close {
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(4px);
	border: none;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
	z-index: 1001;
	margin-left: auto;
	position: absolute;
	right: 8px;
	top: 8px;
}

.activity-popover-body {
	padding: 20px 16px;
	color: #fff;
}

.activity-popover-loading {
	text-align: center;
	padding: 40px 20px;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top-color: #9370db;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin: 0 auto 20px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.activity-popover-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	margin-left: 0;
}

.activity-popover-header-left {
	flex: 1;
}

.activity-popover-date-time {
	display: flex;
	align-items: flex-start;
	gap: 6px;
}

.activity-popover-icon {
	background-color: #7dd3fc; /* Default light blue, can be overridden by inline style */
	width: 12px;
	height: 12px;
	line-height: 1;
	display: inline-block;
	margin-top: 6px;
	flex-shrink: 0;
	border-radius: 50%;
}

.activity-popover-date-time-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.activity-popover-times {
	display: flex;
	align-items: center;
	gap: 5px;
}

.activity-popover-date-time-text-container {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
}

.activity-popover-date {
	color: #fff;
	font-size: var(--fz--1);
	font-weight: 400;
	line-height: 1.4;
	font-weight: bold;
}

.activity-popover-time {
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
}

.activity-popover-category-badge-container {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.activity-popover-category-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	color: #1a2332;
	white-space: nowrap;
	flex-shrink: 0;
	margin-bottom: 0;
	align-self: flex-start;
}

.activity-popover-image {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	position: relative;
	background-color: var(--color-artist);
	margin-bottom: 16px;
	order: 2;

	img,
	svg {
		&.logo-racines {
			width: 55%;
			height: auto;
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
		}
	}
}

.activity-popover-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 12px;
	color: #fff;
	line-height: 1.2;
}

.activity-popover-description {
	font-size: 14px;
	line-height: 1.5;
	color: #e0e0e0;
	margin-bottom: 16px;
}

.activity-popover-address {
	font-size: 13px;
	color: #fff;
	margin-bottom: 20px;
	line-height: 1.4;
}

.activity-popover-actions {
	text-align: right;
}

.activity-popover-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #b19cd9;
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: color 0.2s ease;
}

.activity-popover-button:hover {
	color: #c9b3e6;
}

.button-arrow {
	font-size: 18px;
	line-height: 1;
}

/* @media (max-width: 768px) and (min-width: 641px) {
	.activity-popover-content {
		width: 95vw;
		max-width: 400px;
		max-height: 75vh;
	}

	.activity-popover-body {
		padding: 20px;
	}

	.activity-popover-title {
		font-size: 20px;
	}

	.activity-popover-description {
		font-size: 14px;
	}

	.activity-popover-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.activity-popover-category-badge {
		align-self: flex-end;
	}
} */
