/* ============================================================
   Marktplatz – moderne Karten-Optik
   ============================================================ */

.forabg {
	min-width: 100px;
}

.marktplatz-seitentitel {
	margin-bottom: 16px;
}

/* --- Hinweise ------------------------------------------------ */

.marktplatz-hinweis {
	padding: 14px 16px;
	background: #f6f8fa;
	border: 1px dashed #ccd4db;
	border-radius: 10px;
	color: #56636f;
}

.marktplatz-bedingungen-hinweis {
	margin-bottom: 24px;
	border-style: solid;
	background: #ffffff;
}

.marktplatz-hinweis-wichtig {
	color: #bc2a4d;
}

/* --- Sektionen ----------------------------------------------- */

.marktplatz-sektion {
	margin-bottom: 32px;
}

.marktplatz-sektion-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid #105289;
}

.marktplatz-sektion-kopf h3 {
	margin: 0;
	border-bottom: none;
	font-size: 1.25em;
	text-transform: none;
}

/* --- Kartenraster -------------------------------------------- */

.marktplatz-kartenraster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 16px;
}

.marktplatz-karte {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e2e7ec;
	border-radius: 10px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.marktplatz-karte:hover,
.marktplatz-karte:focus {
	transform: translateY(-3px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
	text-decoration: none;
}

.marktplatz-karte-bild {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eef1f4;
}

.marktplatz-karte-bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.marktplatz-karte-keinbild {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 100%;
	color: #9aa6b1;
	font-size: 0.95em;
}

.marktplatz-karte-badge,
.marktplatz-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(16, 82, 137, 0.92);
	color: #ffffff;
	font-size: 0.75em;
	line-height: 1.6;
	white-space: nowrap;
}

.marktplatz-karte-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	max-width: calc(100% - 20px);
	overflow: hidden;
	text-overflow: ellipsis;
}

.marktplatz-karte-badge-abgelaufen {
	background: rgba(188, 42, 77, 0.92);
}

.marktplatz-karte-abgelaufen .marktplatz-karte-bild img {
	opacity: 0.6;
}

.marktplatz-karte-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
	padding: 12px 14px 14px;
}

.marktplatz-karte-titel {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.35;
	color: #105289;
	border-bottom: none;
	text-transform: none;
}

.marktplatz-karte:hover .marktplatz-karte-titel {
	text-decoration: underline;
}

.marktplatz-karte-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: auto;
	font-size: 0.85em;
	color: #667687;
}

.marktplatz-karte-meta .icon {
	margin-right: 4px;
}

/* --- Zurück-Link ---------------------------------------------- */

.marktplatz-zurueck {
	margin: 10px 0;
}

.marktplatz-zurueck a {
	display: inline-block;
	font-weight: bold;
	text-decoration: none;
}

.marktplatz-zurueck a:hover {
	text-decoration: underline;
}

.marktplatz-zurueck .icon {
	margin-right: 4px;
}

/* --- Einzelansicht: Eintrag ----------------------------------- */

.marktplatz-eintrag-kopf {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.marktplatz-eintrag-titel {
	font-size: 1.4em;
	margin: 0;
}

.marktplatz-eintrag-text {
	margin-top: 8px;
}

.marktplatz-eintrag-aktionen {
	margin-top: 16px;
	text-align: right;
}

.marktplatz-kontaktinfo {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-top: 12px;
	padding: 10px 14px;
	background: #f6f8fa;
	border: 1px solid #e2e7ec;
	border-radius: 10px;
}

.marktplatz-kontaktinfo .icon {
	margin-right: 4px;
	color: #667687;
}

/* --- Einzelansicht: weitere Einträge des Users ----------------- */

.marktplatz-weitere {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e2e7ec;
}

.marktplatz-weitere-titel {
	font-weight: bold;
	margin-bottom: 8px;
}

.marktplatz-weitere-item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	text-decoration: none;
}

.marktplatz-weitere-item img {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	background: #eef1f4;
}

.marktplatz-weitere-item span {
	line-height: 1.3;
}

/* --- Einzelansicht: Bildbetrachter ----------------------------- */

.marktplatz-viewer {
	margin-top: 16px;
}

.marktplatz-viewer-buehne {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eef1f4;
	border: 1px solid #e2e7ec;
	border-radius: 12px;
	overflow: hidden;
	cursor: zoom-in;
}

.marktplatz-viewer-buehne img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.marktplatz-viewer-pfeil {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #ccd4db;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #2c3338;
	font-size: 1em;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	transition: background 0.15s ease;
}

