/* ==========================================================================
   SCROLL TO TOP + LESEDAUER — Glassmorphism
   Lädt global (wie scroll-to-top.js). Position: rechts unten, unter der
   Header-Glocke/Warenkorb-Spalte. z-index bewusst UNTER dem Cookie-Banner
   (der typischerweise z-index 9999+ nutzt), damit der Cookie-Einstellungen-
   Button immer anklickbar bleibt.
   ========================================================================== */

.msd-scroll-container {
	position: fixed;
	bottom: 2rem;            /* unten rechts (getauscht: Glocke sitzt jetzt darüber) */
	right: 1.5rem;
	z-index: 900;            /* unter Cookie-Banner (9999) und Header (1000) */
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	pointer-events: none;
}

/* Reading Time Info Card */
.msd-reading-time-info {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 0.9rem 1.2rem;
	background: rgba(245, 240, 232, 0.08);
	border: 1px solid rgba(201, 168, 76, 0.25);
	border-radius: 12px;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	opacity: 0;
	transform: translateY(120px) translateX(20px);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.msd-scroll-container.is-visible .msd-reading-time-info {
	opacity: 1;
	transform: translateY(0) translateX(0);
	pointer-events: auto;
}

.msd-reading-time-icon {
	font-size: 1.2rem;
	opacity: 0.8;
}

.msd-reading-time-content {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.msd-reading-time-label {
	font-size: 0.65rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(201, 168, 76, 0.7);
	font-weight: 600;
}

.msd-reading-time-value {
	font-size: 0.95rem;
	color: #f5f0e8;
	font-weight: 700;
}

/* Scroll to Top Button */
.msd-scroll-top-btn {
	width: 52px; height: 52px;
	border-radius: 50%;
	background: rgba(201, 168, 76, 0.15);
	border: 1.5px solid rgba(201, 168, 76, 0.3);
	color: #c9a84c;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transform: translateY(120px) scale(0.3);
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	box-shadow: 0 8px 32px rgba(201, 168, 76, 0.1);
	font-weight: 700;
	line-height: 1;
}

.msd-scroll-container.is-visible .msd-scroll-top-btn {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.msd-scroll-top-btn:hover {
	background: rgba(201, 168, 76, 0.25);
	border-color: rgba(201, 168, 76, 0.5);
	color: #e8c97a;
	transform: translateY(-6px) scale(1);
	box-shadow: 0 12px 48px rgba(201, 168, 76, 0.2);
}

.msd-scroll-top-btn:active {
	transform: translateY(-3px) scale(0.95);
}

.msd-scroll-top-btn.is-clicked {
	animation: msd-scroll-pulse 0.6s ease-out;
}

@keyframes msd-scroll-pulse {
	0% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.8); }
	70% { box-shadow: 0 0 0 24px rgba(201, 168, 76, 0); }
	100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}

/* Mobile adjustments — Cookie-Button sitzt links unten, Scroll rechts unten:
   genug vertikaler Abstand vom unteren Rand, damit beide frei bleiben */
@media (max-width: 768px) {
	.msd-scroll-container {
		bottom: 1.5rem;
		right: 1rem;
		gap: 0.8rem;
	}

	.msd-scroll-top-btn {
		width: 48px; height: 48px;
		font-size: 0.9rem;
	}

	.msd-reading-time-info {
		padding: 0.75rem 1rem;
	}

	.msd-reading-time-label { font-size: 0.6rem; }
	.msd-reading-time-value { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
	.msd-scroll-top-btn,
	.msd-reading-time-info {
		transition: none;
	}
	.msd-scroll-top-btn.is-clicked {
		animation: none;
	}
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] .msd-reading-time-label { color: rgba(156,125,46,.8); }
[data-theme="light"] .msd-reading-time-value { color: #16203a; }
[data-theme="light"] .msd-reading-time-info {
	background: rgba(255,255,255,.9);
	border-color: rgba(156,125,46,.3);
}
[data-theme="light"] .msd-scroll-top-btn {
	background: rgba(156,125,46,.12);
	border-color: rgba(156,125,46,.35);
	color: #9c7d2e;
}
