/* Ergaenzungen zum Template: Galerie, Lightbox, Suche, Mobil-Header, Kontaktformular */

/* ---- Galerie (Nachbau sigplus/boxplus-Slider: 2 Reihen, spaltenweise gefuellt) ---- */
.sigplus-gallery { text-align: center; }
.gallery-grid {
	--cell-w: 108px;
	--cell-h: 154px;
	display: inline-grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(2, var(--cell-h));
	grid-auto-columns: var(--cell-w);
	row-gap: 5px;
	padding: 6px;
	margin: 0 auto;
}
.gallery-grid .gallery-item {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	outline: none;
}
.gallery-grid img { display: block; margin: 2px; border: 0; }

@media (max-width: 700px) {
	.gallery-grid {
		display: grid;
		grid-auto-flow: row;
		grid-template-rows: none;
		grid-template-columns: repeat(auto-fill, var(--cell-w));
		grid-auto-rows: var(--cell-h);
		row-gap: 5px;
		justify-content: center;
		padding: 6px 0;
	}

	/* Galerie-Uebersicht: Tabelle auf schmalen Bildschirmen mitskalieren */
	#system .content table { width: 100%; table-layout: fixed; }
	#system .content table td { padding: 5px 2px !important; }
	#system .content table img { max-width: 100%; height: auto; }
}

/* ---- Lightbox (Look von boxplus "lightsquare") ---- */
#boxplus[hidden] { display: none; }
#boxplus .boxplus-background {
	position: fixed; inset: 0;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 9999;
}
#boxplus .boxplus-dialog {
	position: fixed; left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	padding: 10px;
	background-color: rgba(255, 255, 255, 0.8);
	color: #000;
	z-index: 10000;
	transition: width .3s ease, height .3s ease;
}
#boxplus .boxplus-viewer { position: relative; overflow: hidden; background: url(../plugins/content/sigplus/engines/boxplus/popup/css/loading.png) no-repeat center center; }
#boxplus .boxplus-viewer > img { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .25s; }
#boxplus .boxplus-viewer > img.loaded { opacity: 1; }
#boxplus .boxplus-viewer > .boxplus-prev,
#boxplus .boxplus-viewer > .boxplus-next {
	position: absolute; top: 0; width: 57px; height: 100%;
	cursor: pointer;
}
#boxplus .boxplus-viewer > .boxplus-prev { left: 0; }
#boxplus .boxplus-viewer > .boxplus-next { right: 0; }
#boxplus .boxplus-viewer > .boxplus-prev:hover { background: url(../plugins/content/sigplus/engines/boxplus/popup/css/navigation.png) no-repeat -57px center; }
#boxplus .boxplus-viewer > .boxplus-next:hover { background: url(../plugins/content/sigplus/engines/boxplus/popup/css/navigation.png) no-repeat 0 center; }
#boxplus .boxplus-controls { position: relative; margin: 3px 0 0 0; text-align: left; line-height: 0; }
#boxplus .boxplus-controls > button {
	display: inline-block; width: 22px; height: 22px; margin: 2px;
	border: 0; padding: 0; cursor: pointer;
	background: transparent url(../plugins/content/sigplus/engines/boxplus/popup/css/buttons.png) no-repeat;
}
#boxplus .boxplus-controls > .boxplus-prev { background-position: -22px 0; }
#boxplus .boxplus-controls > .boxplus-next { background-position: 0 0; }
#boxplus .boxplus-controls > .boxplus-close { background-position: -88px 0; }
#boxplus .boxplus-controls > [hidden] { display: none; }
#boxplus .boxplus-counter { position: absolute; right: 2px; top: 5px; font-size: 12px; line-height: 14px; color: #444; }

/* ---- Suche (Ergebnisliste wie Warp search.js) ---- */
.searchbox .results { display: none; }
.searchbox .results.open { display: block; }
.searchbox .results li { cursor: pointer; }
.searchbox .results li.results-header,
.searchbox .results li.no-results { cursor: default; }

/* ---- Mobil-Header (ersetzt warp responsive.js) ---- */
#header-responsive { display: none; }
@media (max-width: 767px) {
	#header-responsive { display: block; }
	#header-responsive select { width: 100%; margin-bottom: 5px; }
}

/* ---- E-Mail-Adresse als Grafik (Impressum) ---- */
canvas.mail-img { display: inline-block; vertical-align: bottom; user-select: none; -webkit-user-select: none; }

/* ---- Kontaktformular ---- */
input[type='email'] { padding: 2px; }
#system form.submission fieldset > div > input[type='email'] { padding: 5px; width: 250px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
