/* kaleidos:events – Frontend (Shortcode & Detail Page) */

.ke-month-heading {
	margin-top: 1em;
	margin-bottom: 1em;
}

.ke-month-group {
	margin-bottom: 20px;
}

.ke-event-card {
	border: 1px solid #ddd;
	padding: 15px;
	margin-bottom: 15px;
	border-radius: 4px;
	background: #fff;
}

.ke-event-card-title-link {
	text-decoration: none;
	color: inherit;
}

.ke-event-card-info>div {
	margin-bottom: 4px;
}

.ke-event-card-more {
	display: inline-block;
	margin-top: 8px;
	text-decoration: underline;
}

.ke-event-single-layout-wrapper {
	display: flex;
	flex-direction: row;
	gap: 30px;
	align-items: flex-start;
}

.ke-event-meta-info {
	flex: 0 0 35%;
}

.ke-event-image-content-wrapper {
	flex: 1 1 auto;
	min-width: 0;
}

.ke-event-meta-info>div {
	margin-bottom: 4px;
}

.ke-event-meta-info>div:last-child {
	margin-bottom: 0;
}

.ke-meta-row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

.ke-meta-icon {
	margin-right: 8px;
	margin-top: 2px;
	flex-shrink: 0;
}

.ke-meta-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
}

.ke-meta-text {
	flex-grow: 1;
}

.ke-meta-label {
	font-weight: 700;
}

.ke-event-cat-link {
	text-decoration: underline;
	color: inherit;
}

.ke-event-cat-list {
	list-style: none;
	margin: 0;
	padding: 0 !important;
	display: inline;
}

.ke-event-cat-item {
	display: inline;
	margin: 0 4px 0 0;
	padding: 0;
}

.ke-spaces-wrapper {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
}

@media (max-width: 1024px) {
	.ke-event-single-layout-wrapper {
		flex-direction: column;
	}

	.ke-event-meta-info,
	.ke-event-image-content-wrapper {
		flex: 1 1 auto;
		width: 100%;
	}

	.ke-event-meta-info {
		flex-basis: 100%;
	}
}

.ke-registration-wrapper {
	margin-top: 20px;
}

.ke-nobooking-info {
	padding: 10px 15px;
	background: #fff3cd;
	border: 1px solid #ffeeba;
	border-radius: 3px;
	margin-bottom: 15px;
}

.ke-form-row {
	display: flex;
	gap: 20px;
	margin-bottom: 10px;
}

.ke-form-col-50 {
	width: 50%;
}

.ke-form-group {
	margin-bottom: 15px;
}

.ke-form-group-sm {
	margin-bottom: 10px;
}

.ke-form-divider {
	margin: 20px 0;
}

.ke-input-full {
	width: 100%;
}

.ke-select-seats {
	width: 100px;
}

.ke-copy-checkbox-label {
	cursor: pointer;
	display: flex;
	align-items: flex-start;
	gap: 5px;
}

.ke-copy-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.ke-copy-checkbox-text {
	flex: 1;
	min-width: 0;
}

.ke-seat-block {
	margin-bottom: 10px;
	gap: 10px;
    flex-direction: column;
    display: flex;
}

.ke-seat-block strong {
	font-size: 14px;
}

.ke-seat-title {
	margin-bottom: 0;
	line-height: 1;
}

.ke-seat-row {
	display: flex;
	gap: 20px;
}

.ke-input-seat {
	width: 48%;
}

.ke-consent-row {
	margin-top: 10px;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 5px;
}

.ke-consent-row--first {
	margin-top: 20px;
}

.ke-consent-row input {
	margin-top: 3px;
	flex-shrink: 0;
}

.ke-consent-label,
.ke-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 5px;
}

.ke-consent-label input[type="checkbox"],
.ke-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.ke-consent-text {
	font-size: 14px;
	line-height: 1.4;
	flex: 1;
	min-width: 0;
}

.ke-checkbox-text {
	flex: 1;
	min-width: 0;
}

.ke-seats-hint {
	margin-left: 5px;
}

.ke-submit-btn {
	margin-top: 20px;
	padding: 10px 20px;
	background: #28a745;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	opacity: 0.5;
	cursor: not-allowed;
}

.ke-submit-btn:not(:disabled) {
	opacity: 1;
	cursor: pointer;
}

.ke-honeypot-field {
	position: absolute;
	left: -9999px;
}

.ke-frontend-filter {
	--ke-filter-control-size: 36px;
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	display: flex;
	flex-wrap: nowrap;
	align-items: end;
	gap: 15px;
}

.ke-filter-item {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	flex: 1 1 0;
	width: 100%;
	min-width: 0;
}

