/* SHS Wohnungsinserate – Anzeige auf der Website.
   Schrift und Textfarbe kommen vom Theme, die Akzentfarbe vom Total-Theme
   (--wpex-accent, Orange). Zum Überschreiben im Customizer unter
   "Zusätzliches CSS":
   .shs-wi-wohnung, .shs-wi-liste { --shs-wi-akzent: #123456; } */

.shs-wi-wohnung,
.shs-wi-liste {
	--shs-wi-akzent: var(--wpex-accent, #fe5900);
	--shs-wi-linie: rgba(0, 0, 0, 0.12);
	--shs-wi-flaeche: rgba(0, 0, 0, 0.04);
}

/* ---------- Galerie ---------- */

.shs-wi-galerie {
	margin-bottom: 28px;
}

.shs-wi-haupt {
	display: block;
	background: var(--shs-wi-flaeche);
	cursor: zoom-in;
}

.shs-wi-haupt img {
	display: block;
	width: 100%;
	max-height: 560px;
	object-fit: contain;
}

.shs-wi-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.shs-wi-thumb {
	display: flex;
	flex-direction: column;
	width: 100px;
	padding: 0;
	border: 2px solid transparent;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	opacity: 0.75;
}

.shs-wi-thumb:hover,
.shs-wi-thumb:focus,
.shs-wi-thumb.is-active {
	opacity: 1;
	border-color: var(--shs-wi-akzent);
}

.shs-wi-thumb img {
	display: block;
	width: 100%;
	height: 70px;
	object-fit: cover;
}

.shs-wi-thumb span {
	padding: 3px 4px 4px;
	font-size: 0.72em;
	line-height: 1.25;
	min-height: 1.25em;
}

.shs-wi-figur {
	margin: 0;
}

.shs-wi-bildtext {
	padding: 8px 2px 0;
	font-size: 0.95em;
	font-weight: 600;
	min-height: 1.4em;
}

.shs-wi-bildtext:empty {
	display: none;
}

/* ---------- Eckdaten und Miete ---------- */

.shs-wi-eckdaten {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}

.shs-wi-eck {
	padding: 14px 16px;
	background: var(--shs-wi-flaeche);
	border-top: 3px solid var(--shs-wi-akzent);
}

.shs-wi-eck span {
	display: block;
	margin-bottom: 4px;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.shs-wi-eck strong {
	font-size: 1.1em;
	line-height: 1.35;
}

table.shs-wi-miete {
	width: 100%;
	max-width: 520px;
	margin: 0 0 28px;
	border-collapse: collapse;
}

.shs-wi-miete caption {
	padding-bottom: 8px;
	text-align: left;
	font-size: 1.2em;
	font-weight: 700;
}

.shs-wi-miete th,
.shs-wi-miete td {
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid var(--shs-wi-linie);
	background: none;
	font-weight: 400;
	text-align: left;
}

.shs-wi-miete td {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.shs-wi-miete tr.shs-wi-gesamt th,
.shs-wi-miete tr.shs-wi-gesamt td {
	border-top: 2px solid var(--shs-wi-akzent);
	border-bottom: 2px solid var(--shs-wi-akzent);
	font-size: 1.1em;
	font-weight: 700;
}

.shs-wi-beschreibung h2 {
	margin-top: 0;
}

/* ---------- Liste (Shortcode) ---------- */

.shs-wi-liste {
	display: grid;
	grid-template-columns: repeat(var(--shs-wi-spalten, 3), minmax(0, 1fr));
	gap: 24px;
}

.shs-wi-karte {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--shs-wi-linie);
	background: #fff;
}

.shs-wi-karte-bild {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--shs-wi-flaeche);
	overflow: hidden;
}

.shs-wi-karte-bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shs-wi-karte-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 18px 18px;
}

.shs-wi-karte-text h3 {
	margin: 0 0 4px;
	font-size: 1.15em;
}

.shs-wi-karte-text h3 a {
	color: inherit;
	text-decoration: none;
}

.shs-wi-karte-adresse {
	margin: 0 0 12px;
	opacity: 0.75;
}

.shs-wi-karte dl {
	margin: 0 0 16px;
}

.shs-wi-karte dl div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 5px 0;
	border-bottom: 1px solid var(--shs-wi-linie);
}

.shs-wi-karte dt,
.shs-wi-karte dd {
	margin: 0;
	font-weight: 400;
}

