/**
 * Event-specific styles
 * Additional styling for event pages and booking forms
 */

/* Event Archive Grid Animations */
.event-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
	transform: translateY(-4px);
}

/* Event Status Badges */
.event-status-badge {
	animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Booking Form Styles */
.booking-card {
	animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Form Input Focus States */
#event-booking-form input:focus,
#event-booking-form textarea:focus,
#event-booking-form select:focus {
	border-color: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
	outline: none;
}

/* Loading State */
#event-booking-form button[type="submit"]:disabled {
	cursor: not-allowed;
	position: relative;
}

#event-booking-form button[type="submit"]:disabled::after {
	content: '';
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	to {
		transform: translateY(-50%) rotate(360deg);
	}
}

/* Event Details Layout */
.detail-item {
	/* No horizontal padding: detail rows share the content column's left edge. */
	padding: 0.75rem 0;
	transition: background-color 0.2s ease;
}

/* Price Display */
.price {
	position: relative;
}

.price::before {
	content: '';
	pointer-events: none; /* decorative; must not intercept clicks */
	position: absolute;
	bottom: -0.5rem;
	left: 50%;
	transform: translateX(-50%);
	width: 50%;
	height: 2px;
	background: linear-gradient(90deg, transparent, #fff, transparent);
}

/* Confirmation Page Animations */
.confirmation-page .rounded-xl {
	animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Filter Dropdowns */
.event-filters select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2311191F'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	background-size: 1.5rem;
	padding-right: 2.5rem;
	appearance: none;
	cursor: pointer;
}

/* Pagination Styles */
.pagination ul {
	display: flex;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.pagination li {
	margin: 0;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 0.375rem;
	color: #fff;
	text-decoration: none;
	transition: all 0.2s ease;
}

.pagination a:hover {
	background-color: #fff;
	color: #3c096c;
	border-color: #fff;
}

.pagination .current {
	background-color: #fff;
	color: #3c096c;
	border-color: #fff;
}

/* Event Hero Gradient */
.event-hero {
	background: linear-gradient(to top left, #11191f 0%, #3c096c 30%, #11191f);
	position: relative;
	overflow: hidden;
}

.event-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	opacity: 0.4;
	/*
	 * Decorative only. Without this the overlay covers the whole hero and
	 * swallows every click in it, so the breadcrumb links looked active but
	 * did nothing.
	 */
	pointer-events: none;
}

/* Social Share Buttons */
.event-share a {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-share a:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
	.event-grid {
		grid-template-columns: 1fr;
	}

	.event-hero {
		padding: 2rem 0;
	}

	.event-hero h1 {
		font-size: 2rem;
	}

	.booking-card {
		position: static;
	}

	.event-filters {
		flex-direction: column;
	}

	.event-filters .filter-group {
		width: 100%;
	}
}

/* Print Styles */
@media print {
	.booking-card,
	.event-share,
	.event-filters {
		display: none;
	}

	.event-hero {
		background: white;
		color: black;
	}

	.event-details {
		box-shadow: none;
		border: 1px solid #11191f;
	}
}

/* Accessibility Improvements */
.booking-card:focus-within {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Skip to content for screen readers */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.event-card {
		border: 2px solid currentColor;
	}

	.booking-card {
		border: 2px solid currentColor;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/*
 * Single event: force every heading white
 *
 * Headings arriving from the_content() inherit the typography plugin's dark
 * heading colour, which is invisible on this page's dark background. The
 * template's own headings already carry text-white, so this just makes the
 * whole page consistent.
 */
body.single-event h1,
body.single-event h2,
body.single-event h3,
body.single-event h4,
body.single-event h5,
body.single-event h6,
body.single-event .prose h1,
body.single-event .prose h2,
body.single-event .prose h3,
body.single-event .prose h4,
body.single-event .prose h5,
body.single-event .prose h6 {
	color: #fff !important;
}
