/**
 * @package SGV
 * @version 0.5.0
 * @author Sebastian Loer <kontakt@s-loer.de>
 *
 * Frontend-CSS für SGV Gutenberg-Blöcke (neue dynamische Blöcke).
 * Alte statische Blöcke (panel, button, accordion, section usw.) werden
 * ausschließlich durch die Theme-CSS (UNIK main.css) gestylt.
 */

/* ===========================================================================
   Terminkalender Block
   Basisklassen werden vom alten sgv.css (Theme) geliefert – hier vollständig
   definiert damit der Block ohne das alte Theme-CSS funktioniert.
   =========================================================================== */

.terminkalender {
	color: #6d6d6d;
	overflow: auto;
	width: 100%;
}

/* Scroll-Höhe wird per Inline-Style vom Block gesetzt (scroll_height > 0).
   Kein globaler Override mehr nötig. */

.terminkalender-item {
	padding: 15px;
	padding-bottom: 0;
	padding-top: 5px;
	border: 1px solid #dedede;
	border-bottom: 0;
}

/* main.css: border-bottom:0 auf allen Items → letztes Item schließen */
.terminkalender-item:last-child {
	border-bottom: 1px solid #dedede;
}

.terminkalender-row {
	width: 100%;
	min-height: 20px;
	clear: both;
}

.background-grey {
	background-color: #f2f2f2;
}

/* Links in Terminkalender grün wie im Original */
.terminkalender a {
	color: #1d71b8;
}
.terminkalender a:hover {
	color: #1d71b8;
	text-decoration: none;
	opacity: 1;
}

/* Innere Klassen */
.terminkalender-item .termin-gruppe {
	font-size: 12px;
	color: #6d6d6d;
	margin-top: 2px;
}

.terminkalender-item .termin-wann {
	font-size: 11px;
	color: #555;
}

.terminkalender-item .termin-beschreibung {
	margin: 4px 0;
}

.terminkalender-item .termin-wanderfuehrer {
	font-size: 12px;
	color: #6d6d6d;
	padding-top: 6px;
}

/* ICS-Icon */
.terminkalender-item .termin-ics-link img {
	width: 20px;
	height: 20px;
	opacity: 0.55;
	vertical-align: middle;
}
.terminkalender-item .termin-ics-link:hover img {
	opacity: 0.85;
}

/* Hinweis unterhalb der Terminliste */
.termin-hint {
	font-size: 12px;
	color: #888;
	margin-top: 10px;
}

/* Responsive: Header-Labels auf kleinen Bildschirmen ausblenden */
@media screen and (max-width: 460px) {
	.terminkalender-header {
		display: none;
	}
}

@media screen and (max-width: 410px) {
	.terminkalender-row div {
		text-align: left !important;
		width: 100% !important;
	}
}

/* ===========================================================================
   Terminkalender-Suche
   =========================================================================== */
.sgv-terminkalender-suche-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-bottom: 16px;
}

.sgv-terminkalender-suche-form input[type="text"] {
	flex: 1 1 200px;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
}

.sgv-terminkalender-suche-form select {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
}

.sgv-terminkalender-suche-form button[type="submit"] {
	padding: 6px 16px;
	background: #1d71b8;
	color: #fff;
	border: none;
	border-radius: 3px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out;
}
.sgv-terminkalender-suche-form button[type="submit"]:hover {
	background: #00418A;
}

/* ===========================================================================
   Hütten-Blöcke (Homert & Wiehardt Öffnungszeiten)
   Alte Snippets: <li style='list-style:none;'> – neue Blöcke: <ul><li>
   =========================================================================== */
.sgv-plugin-gutenberg-block-homert-oeffnungszeiten ul,
.sgv-plugin-gutenberg-block-wiehardt-oeffnungszeiten ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.sgv-plugin-gutenberg-block-homert-oeffnungszeiten ul li,
.sgv-plugin-gutenberg-block-wiehardt-oeffnungszeiten ul li {
	padding: 1px 0;
}

/* ===========================================================================
   iFrame DSGVO Consent-Block (neu)
   Entspricht dem alten Snippet: weißer Hintergrund, Vorschaubild optional,
   padding 16px, Button im SGV-Blau wie Bootstrap btn btn-lg
   =========================================================================== */
.sgv-iframe-dsgvo {
	margin-bottom: 16px;
}