.shs-wi-karte dd {
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.shs-wi-karte-link {
	align-self: flex-start;
	margin-top: auto;
	padding: 8px 16px;
	background: var(--shs-wi-akzent);
	color: #fff;
	text-decoration: none;
}

.shs-wi-karte-link:hover,
.shs-wi-karte-link:focus {
	color: #fff;
	opacity: 0.88;
}

@media (max-width: 959px) {
	.shs-wi-liste {
		grid-template-columns: repeat(min(2, var(--shs-wi-spalten, 3)), minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.shs-wi-liste {
		grid-template-columns: 1fr;
	}
}

/* ---------- Großansicht ---------- */

.shs-wi-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 64px;
	background: rgba(0, 0, 0, 0.9);
	cursor: zoom-out;
}

.shs-wi-lightbox img {
	max-width: 100%;
	max-height: calc(100% - 36px);
	object-fit: contain;
	cursor: default;
}

.shs-wi-lightbox button {
	position: absolute;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.shs-wi-lightbox button:hover,
.shs-wi-lightbox button:focus {
	background: rgba(255, 255, 255, 0.3);
}

.shs-wi-lb-zu {
	top: 16px;
	right: 16px;
}

.shs-wi-lb-vor {
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
}

.shs-wi-lb-weiter {
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
}

/* ---------- Ansprechpartner, Hinweise ---------- */

.shs-wi-kontakt {
	max-width: 520px;
	margin: 0 0 28px;
	padding: 18px 20px;
	background: var(--shs-wi-flaeche);
	border-left: 4px solid var(--shs-wi-akzent);
}

.shs-wi-kontakt h2 {
	margin: 0 0 10px;
	font-size: 1.2em;
}

.shs-wi-kontakt-name {
	margin: 0 0 10px;
}

.shs-wi-kontakt ul {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.shs-wi-kontakt li {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 3px 0;
}

.shs-wi-kontakt li span {
	flex: 0 0 70px;
	opacity: 0.7;
}

.shs-wi-kontakt-hinweis {
	margin: 0;
	font-size: 0.9em;
}

.shs-wi-hinweis {
	margin: 0 0 20px;
	padding: 10px 14px;
	background: #fff3cd;
	border-left: 4px solid #d9a100;
	color: #4a3b00;
}

/* Sachbearbeiter (Autor) bei Wohnungen nie anzeigen (Total-Theme) */
.single-shs_wohnung .meta-author,
.single-shs_wohnung .author-bio,
.single-shs_wohnung .post-author {
	display: none !important;
}

.shs-wi-lb-text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	padding: 0 64px;
	color: #fff;
	text-align: center;
	font-size: 1.05em;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
	pointer-events: none;
}

/* ---------- Bewerbung ---------- */

.shs-wi-unterlagen {
	max-width: 720px;
	margin: 0 0 28px;
	padding: 20px 22px;
	border: 1px solid var(--shs-wi-linie);
	border-top: 4px solid var(--shs-wi-akzent);
}

.shs-wi-unterlagen h2 {
	margin: 0 0 10px;
	font-size: 1.2em;
}

.shs-wi-unterlagen ul {
	margin: 0 0 14px 1.2em;
}

.shs-wi-btn {
	display: inline-block;
	padding: 11px 26px;
	border: 0;
	background: var(--shs-wi-akzent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
}

.shs-wi-btn:hover,
.shs-wi-btn:focus {
	color: #fff;
	opacity: 0.88;
}

.shs-wi-bewerbung summary::-webkit-details-marker {
	display: none;
}

.shs-wi-bewerbung summary::marker {
	content: "";
}

.shs-wi-bewerbung-form {
	margin-top: 18px;
	padding: 18px 20px 20px;
	background: var(--shs-wi-flaeche);
}

.shs-wi-bewerbung-form h3 {
	margin: 18px 0 10px;
	font-size: 1.05em;
}

.shs-wi-bewerbung-form h3:first-of-type {
	margin-top: 0;
}

.shs-wi-f {
	margin-bottom: 14px;
}

.shs-wi-f label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.shs-wi-f label small {
	font-weight: 400;
	opacity: 0.75;
}

.shs-wi-f input[type=text],
.shs-wi-f input[type=email],
.shs-wi-f input[type=tel],
.shs-wi-f input[type=file],
.shs-wi-f textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.shs-wi-einwilligung label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-weight: 400;
}

.shs-wi-einwilligung input {
	margin-top: 5px;
	flex: 0 0 auto;
}

.shs-wi-hinweis-klein {
	margin: 0 0 14px;
	font-size: 0.88em;
	opacity: 0.8;
}

.shs-wi-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.shs-wi-meldung {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-left: 4px solid var(--shs-wi-akzent);
	background: #fff;
}

.shs-wi-meldung[hidden] {
	display: none;
}

.shs-wi-meldung.is-ok {
	border-left-color: #2e7d32;
}

.shs-wi-meldung.is-fehler {
	border-left-color: #c62828;
	color: #7f1d1d;
}

.shs-wi-absenden[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.shs-wi-bew-wohnung {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #fff;
	border-left: 4px solid var(--shs-wi-akzent);
}

.shs-wi-f textarea {
	min-height: 180px;
	resize: vertical;
}

.shs-wi-zaehler {
	margin-top: 3px;
	font-size: 0.8em;
	text-align: right;
	opacity: 0.7;
}

/* ---------- Bewerbungsfenster ---------- */

.shs-wi-unterlagen {
	max-width: 920px;
}

.shs-wi-unterlagen .shs-wi-btn {
	margin-top: 6px;
}

.shs-wi-vertraulich {
	margin: 12px 0;
	padding: 10px 14px;
	background: var(--shs-wi-flaeche);
	border-left: 4px solid var(--shs-wi-akzent);
	font-weight: 600;
}

.shs-wi-unterlagenliste {
	margin: 0 0 12px 1.2em;
}

html.shs-wi-dialog-offen {
	overflow: hidden;
}

.shs-wi-dialog {
	width: min(980px, 94vw);
	max-width: none;
	max-height: 92vh;
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	color: #333;
	box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4);
}

.shs-wi-dialog[open] {
	display: flex;
	flex-direction: column;
}

.shs-wi-dialog::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.shs-wi-dialog-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
	padding: 14px 28px;
	border-bottom: 3px solid var(--shs-wi-akzent);
}

.shs-wi-dialog-kopf h2 {
	margin: 0;
	font-size: 1.35em;
}

.shs-wi-dialog-zu {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.shs-wi-dialog-zu:hover,
.shs-wi-dialog-zu:focus {
	color: var(--shs-wi-akzent);
}

.shs-wi-dialog-inhalt {
	flex: 1 1 auto;
	padding: 22px 28px 26px;
	overflow-y: auto;
}

.shs-wi-dialog .shs-wi-bewerbung-form {
	margin: 0;
	padding: 0;
	background: none;
}

.shs-wi-reihe {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 18px;
}

.shs-wi-dialog .shs-wi-bew-wohnung {
	margin-bottom: 18px;
	background: var(--shs-wi-flaeche);
}

.shs-wi-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 6px 0 10px;
	padding: 26px 16px;
	border: 2px dashed rgba(0, 0, 0, 0.35);
	background: var(--shs-wi-flaeche);
	text-align: center;
	cursor: pointer;
}

.shs-wi-drop span {
	font-size: 0.9em;
	opacity: 0.8;
}

.shs-wi-drop:hover,
.shs-wi-drop:focus,
.shs-wi-drop.is-over {
	border-color: var(--shs-wi-akzent);
	outline: none;
}

.shs-wi-dateiliste {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.shs-wi-dateiliste li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 7px 4px;
	border-bottom: 1px solid var(--shs-wi-linie);
}

.shs-wi-dname {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shs-wi-dgroesse {
	flex: 0 0 auto;
	font-size: 0.85em;
	opacity: 0.7;
}

.shs-wi-dweg {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: #d63638;
	color: #fff;
	cursor: pointer;
}

.shs-wi-dweg:hover,
.shs-wi-dweg:focus {
	background: #b32d2e;
}

li.shs-wi-dsumme {
	font-size: 0.85em;
	opacity: 0.75;
	border-bottom: 0;
}

.shs-wi-aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 6px;
}

.shs-wi-btn-zweit {
	background: transparent;
	color: inherit;
	box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.shs-wi-btn-zweit:hover,
.shs-wi-btn-zweit:focus {
	color: inherit;
	opacity: 1;
	box-shadow: inset 0 0 0 2px var(--shs-wi-akzent);
}

.shs-wi-erfolg {
	padding: 24px 4px 8px;
	text-align: center;
}

.shs-wi-erfolg p {
	margin: 0 0 18px;
	font-size: 1.15em;
	font-weight: 600;
}

@media (max-width: 700px) {
	.shs-wi-reihe {
		grid-template-columns: 1fr;
	}

	.shs-wi-dialog {
		width: 100vw;
		max-height: 100vh;
		height: 100vh;
	}

	.shs-wi-dialog-kopf,
	.shs-wi-dialog-inhalt {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ---------- Breite Inseratsseiten ---------- */

body.shs-wi-breit #sidebar {
	display: none !important;
}

body.shs-wi-breit #primary,
body.shs-wi-breit .content-area {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	padding-right: 0 !important;
}

.shs-wi-unterlagen {
	max-width: none;
}

.shs-wi-kontakt {
	max-width: 720px;
}

table.shs-wi-miete {
	max-width: none;
}

@media (min-width: 960px) {
	.shs-wi-wohnung {
		display: grid;
		grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
		gap: 0 40px;
		align-items: start;
	}

	.shs-wi-wohnung > * {
		grid-column: 1 / -1;
	}

	.shs-wi-wohnung > .shs-wi-galerie {
		grid-column: 1;
	}

	.shs-wi-wohnung > .shs-wi-galerie + .shs-wi-daten {
		grid-column: 2;
		grid-row: span 1;
	}

	.shs-wi-galerie + .shs-wi-daten .shs-wi-eckdaten {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
