/* Zoo Halle – Zoo-System: Zooplan-Prototyp.
 * Farben der Website: Dunkelgrün #395c27, Orange #ac4d02, Creme #fff0d4.
 * Tierwelt-Farben kommen als --welt aus dem Markup. */

.zoo-zooplan {
	--zoom: 1;
	--gruen: #395c27;
	position: relative;
	margin: 0 0 1.5em;
	font-size: 16px;
}

/* Knöpfe gegen die Theme-Vorgaben für <button> absichern */
.zoo-zooplan button {
	min-height: 0;
	margin: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	line-height: 1.2;
}

.zoo-zp-steuerung {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.zoo-zp-filter,
.zoo-zp-zoom {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.zoo-zooplan .zoo-zp-knopf {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 2px solid var(--gruen);
	border-radius: 999px;
	background: #fff;
	color: #1d2a16;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.zoo-zooplan .zoo-zp-knopf:hover {
	background: #eef3ea;
	color: #1d2a16;
}
.zoo-zooplan .zoo-zp-knopf[aria-pressed="true"] {
	background: var(--welt, var(--gruen));
	border-color: var(--welt, var(--gruen));
	color: #fff;
}
.zoo-zooplan .zoo-zp-knopf:focus-visible {
	outline: 3px solid #ac4d02;
	outline-offset: 2px;
}
.zoo-zp-punkt {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: var(--welt);
	box-shadow: 0 0 0 1px var(--welt);
}
.zoo-zooplan .zoo-zp-zoom .zoo-zp-knopf {
	justify-content: center;
	width: 40px;
	height: 36px;
	padding: 0;
	font-size: 22px;
}

.zoo-zp-naechste {
	margin: 0 0 8px;
	font-weight: 600;
}

.zoo-zp-rahmen {
	position: relative;
	overflow: auto;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 10px;
	background: #fff;
	cursor: grab;
	scrollbar-width: thin;
	scrollbar-color: #395c27 transparent;
}
.zoo-zp-rahmen.zoo-zp-zieht {
	cursor: grabbing;
}
.zoo-zp-rahmen:focus-visible {
	outline: 3px solid #ac4d02;
	outline-offset: 2px;
}
.zoo-zp-flaeche {
	position: relative;
	width: calc(100% * var(--zoom));
	transition: width 0.2s ease;
}
.zoo-zp-flaeche img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* Marker: Tropfenform, Spitze auf dem Ort */
.zoo-zooplan .zoo-zp-marker {
	position: absolute;
	z-index: 2;
	width: 34px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	transform: translate(-50%, -100%);
	transform-origin: 50% 100%;
	transition: transform 0.15s ease;
}
.zoo-zp-marker::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 3px;
	width: 28px;
	height: 28px;
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	background: var(--welt);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
	transform: rotate(-45deg);
}
.zoo-zp-marker svg {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translate(-50%, -50%);
}
.zoo-zooplan .zoo-zp-marker:hover,
.zoo-zooplan .zoo-zp-marker[aria-expanded="true"] {
	z-index: 4;
	transform: translate(-50%, -100%) scale(1.15);
}
.zoo-zooplan .zoo-zp-marker:focus-visible {
	z-index: 4;
	outline: none;
}
.zoo-zp-marker:focus-visible::before {
	box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111;
}
.zoo-zp-unsicher::before {
	border-style: dashed;
}
/* Fütterung in der nächsten Dreiviertelstunde */
.zoo-zp-bald::after {
	content: "";
	position: absolute;
	top: 0;
	left: 1px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	box-shadow: 0 0 0 0 var(--welt);
	animation: zoo-zp-puls 1.6s ease-out infinite;
}
@keyframes zoo-zp-puls {
	0% { box-shadow: 0 0 0 0 var(--welt); opacity: 0.8; }
	100% { box-shadow: 0 0 0 16px var(--welt); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.zoo-zp-bald::after { animation: none; box-shadow: 0 0 0 4px var(--welt); opacity: 0.5; }
	.zoo-zp-flaeche, .zoo-zooplan .zoo-zp-marker { transition: none; }
}

/* Infofeld am Marker */
.zoo-zp-info {
	position: absolute;
	z-index: 6;
	box-sizing: border-box;
	width: 280px;
	max-width: 80vw;
	padding: 12px 38px 12px 14px;
	border-top: 6px solid var(--welt);
	border-radius: 10px;
	background: #fff;
	color: #1d2a16;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
	font-size: 15px;
	line-height: 1.4;
	cursor: auto;
	transform: translate(-50%, calc(-100% - 48px));
}
.zoo-zp-info[hidden] { display: none; }
.zoo-zp-info.zoo-zp-unten { transform: translate(-50%, 10px); }
.zoo-zp-info.zoo-zp-links { transform: translate(calc(-100% + 40px), calc(-100% - 48px)); }
.zoo-zp-info.zoo-zp-links.zoo-zp-unten { transform: translate(calc(-100% + 40px), 10px); }
.zoo-zp-info p { margin: 0; }
.zoo-zp-titel { font-size: 17px; font-weight: 700; }
.zoo-zp-welt { margin: 2px 0 8px !important; font-size: 13px; color: #555; }
.zoo-zp-zeiten { margin: 0 0 6px; padding-left: 1.1em; }
.zoo-zp-zeiten li { margin: 0; }
.zoo-zp-zeiten .zoo-zp-jetzt { font-weight: 700; }
.zoo-zp-zeiten .zoo-zp-vorbei { color: #6b6b6b; }
.zoo-zp-text { margin-top: 6px !important; font-size: 14px; }
.zoo-zp-flex { font-style: italic; }
.zoo-zooplan .zoo-zp-zu {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #1d2a16;
	font-size: 22px;
	cursor: pointer;
}
.zoo-zooplan .zoo-zp-zu:hover,
.zoo-zooplan .zoo-zp-zu:focus-visible {
	background: #eee;
	color: #1d2a16;
	outline: 2px solid #1d2a16;
}

.zoo-zp-vorlaeufig {
	margin: 6px 0 0;
	font-size: 13px;
	color: #555;
}

/* Liste unter dem Plan */
.zoo-zp-liste { margin-top: 12px; }
.zoo-zp-liste summary { padding: 8px 0; font-weight: 600; cursor: pointer; }
.zoo-zp-liste h4 { margin: 14px 0 6px; padding-left: 10px; border-left: 6px solid var(--welt); }
.zoo-zp-orte { margin: 0; padding: 0; list-style: none; }
.zoo-zp-orte > li { padding: 8px 0; border-bottom: 1px solid #e6e6e6; }
.zoo-zp-orte .zoo-zp-zeiten { margin: 4px 0 0; }
.zoo-zp-orte p { margin: 2px 0 0; }
.zoo-zp-orte .zoo-zp-text { margin-top: 4px; font-size: 15px; }
.zoo-zp-nr { font-size: 14px; color: #555; }

.zoo-zp-aus { display: none !important; }

@media (max-width: 700px) {
	.zoo-zooplan .zoo-zp-knopf { font-size: 14px; padding: 5px 10px; }
}

/* Touch: Der Plan verschiebt sich nur waagerecht. Senkrechtes Wischen scrollt
 * die Seite, so bleibt niemand im Plan „hängen“. Volle Höhe statt eigenem
 * senkrechten Scrollbereich. */
@media (pointer: coarse) {
	.zoo-zp-rahmen {
		aspect-ratio: auto !important;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		cursor: auto;
	}
}

/* Schmal oder Touch: Infofeld als Leiste unten am Bildschirm statt am Marker,
 * damit es nie am Rand des Plans abgeschnitten wird. Liegt über den
 * Schnellzugriff-Knöpfen der Website. */
@media (max-width: 700px), (pointer: coarse) {
	.zoo-zp-info,
	.zoo-zp-info.zoo-zp-unten,
	.zoo-zp-info.zoo-zp-links,
	.zoo-zp-info.zoo-zp-links.zoo-zp-unten {
		position: fixed;
		top: auto !important;
		right: 12px;
		bottom: 12px;
		left: 12px !important;
		z-index: 100002;
		width: auto;
		max-width: 560px;
		margin: 0 auto;
		transform: none;
		box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.35);
	}
}
