/* Event Kalender – Frontend & Admin Styles */

.ek-calendar,
.ek-event-list,
.ek-single-meta,
.ek-registration-block {
	--ek-primary: #2271b1;
	--ek-border: #e2e4e7;
	--ek-bg-muted: #f6f7f7;
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.ek-calendar *, .ek-event-list *, .ek-single-meta *, .ek-registration-block * {
	box-sizing: border-box;
}

/* Filter bar */
.ek-filter-bar {
	margin: 0 0 16px;
}
.ek-filter-bar select {
	padding: 6px 10px;
	border: 1px solid var(--ek-border);
	border-radius: 4px;
}

/* Calendar header */
.ek-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.ek-month-title {
	margin: 0;
	font-size: 1.3em;
	text-transform: capitalize;
}
.ek-nav-btn {
	text-decoration: none;
	padding: 6px 12px;
	border: 1px solid var(--ek-border);
	border-radius: 4px;
	color: inherit;
}
.ek-nav-btn:hover {
	background: var(--ek-bg-muted);
}

/* Calendar grid */
.ek-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: var(--ek-border);
	border: 1px solid var(--ek-border);
}
.ek-weekday {
	background: var(--ek-bg-muted);
	padding: 8px 6px;
	font-weight: 600;
	text-align: center;
	font-size: 0.85em;
}
.ek-day-cell {
	background: #fff;
	min-height: 90px;
	padding: 6px;
	position: relative;
	overflow: hidden;
}
.ek-day-cell.ek-outside-month {
	background: #fafafa;
	color: #b5b5b5;
}
.ek-day-cell.ek-today {
	background: #eef6fc;
}
.ek-day-number {
	display: block;
	font-size: 0.85em;
	font-weight: 600;
	margin-bottom: 4px;
}
.ek-day-event {
	display: block;
	font-size: 0.78em;
	padding: 2px 4px;
	margin-bottom: 2px;
	background: var(--ek-bg-muted);
	border-left: 3px solid var(--ek-primary);
	border-radius: 2px;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ek-day-event:hover {
	background: #eaeaea;
}
.ek-event-time {
	font-weight: 600;
	margin-right: 3px;
}
.ek-more-events {
	display: block;
	font-size: 0.72em;
	color: #757575;
	margin-top: 2px;
}

@media (max-width: 600px) {
	.ek-calendar-grid { grid-template-columns: repeat(7, minmax(0,1fr)); }
	.ek-day-cell { min-height: 60px; padding: 3px; }
	.ek-day-event { font-size: 0.68em; }
}

/* List view */
.ek-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ek-list-item {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--ek-border);
	border-left: 3px solid var(--ek-primary);
	padding-left: 12px;
}
.ek-list-thumb img {
	width: 96px;
	height: 72px;
	object-fit: cover;
	border-radius: 4px;
}
.ek-list-content {
	flex: 1;
}
.ek-list-date {
	font-size: 0.85em;
	color: #666;
	margin-bottom: 2px;
}
.ek-badge-recurring {
	display: inline-block;
	font-size: 0.75em;
	background: var(--ek-bg-muted);
	border-radius: 3px;
	padding: 1px 6px;
	margin-left: 6px;
}
.ek-list-title {
	display: block;
	font-size: 1.1em;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	margin-bottom: 2px;
}
.ek-list-title:hover {
	text-decoration: underline;
}
.ek-list-location {
	font-size: 0.9em;
	color: #666;
}
.ek-no-events {
	color: #757575;
	font-style: italic;
}

/* Map */
.ek-map {
	width: 100%;
	border-radius: 6px;
	margin: 16px 0;
	background: var(--ek-bg-muted);
}
/* Eigenes Marker-Icon als klassischer Pin (Tropfenform mit rundem Bild-Kopf) */
.ek-pin-wrapper {
	background: transparent;
	border: none;
}
.ek-pin {
	position: relative;
	box-sizing: border-box;
	background: #fff;
	border: 3px solid var(--ek-primary, #2271b1);
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}
.ek-pin-image {
	position: absolute;
	top: 8%;
	left: 8%;
	width: 84%;
	height: 84%;
	border-radius: 50%;
	background-color: transparent;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: rotate(45deg);
}

/* Single event meta */
.ek-single-meta {
	margin-bottom: 24px;
	padding: 16px 18px;
	background: var(--ek-bg-muted);
	border-radius: 6px;
}
.ek-meta-list {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
}
.ek-meta-list li {
	margin-bottom: 6px;
}
.ek-next-dates ul {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ek-next-dates li a {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--ek-border);
	border-radius: 20px;
	text-decoration: none;
	color: inherit;
	font-size: 0.85em;
	background: #fff;
}
.ek-next-dates li a.ek-current-date {
	background: var(--ek-primary);
	border-color: var(--ek-primary);
	color: #fff;
}

/* Registration form */
.ek-registration-block {
	margin-top: 28px;
	padding: 18px 20px;
	border: 1px solid var(--ek-border);
	border-radius: 6px;
}
.ek-registration-block h3 {
	margin-top: 0;
}
.ek-registration-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}
.ek-registration-form input[type="text"],
.ek-registration-form input[type="email"],
.ek-registration-form input[type="number"] {
	width: 100%;
	max-width: 360px;
	padding: 8px 10px;
	border: 1px solid var(--ek-border);
	border-radius: 4px;
	font-weight: 400;
}
.ek-submit-btn {
	background: var(--ek-primary);
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
}
.ek-submit-btn:hover {
	opacity: 0.9;
}
.ek-submit-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}
.ek-form-message {
	margin-top: 10px;
	font-weight: 600;
}
.ek-form-message.success { color: #1a7f37; }
.ek-form-message.error { color: #d63638; }
.ek-sold-out {
	color: #d63638;
	font-weight: 600;
}
.ek-seats-remaining {
	font-weight: 600;
	color: #1a7f37;
}

/* Archive view switch */
.ek-view-switch {
	margin-bottom: 18px;
}
.ek-view-switch a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--ek-border);
	text-decoration: none;
	color: inherit;
}
.ek-view-switch a:first-child { border-radius: 4px 0 0 4px; }
.ek-view-switch a:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.ek-view-switch a.active {
	background: var(--ek-primary);
	border-color: var(--ek-primary);
	color: #fff;
}

.ek-calendar.ek-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Admin meta boxes */
.ek-form-table th { width: 160px; }
.ek-recurrence-detail { display: none; }
