/**
 * Events Archive Page Styles
 *
 * Page-specific styles for events archive page (archive-events.php)
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.events-archive-header {
	background: var(--color-sand-300);
}

/* ==========================================================================
   Filter Section
   ========================================================================== */

.events-filter-section {
	position: relative;
	background: var(--color-sand-300);
}

.events-filter-form {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex-wrap: wrap;
	width: 100%;
}

.events-filter-controls {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	flex-wrap: wrap;
	flex: 1;
}

/* Filter groups */
.events-filter-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	min-width: 160px;
	margin: 0;
}

/* Sortierung: Label und Input in einer Reihe, rechts ausgerichtet */
.events-filter-group--sort {
	flex-direction: row;
	align-items: center;
	gap: var(--space-3);
	margin-left: auto;
}

/* Kategorie Label: Visuell versteckt, für Screenreader sichtbar */
.events-filter-group--category .events-filter-label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.events-filter-label {
	font-size: var(--text-size-100);
	font-weight: 600;
	color: var(--color-black);
	white-space: nowrap;
	margin: 0;
	line-height: 1;
}

/* Select Boxes: Button-Styling mit Chevron-Icon */
.events-filter-select {
	height: 44px;
	padding: 0 var(--space-4);
	border: 2px solid var(--color-black);
	border-radius: var(--radius-md);
	background: var(--color-white);
	font-size: var(--text-size-100);
	font-weight: 500;
	color: var(--color-black);
	cursor: pointer;
	transition: border-width 0.2s ease, border-color 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right var(--space-3) center;
	padding-right: calc(var(--space-4) + 16px + var(--space-2));
	line-height: 1.2;
	display: flex;
	align-items: center;
}

/* Focus-States werden global von kuladu-typography.css gehandhabt */

/* Toggle Switch (Eintritt frei) */
.events-filter-group--toggle {
	min-width: auto;
	flex-direction: row;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
}

.events-filter-toggle-label {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	cursor: pointer;
	user-select: none;
	position: relative;
	margin: 0;
}

.events-filter-toggle-text {
	font-size: var(--text-size-100);
	font-weight: 600;
	color: var(--color-black);
	white-space: nowrap;
	margin: 0;
	line-height: 1;
}

/* Custom Toggle Switch */
.events-filter-toggle-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* Toggle Switch Container */
.events-filter-toggle-switch {
	width: 40px;
	height: 24px;
	background: var(--color-white);
	border: 2px solid var(--color-black);
	border-radius: 12px;
	position: relative;
	transition: background-color 0.2s ease, border-width 0.2s ease, border-color 0.2s ease;
	display: block;
	flex-shrink: 0;
}

/* Toggle Circle (Thumb) */
.events-filter-toggle-switch::before {
	content: '';
	width: 16px;
	height: 16px;
	background: var(--color-gray-400);
	border-radius: 50%;
	position: absolute;
	left: 2px;
	top: 50%;
	transform: translateY(-50%);
	transition: all 0.2s ease;
	box-shadow: 0 1px 3px rgba(255, 255, 255, 0.15);
}

.events-filter-toggle-input:checked + .events-filter-toggle-label .events-filter-toggle-switch {
	background: var(--color-primary-300);
}

.events-filter-toggle-input:checked + .events-filter-toggle-label .events-filter-toggle-switch::before {
	left: 18px;
	background: var(--color-primary-950);
}

/* Focus-States werden global von kuladu-typography.css gehandhabt */
/* Siehe: input[role="switch"]:focus und input[role="switch"]:focus-visible */

/* Mobile: Stack filters */
@media (max-width: 767px) {
	.events-filter-form {
		flex-direction: column;
		align-items: stretch;
	}

	.events-filter-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.events-filter-group {
		min-width: 100%;
	}

	.events-filter-group--sort {
		flex-direction: column;
		align-items: stretch;
	}

	.events-filter-group--category .events-filter-label {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		clip: auto;
		white-space: normal;
	}
}

/* ==========================================================================
   No Results Message
   ========================================================================== */

.events-no-results {
	padding: var(--space-8) var(--space-6);
	background: var(--color-sand-50);
	border-radius: var(--radius-md);
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}

.events-no-results p {
	margin-bottom: var(--space-4);
}

.events-no-results p:last-child {
	margin-bottom: 0;
}

.events-no-results strong {
	color: var(--color-black);
	font-size: var(--text-size-110);
}

/* ==========================================================================
   Month Separator
   ========================================================================== */

.event-month-separator {
	margin-top: var(--space-10);
	margin-bottom: var(--space-6);
	padding-bottom: var(--space-4);
	border-bottom: 2px solid var(--color-gray-300);
}

.event-month-separator:first-child {
	margin-top: 0;
}

.event-month-title {
	color: var(--color-gray-900);
	margin: 0;
}
