/* ============================================================
   ChurchTools Events – Overview Page (Kacheln + Kalender)
   ============================================================ */

:root {
	--ct-ov-dark:       #2E3047;
	--ct-ov-dark-2:     #57596C;
	--ct-ov-accent:     #ED6A59;
	--ct-ov-muted:      #57596C;
	--ct-ov-text:       #2E3047;
	--ct-ov-bg-panel:   #fff;
	--ct-ov-bg-soft:    #f3f3f6;
	--ct-ov-radius:     14px;
	--ct-ov-font:       'Assistant', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ct-ov,
.ct-ov * {
	font-family: var(--ct-ov-font);
}

.ct-ov {
	width: 100%;
	margin: 0;
	padding: 0;
	color: var(--ct-ov-text);
	font-family: inherit;
	position: relative;
}
.ct-ov.is-loading {
	opacity: 0.6;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
.ct-ov.is-loading::after {
	content: '';
	position: absolute;
	top: 2rem;
	left: 50%;
	transform: translateX(-50%);
	width: 30px;
	height: 30px;
	border: 3px solid #eee;
	border-top-color: var(--ct-ov-accent);
	border-radius: 50%;
	animation: ct-ov-spin 0.7s linear infinite;
	z-index: 10;
}
@keyframes ct-ov-spin {
	to { transform: translateX(-50%) rotate(360deg); }
}

/* ---------- TAB-HEADER ---------- */
.ct-ov__tabs {
	display: flex;
	background: var(--ct-ov-dark);
	border-radius: var(--ct-ov-radius) var(--ct-ov-radius) 0 0;
	padding: 0.5rem 0.75rem;
	gap: 0.25rem;
}
.ct-ov__tab {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.25rem;
	border-radius: 8px;
	color: rgba(255,255,255,0.75);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	transition: background 0.15s ease, color 0.15s ease;
}
.ct-ov__tab:hover {
	color: #fff;
	background: rgba(255,255,255,0.08);
}
.ct-ov__tab.is-active {
	background: #fff;
	color: var(--ct-ov-dark);
}

/* ---------- TOOLBAR ---------- */
.ct-ov__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0.25rem;
	flex-wrap: wrap;
}
.ct-ov__toolbar-left {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.ct-ov__toolbar-right {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
	flex-wrap: wrap;
}
.ct-ov__search,
.ct-ov__select {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: transparent;
	padding: 0.5rem 0.75rem;
	font-size: 0.95rem;
	color: var(--ct-ov-text);
	font-weight: 600;
	cursor: pointer;
	border-radius: 999px;
	transition: background 0.15s ease;
}
.ct-ov__search:hover,
.ct-ov__select:hover {
	background: var(--ct-ov-bg-soft);
}
.ct-ov__search input {
	background: transparent;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	font-size: 0.95rem;
	width: 100px;
	color: var(--ct-ov-text);
	font-weight: 500;
	padding: 0;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
}
.ct-ov__search input:focus {
	outline: 0 !important;
	box-shadow: none !important;
	border: 0 !important;
}
.ct-ov__search input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}
.ct-ov__search input::placeholder {
	color: var(--ct-ov-text);
	font-weight: 600;
}
.ct-ov__select select {
	background: transparent;
	border: 0;
	outline: 0;
	font-size: 0.95rem;
	color: var(--ct-ov-text);
	cursor: pointer;
	font-weight: 600;
	padding-right: 0.5rem;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232E3047' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat;
	background-position: right center;
	padding-right: 1.2rem;
}
.ct-ov__submit-btn {
	background: var(--ct-ov-dark);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.4rem 1rem;
	cursor: pointer;
}

/* ---------- KACHEL-GRID ---------- */
.ct-ov__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-top: 0.5rem;
}
.ct-tile {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--ct-ov-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ct-tile:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}
.ct-tile__media {
	aspect-ratio: 1.36 / 1;
	background: #eee;
	overflow: hidden;
	position: relative;
}
.ct-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ct-tile__media--placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.25rem;
	color: #fff;
}
.ct-tile__placeholder-title {
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 0.5rem;
	font-style: italic;
	text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.ct-tile__placeholder-date {
	font-size: 0.85rem;
	opacity: 0.9;
	font-weight: 600;
}
.ct-tile__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.ct-tile__title {
	font-size: 1.05rem;
	font-weight: 800;
	margin: 0;
	color: var(--ct-ov-text);
}
.ct-tile__desc {
	font-size: 0.875rem;  /* = 14px */
	color: var(--ct-ov-muted);
	margin: 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ct-tile__btn {
	align-self: flex-start;
	background: #57596C;
	color: #fff;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
	margin-top: 0.25rem;
	transition: background 0.18s ease;
}
.ct-tile:hover .ct-tile__btn {
	background: var(--ct-ov-dark);
}

/* ---------- KALENDER-NAVIGATION ---------- */
.ct-ov__cal-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.ct-ov__today-btn {
	background: var(--ct-ov-dark);
	border: 0;
	padding: 0.5rem 1.2rem;
	border-radius: 999px;
	font-size: 0.95rem;
	text-decoration: none;
	color: #fff;
	font-weight: 600;
	line-height: 1;
}
.ct-ov__today-btn:hover {
	background: var(--ct-ov-accent);
	color: #fff;
}
.ct-ov__nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: transparent;
	border: 0;
	color: var(--ct-ov-text);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.3rem;
	line-height: 1;
}
.ct-ov__nav-btn:hover {
	background: var(--ct-ov-bg-soft);
}
.ct-ov__month-label {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--ct-ov-text);
	margin-left: 0.75rem;
}
.ct-ov__kw {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ct-ov-muted);
	margin-left: 0.35rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ---------- KALENDER-MONATSANSICHT ---------- */