.marktplatz-viewer-pfeil:hover {
	background: #ffffff;
}

.marktplatz-viewer-pfeil-zurueck {
	left: 12px;
}

.marktplatz-viewer-pfeil-vor {
	right: 12px;
}

.marktplatz-viewer-zaehler {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 3px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 0.85em;
}

.marktplatz-viewer-vollbild {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: 34px;
	height: 34px;
	line-height: 34px;
	text-align: center;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.55);
	color: #ffffff;
	pointer-events: none;
}

.marktplatz-viewer-thumbs {
	position: relative;
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding-bottom: 4px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
}

.marktplatz-viewer-thumbs-versteckt {
	display: none;
}

.marktplatz-viewer-thumb {
	flex: 0 0 auto;
	width: 96px;
	height: 72px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	background: #eef1f4;
	cursor: pointer;
	opacity: 0.7;
	scroll-snap-align: start;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.marktplatz-viewer-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.marktplatz-viewer-thumb:hover,
.marktplatz-viewer-thumb.aktiv {
	opacity: 1;
}

.marktplatz-viewer-thumb.aktiv {
	border-color: #105289;
}

/* --- Einzelansicht: Lightbox (Vollbild) ------------------------ */

.marktplatz-lightbox {
	width: 100vw;
	height: 100vh;
	max-width: 100vw;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	display: none;
	align-items: center;
	justify-content: center;
}

.marktplatz-lightbox[open] {
	display: flex;
}

.marktplatz-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.92);
}

.marktplatz-lightbox img {
	max-width: 94vw;
	max-height: 92vh;
	object-fit: contain;
	border-radius: 8px;
}

.marktplatz-lightbox-schliessen {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #2c3338;
	font-size: 1em;
	cursor: pointer;
	z-index: 1;
}

.marktplatz-lightbox-schliessen:hover {
	background: #ffffff;
}

.marktplatz-lightbox .marktplatz-viewer-zaehler {
	top: 26px;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
}

/* --- Einzelansicht: Kommentare --------------------------------- */

.marktplatz-kommentare {
	margin-top: 28px;
}

.marktplatz-kommentar {
	padding: 12px 14px;
	margin-bottom: 10px;
	background: #ffffff;
	border: 1px solid #e2e7ec;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.marktplatz-kommentar-kopf {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	font-size: 0.9em;
}

.marktplatz-kommentar-autor {
	font-weight: bold;
}

.marktplatz-kommentar-datum {
	color: #667687;
}

.marktplatz-kommentar-loeschen {
	margin-left: auto;
}

.marktplatz-kommentar-formular {
	margin-top: 18px;
}

.marktplatz-kommentar-formular label {
	display: block;
	margin-bottom: 6px;
	font-weight: bold;
}

.marktplatz-kommentar-formular textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 120px;
	padding: 10px;
	border: 1px solid #ccd4db;
	border-radius: 8px;
	resize: vertical;
}

.marktplatz-kommentar-formular textarea:focus {
	border-color: #105289;
	outline: none;
}

.marktplatz-kommentar-formular .error {
	margin-bottom: 8px;
}

/* --- Bilder bearbeiten (bilder_berarbeiten.html) ---------------- */

.marktplatz_eintrag_bild_kommentar_liste {
	float: left;
	width: 49%;
	clear: none;
	margin-right: 1%;
}

.marktplatz_eintrag_bild_kommentar_ueberschrift {
	margin-top: 5px;
	background-color: white;
}

.marktplatz_eintrag_bild_neues_bild {
	text-align: right;
	width: 100%;
	margin-top: 5px;
	background-color: white;
}

.marktplatz_eintrag_bild {
	width: 100%;
	height: 220px;
	margin-top: 5px;
	background-color: white;
}

.marktplatz_eintrag_bild_image {
	float: left;
	width: 200px;
	border: 1px solid transparent;
}

.marktplatz_eintrag_bild_buttons {
	text-align: right;
}

/* --- Responsive ------------------------------------------------- */

@media only screen and (max-width: 1000px) {
	.marktplatz_eintrag_bild_kommentar_liste {
		width: 100%;
		margin-right: 0;
	}
}

@media only screen and (max-width: 700px) {
	.marktplatz-kartenraster {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 10px;
	}

	.marktplatz-viewer-pfeil {
		width: 36px;
		height: 36px;
	}

	.marktplatz-viewer-thumb {
		width: 72px;
		height: 54px;
	}

	.marktplatz-lightbox img {
		border-radius: 0;
	}
}
