/* =========================================================
   MaHe LIVE Timeline – Frontend Styles
   Farben & Schriftgrößen werden über CSS-Variablen
   (siehe :root, inline ausgegeben) gesteuert.
   ========================================================= */

.mahe-timeline-wrap {
	position: relative;
	max-width: 1024px;
	margin: 40px auto;
	padding: var( --mahe-wrap-padding, 20px ) 24px;
	background: var( --mahe-bg, #ffffff );
	box-sizing: border-box;
}

.mahe-timeline-wrap * {
	box-sizing: border-box;
}

/* Vertikale Linie – einspaltig, links */
.mahe-timeline-wrap::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 30px;
	width: 4px;
	background: linear-gradient( to bottom, var( --mahe-accent, #5cb85c ), rgba(92,184,92,0.15) );
	border-radius: 4px;
}

.mahe-timeline-item {
	position: relative;
	width: 100%;
	left: 0;
	text-align: left;
	padding: 0 0 var( --mahe-gap, 24px ) 76px;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .6s ease, transform .6s ease;
}

.mahe-timeline-item.mahe-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Punkt auf der Linie */
.mahe-timeline-dot {
	position: absolute;
	top: 6px;
	left: 21px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var( --mahe-card-bg, #f4f6f5 );
	border: 4px solid var( --mahe-accent, #5cb85c );
	box-shadow: 0 0 0 4px var( --mahe-bg, #ffffff );
	z-index: 2;
}

/* Karte */
.mahe-timeline-card {
	position: relative;
	display: block;
	width: 100%;
	background: var( --mahe-card-bg, #f4f6f5 );
	border: 1px solid rgba(0,0,0,0.06);
	border-radius: 14px;
	padding: var( --mahe-card-padding, 22px ) calc( var( --mahe-card-padding, 22px ) + 4px );
	box-shadow: 0 4px 18px rgba(0,0,0,0.06);
	transition: transform .25s ease, box-shadow .25s ease;
	text-align: left;
}

.mahe-timeline-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

/* Datum / Uhrzeit Badge */
.mahe-timeline-date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var( --mahe-accent, #5cb85c );
	color: #ffffff;
	font-weight: 700;
	font-size: var( --mahe-fs-date, 13px );
	letter-spacing: .03em;
	padding: 5px 14px;
	border-radius: 30px;
	margin-bottom: 12px;
	white-space: nowrap;
}

.mahe-timeline-time {
	font-weight: 400;
	opacity: .9;
	padding-left: 6px;
	border-left: 1px solid rgba(255,255,255,0.5);
}

/* Titel */
.mahe-timeline-title {
	margin: 0 0 10px 0;
	color: var( --mahe-heading, #1c1c1c );
	font-size: var( --mahe-fs-heading, 20px );
	font-weight: 800;
	line-height: 1.3;
}

/* Bild */
.mahe-timeline-image {
	margin: 10px 0 14px 0;
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
}

.mahe-timeline-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	transition: transform .4s ease;
}

.mahe-timeline-card:hover .mahe-timeline-image img {
	transform: scale(1.03);
}

/* Inhalt */
.mahe-timeline-content {
	color: var( --mahe-text, #3a3a3a );
	font-size: var( --mahe-fs-text, 16px );
	line-height: 1.65;
}

.mahe-timeline-content p:last-child {
	margin-bottom: 0;
}

.mahe-timeline-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Link / Button */
.mahe-timeline-link {
	display: inline-block;
	margin-top: 14px;
	padding: 9px 20px;
	background: var( --mahe-accent, #5cb85c );
	color: #ffffff !important;
	font-weight: 700;
	font-size: var( --mahe-fs-text, 16px );
	text-decoration: none;
	border-radius: 8px;
	transition: filter .2s ease, transform .2s ease;
}

.mahe-timeline-link:hover {
	filter: brightness(0.92);
	transform: translateX(2px);
	color: #ffffff !important;
}

/* Löschen-Button */
.mahe-timeline-wrap button.mahe-timeline-delete {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 30px;
	height: 30px;
	min-width: 30px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	border: none;
	margin: 0;
	border-radius: 50%;
	background: rgba(0,0,0,0.08);
	color: #777;
	font-size: 20px;
	font-weight: 700;
	cursor: pointer;
	z-index: 5;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.mahe-timeline-wrap button.mahe-timeline-delete:hover {
	background: #d9534f;
	color: #ffffff;
	transform: rotate(90deg);
}

.mahe-timeline-item.mahe-deleting {
	transition: opacity .35s ease, transform .35s ease, max-height .35s ease;
	opacity: 0;
	transform: scale(0.95);
}

/* Leerer Zustand */
.mahe-timeline-empty {
	text-align: center;
	color: var( --mahe-text, #3a3a3a );
	font-size: var( --mahe-fs-text, 16px );
	padding: 40px 20px;
}

/* Archiv-Link unter der Timeline */
.mahe-timeline-archive {
	text-align: center;
	padding: 8px 76px 0 76px;
}

.mahe-timeline-archive-link {
	display: inline-block;
	padding: 11px 28px;
	background: transparent;
	color: var( --mahe-accent, #5cb85c );
	font-weight: 800;
	font-size: var( --mahe-fs-text, 16px );
	text-decoration: none;
	border: 2px solid var( --mahe-accent, #5cb85c );
	border-radius: 30px;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.mahe-timeline-archive-link:hover {
	background: var( --mahe-accent, #5cb85c );
	color: #ffffff !important;
	transform: translateY(-2px);
}

/* =========================================================
   Responsive – Mobile: kompaktere Abstände
   ========================================================= */
@media (max-width: 600px) {

	.mahe-timeline-wrap {
		padding: var( --mahe-wrap-padding, 10px ) 12px;
	}

	.mahe-timeline-wrap::before {
		display: none;
	}

	.mahe-timeline-dot {
		display: none;
	}

	.mahe-timeline-item {
		padding: 0 0 var( --mahe-gap, 14px ) 0;
	}

	.mahe-timeline-archive {
		padding: 0;
	}
}