/* Consent-Hülle – nimmt optional ein Vorschaubild als Hintergrund */
.sgv-iframe-consent {
	background-image: url(https://www.sgv-luedenscheid.de/wp-content/uploads/2018/06/osmAllowed.jpg);
	background-size: cover;
	background-position: center;
}

/* Innerer Textbereich – immer leicht transluzenter Hintergrund:
   - macht Text über Vorschaubild lesbar
   - sorgt für einheitliches Aussehen aller Block-Instanzen */
.sgv-iframe-consent-inner {
	padding: 16px;
}

.sgv-iframe-consent-title {
	margin: 0 0 10px;
	font-size: 18px;
}

.sgv-iframe-consent-text {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.6;
}

.sgv-iframe-datenschutz-link {
	color: #1d71b8;
	text-decoration: none;
}
.sgv-iframe-datenschutz-link:hover {
	text-decoration: underline;
}

.sgv-iframe-cookie-label {
	display: block;
	font-size: 14px;
	margin-bottom: 14px;
	cursor: pointer;
}

.sgv-iframe-cookie-checkbox {
	margin-right: 6px;
	vertical-align: middle;
}

/* Button: Theme-Design des UNIK-Themes (SGV Grün = #1d71b8) */
.sgv-iframe-accept-btn {
	display: inline-block;
	padding: 10px 22px;
	background-color: #1d71b8;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.4;
	transition: background-color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.sgv-iframe-accept-btn:hover {
	background-color: #00418A;
	color: #fff;
}

/* ===========================================================================
   Terminkalender-Widget (Sidebar)
   Struktur: 64px Placeholder float-left + h5.media-heading + <small> + HR
   Entspricht dem alten snippet-terminkalender-widget.php / live-Site-Sidebar.
   Fallback-Styles für h5.media-heading falls Bootstrap-Theme fehlt.
   =========================================================================== */
.sgv-terminkalender-widget-wrap h5.media-heading {
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
}

.sgv-terminkalender-widget-wrap h5.media-heading a {
	color: #919191;
	text-decoration: none;
}

.sgv-terminkalender-widget-wrap h5.media-heading a:hover {
	text-decoration: underline;
}

.sgv-terminkalender-widget-wrap small {
	font-size: 12px;
	color: #919191;
}

.sgv-terminkalender-widget-wrap hr {
	border: none;
	border-top: 1px solid #e0e0e0;
}

/* ===========================================================================
   GPX Download-Block
   =========================================================================== */
.sgv-plugin-gutenberg-block-wanderweg-gpx {
	text-align: right;
}

/* ===========================================================================
   Wanderwege-Liste Block (Terminkalender-Stil)
   =========================================================================== */

/* Karte */
.sgv-wanderwege-map-wrapper {
	padding: 2px;
	background: white;
	margin-bottom: 20px;
}

.sgv-wanderwege-map {
	z-index: 1;
	position: relative;
	width: 100%;
	height: 250px;
}

.sgv-wanderwege-map:not(:has(.sgv-iframe-consent)) {
	height: 400px;
}

/* Suche — exakt wie Terminkalender-Suche */
.sgv-wanderwege-suche {
	margin-bottom: 16px;
}

.sgv-wanderwege-suche-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.sgv-wanderwege-suche-form input[type="text"] {
	flex: 1 1 200px;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
}

.sgv-wanderwege-suche-form button[type="submit"] {
	padding: 6px 16px;
	background: #1d71b8;
	color: #fff;
	border: none;
	border-radius: 3px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out;
}

.sgv-wanderwege-suche-form button[type="submit"]:hover {
	background: #00418A;
}

/* Liste — Terminkalender-Muster: border #dedede, alternierend #f2f2f2, padding 15px (top 5px) */
.sgv-wanderwege-liste {
	color: #6d6d6d;
	width: 100%;
}

.sgv-wanderwege-item {
	padding: 15px;
	padding-top: 5px;
	border: 1px solid #dedede;
	border-bottom: 0;
	transition: background-color 0.3s ease;
}

.sgv-wanderwege-item:last-child {
	border-bottom: 1px solid #dedede;
}

.sgv-wanderwege-item.background-grey {
	background-color: #f2f2f2;
}

.sgv-wanderwege-item.highlighted {
	background-color: #dbeaf9;
	box-shadow: inset 4px 0 0 #1d71b8;
}

.sgv-wanderwege-name a {
	color: #1d71b8;
	text-decoration: none;
	font-size: 16px;
}

.sgv-wanderwege-name a:hover {
	text-decoration: none;
	opacity: 1;
}

.sgv-wanderwege-meta {
	margin-top: 4px;
	font-size: 13px;
	color: #6d6d6d;
}

.sgv-wanderwege-meta-sep {
	color: #ccc;
	margin: 0 4px;
}

.sgv-wanderwege-kategorie {
	font-weight: 500;
}

.sgv-wanderwege-beschreibung {
	margin-top: 6px;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}

/* Schwierigkeit Badges */
.sgv-wanderweg-schwierigkeit {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
}

.sgv-wanderweg-schwierigkeit-leicht {
	background-color: #27ae60;
}

.sgv-wanderweg-schwierigkeit-mittel {
	background-color: #f39c12;
}

.sgv-wanderweg-schwierigkeit-schwer {
	background-color: #e74c3c;
}

/* Pagination */
.sgv-wanderwege-pagination {
	margin-top: 16px;
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: center;
}

.sgv-wanderwege-page-link {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	color: #1d71b8;
	text-decoration: none;
	font-size: 14px;
}

.sgv-wanderwege-page-link:hover {
	background: #eef5fc;
}

.sgv-wanderwege-page-link.sgv-wanderwege-page-active {
	background: #1d71b8;
	color: #fff;
	border-color: #1d71b8;
}

/* Hinweise */
.sgv-wanderwege-hint,
.sgv-wanderwege-loading {
	text-align: center;
	padding: 20px;
	color: #666;
	font-style: italic;
}

/* Suchergebnis Highlights */
.sgv-wanderwege-liste mark {
	background-color: #fff3cd;
	padding: 0 2px;
	border-radius: 2px;
}

/* ===========================================================================
   Wanderwege-Detail
   =========================================================================== */

/* Banner — UNIK single-post Muster: Titel versteckt, nur Breadcrumbs sichtbar */
.single-post-banner {
	margin: 0 !important;
	padding: 0 !important;
	padding-bottom: 0 !important;
	background-color: #1d71b8 !important;
	color: #fff !important;
}

.single-post-banner .banner {
	display: none;
	margin-bottom: 10px;
}

.single-post-banner .page-tree,
.single-post-banner .page-tree li,
.single-post-banner .page-tree a {
	color: rgba(255, 255, 255, 0.85);
}

.single-post-banner .page-tree a:hover {
	color: #fff;
}

/* Karte */
.sgv-wanderweg-detail-map-wrap {
	position: relative;
	margin-bottom: 20px;
}

.sgv-wanderweg-detail-map {
	width: 100%;
	height: 250px;
}

.sgv-wanderweg-detail-map:not(:has(.sgv-iframe-consent)) {
	height: 400px;
}

/* Meta-Box — ergänzend zu UNIK .post-tags (wanderweg-spezifisch) */
.sgv-wanderweg-detail-meta {
	margin-top: 0;
}

.sgv-wanderweg-detail-beschreibung {
	margin-top: 20px;
	line-height: 1.7;
}

.sgv-wanderweg-detail-beschreibung h2 {
	margin-bottom: 10px;
}

/* Aktionen (GPX + Quelle) — nutzt UNIK .btn .btn-lg .btn-default */
.sgv-wanderweg-detail-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

/* ===========================================================================
   OSM Karten-Consent Overlay (öffentliche Seiten)
   Nutzt die DSGVO-Block CSS-Klassen für einheitliches Design.
   Im Map-Container absolute positioniert.
   =========================================================================== */
.sgv-wanderwege-map .sgv-iframe-consent,
.sgv-wanderweg-detail-map-wrap .sgv-iframe-consent {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Statische Marker Icons (Leaflet DivIcon) */
.sgv-static-marker-icon {
	background: none !important;
	border: none !important;
}

/* ===========================================================================
   Leaflet Container Reset
   Verhindert Theme/Bootstrap-CSS Konflikte mit Leaflet-Elementen.
   =========================================================================== */

.sgv-wanderwege-map .leaflet-container,
.sgv-wanderweg-detail-map-wrap .leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	line-height: 1.5;
}

.sgv-wanderwege-map .leaflet-popup-content-wrapper,
.sgv-wanderweg-detail-map-wrap .leaflet-popup-content-wrapper {
	font-size: 14px;
	line-height: 1.4;
}

.sgv-wanderwege-map .leaflet-popup-content,
.sgv-wanderweg-detail-map-wrap .leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	font-size: 14px;
}

.sgv-wanderwege-map .leaflet-control-attribution,
.sgv-wanderweg-detail-map-wrap .leaflet-control-attribution {
	font-size: 11px;
}

.sgv-wanderwege-map .leaflet-bar a,
.sgv-wanderweg-detail-map-wrap .leaflet-bar a,
.sgv-wanderwege-map .leaflet-control a,
.sgv-wanderweg-detail-map-wrap .leaflet-control a {
	text-decoration: none !important;
}

.sgv-wanderwege-map .leaflet-control-zoom a,
.sgv-wanderweg-detail-map-wrap .leaflet-control-zoom a {
	font-size: 18px;
	width: 30px;
	height: 30px;
	line-height: 30px;
}

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 768px) {
	.sgv-wanderwege-map {
		height: 250px !important;
	}

	.sgv-wanderweg-detail-map {
		height: 250px !important;
	}

	.sgv-wanderwege-suche-form {
		flex-direction: column;
	}

	.sgv-wanderweg-detail-actions {
		flex-direction: column;
	}

	.sgv-wanderwege-meta {
		font-size: 12px;
	}
}