.ke-frontend-filter label {
	display: inline-flex;
	align-items: center;
	font-weight: bold;
	margin-right: 0;
	margin-bottom: 0;
}

.ke-filter-label-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 6px;
}

.ke-filter-label-icon .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.ke-filter-label-icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.ke-frontend-filter select {
	padding: 5px;
	border-radius: 3px;
	border: 1px solid #ccc;
	max-width: none;
	width: 100%;
	height: var(--ke-filter-control-size);
}

.ke-filter-item--reset {
	flex: 0 0 auto;
	width: auto;
	align-self: end;
}

.ke-filter-item--toggle {
	display: none; /* nur in Mobile (gestapelt) sichtbar */
}

.ke-filter-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ke-filter-control-size);
	height: var(--ke-filter-control-size);
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	color: inherit;
	text-decoration: none !important;
}

.ke-filter-reset .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.ke-filter-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--ke-filter-control-size);
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	color: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
}

.ke-filter-toggle .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	margin-right: 6px;
}

.ke-filter-toggle:hover {
	background: #f7f7f7;
}

.ke-filter-toggle:focus {
	outline: 2px solid rgba(0, 0, 0, 0.25);
	outline-offset: 2px;
}

.ke-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ke-pagination {
	margin-top: 30px;
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
	justify-content: center;
}

.ke-pagination a.page-numbers,
.ke-pagination span.page-numbers {
	text-decoration: none;
	color: inherit;
}

.ke-pagination span.current {
	font-weight: bold;
	text-decoration: underline;
}

.ke-form-msg {
	margin-top: 20px;
	margin-bottom: 10px;
}

.ke-form-msg .ke-msg-success {
	color: green;
	padding: 15px;
	background: #e6ffe6;
	border: 1px solid green;
	margin-bottom: 10px;
}

.ke-form-msg .ke-msg-error {
	color: red;
	padding: 15px;
	background: #ffe6e6;
	border: 1px solid red;
	margin-bottom: 10px;
}

/* Event card body: thumbnail + info side by side */
.ke-event-card-body {
	display: flex;
	flex-direction: row;
	gap: 15px;
	align-items: center;
}

.ke-event-card-thumbnail {
	flex-shrink: 0;
	max-width: 200px;
}

.ke-event-card-thumbnail a {
	display: block;
}

.ke-event-card-img {
	display: block;
	width: 100%;
	max-width: 200px;
	height: auto;
}

.ke-event-card-info {
	flex: 1;
	min-width: 0;
}

.ke-event-featured-image {
	margin-bottom: 20px;
}

.ke-required-hint {
	margin-top: 1em !important;
	margin-bottom: 0 !important;
	small {
		font-size: 14px;
	}
}

.ke-event-detail-img {
	display: block;
	width: 100%;
	height: auto;
}

/* Mobile: event card thumbnail takes full width */
@media (max-width: 600px) {
	.ke-event-card-body {
		flex-direction: column;
	}

	.ke-event-card-thumbnail {
		max-width: 100%;
	}

	.ke-event-card-img {
		max-width: 100%;
	}

	/* Mobile: engerer Gap für Formular-/Sitzplätze */
	.ke-form-row {
		gap: 5px;
	}

	.ke-seat-row {
		gap: 5px;
	}
}

@media (max-width: 600px) {
	/* Filter: gestapelt/akkordeonartig */
	.ke-frontend-filter {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-end;
	}
	.ke-filter-item {
		align-items: stretch;
	}

	/* Toggle Button (links) */
	.ke-filter-item--toggle {
		display: block;
		order: 0;
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	/* Reset Button (rechts) */
	.ke-filter-item--reset {
		order: 1;
		flex: 0 0 auto;
		width: auto;
		align-self: stretch;
	}

	/* Filter-Items unterhalb des Toggles */
	.ke-filter-item:not(.ke-filter-item--toggle):not(.ke-filter-item--reset) {
		order: 2;
		flex: 0 0 100%;
		width: 100%;
	}

	/* Collapsed: Filter ausblenden, nur Toggle + Reset sichtbar */
	.ke-filter--collapsed .ke-filter-item:not(.ke-filter-item--toggle):not(.ke-filter-item--reset) {
		display: none;
	}

	/* Open: Filter wieder anzeigen */
	.ke-filter--open .ke-filter-item:not(.ke-filter-item--toggle):not(.ke-filter-item--reset) {
		display: flex;
	}

	/* Select-Felder: 100% Breite */
	.ke-frontend-filter select {
		max-width: 100%;
		width: 100%;
	}
}