.ct-cal {
	background: #fff;
	border-radius: var(--ct-ov-radius);
	overflow: hidden;
	border: 1px solid #e5e6ea;
}
.ct-cal__head {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: var(--ct-ov-bg-soft);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--ct-ov-muted);
}
.ct-cal__dayname {
	padding: 0.75rem 0.5rem;
	text-align: left;
}
.ct-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}
.ct-cal__cell {
	min-height: 100px;
	padding: 0.5rem;
	border-right: 1px solid #f0f1f4;
	border-bottom: 1px solid #f0f1f4;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	background: #fff;
}
.ct-cal__cell:nth-child(7n) {
	border-right: 0;
}
.ct-cal__cell.is-out {
	background: #fafbfc;
	color: #c5c7cf;
}
.ct-cal__cell.is-weekend {
	background: #fbfcfd;
}
.ct-cal__cell.is-today {
	background: #fff5f3;
}
.ct-cal__num {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ct-ov-text);
}
.ct-cal__cell.is-out .ct-cal__num {
	color: #c5c7cf;
}
.ct-cal__cell.is-today .ct-cal__num {
	color: var(--ct-ov-accent);
	font-weight: 800;
}
.ct-cal__pill {
	background: var(--ct-pill-color, #c0c0c0);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.2rem 0.45rem;
	border-radius: 5px;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	line-height: 1.25;
	transition: opacity 0.15s ease;
}
.ct-cal__pill:hover {
	opacity: 0.85;
}
.ct-cal__pill__time {
	font-weight: 800;
}
.ct-cal__more {
	font-size: 0.7rem;
	color: var(--ct-ov-muted);
	font-weight: 500;
	padding: 0.15rem 0;
}

/* ---------- AGENDA (scrollbare Liste) ---------- */
.ct-agenda {
	margin-top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	/* Höhe = ~3 Zeilen à 90px inkl. gap, dann scrollt der Rest */
	max-height: 300px;
	overflow-y: auto;
	padding-right: 0.5rem;
	scrollbar-width: thin;
	scrollbar-color: #c5c7cf transparent;
}
.ct-agenda::-webkit-scrollbar {
	width: 6px;
}
.ct-agenda::-webkit-scrollbar-track {
	background: transparent;
}
.ct-agenda::-webkit-scrollbar-thumb {
	background: #c5c7cf;
	border-radius: 3px;
}
.ct-agenda::-webkit-scrollbar-thumb:hover {
	background: #a0a3ad;
}
.ct-agenda__row {
	display: grid;
	grid-template-columns: 90px 1fr auto auto;
	gap: 1rem;
	align-items: center;
	padding: 0.6rem 0.75rem;
	background: #fff;
	border: 1px solid #e5e6ea;
	border-radius: 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ct-agenda__row:hover {
	border-color: transparent;
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ct-agenda__time {
	background: var(--ct-agenda-color, #2E3047);
	color: #fff;
	padding: 0.8rem 0.5rem;
	border-radius: 10px;
	text-align: center;
	font-weight: 800;
	font-size: 1.05rem;
	line-height: 1;
	min-width: 80px;
}
.ct-agenda__body {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}
.ct-agenda__title {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--ct-ov-text);
}
.ct-agenda__sub {
	font-size: 0.8rem;
	color: var(--ct-ov-muted);
	font-weight: 500;
}
.ct-agenda__loc {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9rem;
	color: var(--ct-ov-text);
	font-weight: 600;
	white-space: nowrap;
}
.ct-agenda__loc svg {
	color: var(--ct-ov-accent);
	flex-shrink: 0;
}
.ct-agenda__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.35rem;
}
.ct-agenda__btn {
	background: var(--ct-ov-dark);
	color: #fff;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}
.ct-agenda__btn:hover {
	background: var(--ct-ov-accent);
	color: #fff;
}
.ct-agenda__ics {
	font-size: 0.72rem;
	color: var(--ct-ov-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	white-space: nowrap;
}
.ct-agenda__ics:hover {
	color: var(--ct-ov-text);
}

/* ---------- PAGER ---------- */
.ct-ov__pager {
	text-align: center;
	margin-top: 1.5rem;
	display: flex;
	gap: 0.3rem;
	justify-content: center;
	flex-wrap: wrap;
	align-items: center;
}
.ct-ov__pager .page-numbers {
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	text-decoration: none;
	color: var(--ct-ov-muted);
	font-size: 0.9rem;
	font-weight: 600;
	min-width: 36px;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ct-ov__pager .page-numbers.current {
	background: var(--ct-ov-dark);
	color: #fff;
}
.ct-ov__pager .page-numbers:hover {
	background: var(--ct-ov-bg-soft);
}
.ct-ov__pager-arrow {
	font-size: 1.15rem !important;
	font-weight: 700 !important;
	padding: 0.4rem 0.6rem !important;
}
.ct-ov__pager-arrow.is-disabled {
	opacity: 0.3;
	cursor: not-allowed;
}
.ct-ov__pager-arrow.is-disabled:hover {
	background: transparent !important;
}
.ct-ov__pager-ellipsis {
	color: var(--ct-ov-muted);
	cursor: default;
}
.ct-ov__pager-ellipsis:hover {
	background: transparent !important;
}

/* ---------- EMPTY ---------- */
.ct-ov__empty {
	padding: 3rem;
	text-align: center;
	color: var(--ct-ov-muted);
	background: var(--ct-ov-bg-soft);
	border-radius: var(--ct-ov-radius);
}

/* ---------- MOBILE ---------- */
@media ( max-width: 1024px ) {
	.ct-ov {
		padding: 0 0.75rem;
	}
	.ct-ov__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media ( max-width: 860px ) {
	.ct-ov__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	.ct-cal__cell {
		min-height: 72px;
		padding: 0.3rem;
	}
	.ct-cal__pill {
		font-size: 0.65rem;
		padding: 0.12rem 0.25rem 0.12rem 0.4rem;
	}
	.ct-ov__month-label {
		font-size: 1.15rem;
		margin-left: 0.4rem;
	}
	.ct-ov__toolbar {
		gap: 0.5rem;
	}
}
@media ( max-width: 640px ) {
	.ct-ov__tabs {
		padding: 0.4rem 0.5rem;
	}
	.ct-ov__tab {
		padding: 0.5rem 0.85rem;
		font-size: 0.85rem;
	}
	.ct-ov__tab span {
		display: none; /* Nur Icons auf Mobile */
	}
	.ct-ov__toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}
	.ct-ov__toolbar-left,
	.ct-ov__toolbar-right {
		margin-left: 0;
		justify-content: flex-start;
	}
	.ct-ov__toolbar-right {
		border-top: 1px solid #eceef2;
		padding-top: 0.5rem;
	}
	.ct-ov__grid {
		grid-template-columns: 1fr;
	}
	.ct-cal__head {
		font-size: 0.65rem;
	}
	.ct-cal__dayname {
		padding: 0.4rem 0.15rem;
		text-align: center;
	}
	.ct-cal__cell {
		min-height: 60px;
	}
	.ct-cal__num {
		font-size: 0.75rem;
	}
	/* Pills auf Mobile: nur farbige Punkte */
	.ct-cal__pill {
		font-size: 0;
		padding: 0;
		border-radius: 50%;
		width: 8px;
		height: 8px;
		display: inline-block;
		margin-right: 2px;
		background: var(--ct-pill-color, #c0c0c0);
		border-left: 0;
	}
	.ct-cal__pill:hover {
		background: var(--ct-pill-color, #c0c0c0);
		transform: scale(1.3);
	}
	.ct-cal__more {
		display: none;
	}
	.ct-agenda__row {
		grid-template-columns: 70px 1fr;
	}
	.ct-agenda__actions {
		grid-column: 1 / -1;
		align-items: flex-start;
		flex-direction: row;
		justify-content: space-between;
		padding-top: 0.5rem;
	}
}
@media ( max-width: 420px ) {
	.ct-ov__month-label {
		font-size: 1rem;
		width: 100%;
		margin-left: 0;
		margin-top: 0.5rem;
	}
}
