/*
 * MyEstate-Dashboard: Tabs und Druckansicht.
 *
 * Alles andere am Dashboard liegt im SCSS der Seite
 * (fileadmin/scss/components/_ownerarea.scss). Hier steht nur, was an der
 * Extension hängt: die scriptlosen Tabs, deren Markup aus dem Fluid-Template
 * kommt, und die Druckregeln, die ohne das Template keinen Sinn ergeben.
 *
 * Schriften und Farben folgen der Seite: Raleway für Überschriften, Lexend für
 * Fließtext, #2f2f2f für Überschriften, #585858 für Text.
 */

/* ---------------------------------------------------------------- Tabs ---- */

.webx-owner-tabradio {
	/* Nicht display:none - das nähme der Tastatur den Zugriff. */
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.webx-owner-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 36px 0 20px;
	border-bottom: 1px solid #e2e2e2;
}

.webx-owner-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: -1px;
	padding: 0 0 10px;
	border-bottom: 2px solid transparent;
	color: #585858;
	font-family: Raleway, Lexend, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
}

.webx-owner-tab-count {
	padding: 1px 7px;
	background: #ebebea;
	color: #2f2f2f;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
}

/* Der Fokus sitzt auf dem versteckten Radio, sichtbar sein muss sein Label. */
#webxOwnerTabSelling:focus-visible ~ .webx-owner-tablist label[for="webxOwnerTabSelling"],
#webxOwnerTabBought:focus-visible ~ .webx-owner-tablist label[for="webxOwnerTabBought"] {
	outline: 2px solid #2f2f2f;
	outline-offset: 3px;
}

.webx-owner-tabpanel {
	display: none;
}

#webxOwnerTabSelling:checked ~ .webx-owner-tabpanel--selling,
#webxOwnerTabBought:checked ~ .webx-owner-tabpanel--bought {
	display: block;
}

#webxOwnerTabSelling:checked ~ .webx-owner-tablist label[for="webxOwnerTabSelling"],
#webxOwnerTabBought:checked ~ .webx-owner-tablist label[for="webxOwnerTabBought"] {
	border-bottom-color: #2f2f2f;
	color: #2f2f2f;
}

/* Die Panel-Überschrift wiederholt am Bildschirm nur das Tab-Label. */
.webx-owner-headline--print {
	display: none;
}

/* ------------------------------------------------------------- Aktionen ---- */

.webx-owner-actions {
	margin: 0 0 8px;
	text-align: right;
}

.webx-owner-print {
	padding: 6px 16px;
	border: 1px solid #2f2f2f;
	background: transparent;
	color: #2f2f2f;
	font-family: Raleway, Lexend, Arial, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
}

.webx-owner-print:hover,
.webx-owner-print:focus {
	background: #2f2f2f;
	color: #fff;
}

/* ------------------------------------------------- Zugangslink anfordern ---- */

/*
 * Das Formular auf /services/my-estate/magic-link/.
 *
 * Das Eingabefeld selbst bleibt der allgemeinen Formularregel der Seite
 * überlassen (weiss, randlos, 60px hoch) - hier steht nur das Drumherum, damit
 * die eine Zeile nicht allein auf einer leeren Seite steht.
 */

.webx-owner-linkrequest {
	padding-top: 40px;
	padding-bottom: 60px;
}

.webx-owner-linkrequest-card {
	max-width: 520px;
	margin: 0 auto;
	padding: 36px 32px;
	background: #ebebea;
	text-align: center;
}

.webx-owner-linkrequest .webx-owner-headline {
	margin: 0 0 12px;
}

.webx-owner-linkrequest-text {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.6;
}

.webx-owner-form {
	text-align: left;
}

.webx-owner-form-label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.webx-owner-form-submit {
	width: 100%;
	margin-top: 16px;
	padding: 15px 24px;
	border: 1px solid #2f2f2f;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------- Druck ---- */

@media print {
	@page {
		margin: 12mm 14mm;
	}

	/* Statt Kopf, Navigation und Fuß einzeln zu adressieren: alles unsichtbar,
	   das Dashboard wieder sichtbar. Überlebt jede Änderung am Seitengerüst. */
	body * {
		visibility: hidden;
	}

	.webx-owner,
	.webx-owner * {
		visibility: visible;
	}

	.webx-owner {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
		color: #585858;
		font-family: Lexend, Arial, sans-serif;
		font-size: 9.5pt;
		line-height: 1.4;
	}

	/* Bedienung gehört nicht ins Dokument. */
	.webx-owner-actions,
	.webx-owner-session,
	.webx-owner-tablist {
		display: none !important;
	}

	/* Im PDF stehen beide Seiten untereinander - ein zugeklapptes Tab wäre im
	   Ausdruck schlicht verlorene Information. */
	.webx-owner-tabpanel {
		display: block !important;
	}

	.webx-owner-headline--print {
		display: block;
	}

	.webx-owner-greeting {
		margin: 0 0 14px;
		font-size: 12pt;
		text-align: left;
	}

	.webx-owner-headline {
		margin: 16px 0 8px;
		color: #2f2f2f;
		font-family: Raleway, Lexend, Arial, sans-serif;
		font-size: 10pt;
		text-align: left;
		break-after: avoid;
		page-break-after: avoid;
	}

	.webx-owner-advisor {
		margin-bottom: 16px;
	}

	.webx-owner-advisor-card {
		gap: 24px;
		max-width: none;
		padding: 10px 12px;
		border: 1px solid #c9c9c7;
	}

	.webx-owner-advisor-photo img {
		width: 22mm;
	}

	.webx-owner-objects {
		gap: 10px;
	}

	.webx-owner-object {
		padding: 10px 12px;
		border: 1px solid #c9c9c7;
	}

	.webx-owner-object-head {
		gap: 12px;
		margin-bottom: 10px;
	}

	.webx-owner-object-image img {
		width: 48mm;
		height: auto;
	}

	.webx-owner-object-title {
		margin: 4px 0 6px;
		color: #2f2f2f;
		font-family: Raleway, Lexend, Arial, sans-serif;
		font-size: 12pt;
	}

	.webx-owner-object-body {
		gap: 8px;
	}

	/* Flächen weg, Linien hin: Hintergründe druckt der Browser nur, wenn der
	   Nutzer "Hintergrundgrafiken" anhakt. Die Struktur muss auch ohne stehen. */
	.webx-owner-block,
	.webx-owner-service,
	.webx-owner-tab-count {
		background: transparent !important;
	}

	.webx-owner-block {
		padding: 8px 10px;
		border: 1px solid #dcdcda;
	}

	.webx-owner-block-headline {
		margin: 0 0 6px;
		color: #2f2f2f;
		font-family: Raleway, Lexend, Arial, sans-serif;
		font-size: 8.5pt;
	}

	.webx-owner-datalist {
		column-gap: 20px;
	}

	.webx-owner-dataline {
		padding: 3px 0;
	}

	.webx-owner-service-list {
		gap: 8px;
	}

	.webx-owner-service {
		padding: 8px 10px;
		border: 1px solid #dcdcda;
	}

	.webx-owner-marketing-item,
	.webx-owner-timeline-entry {
		padding: 6px 0;
	}

	.webx-owner-object-badge {
		padding: 2px 8px;
		border: 1px solid #2f2f2f;
		background: transparent !important;
		color: #2f2f2f !important;
		font-size: 8pt;
	}

	/* Ein Objekt oder ein Block soll nicht über den Seitenwechsel zerrissen
	   werden - ein halber Besichtigungsblock auf der nächsten Seite liest sich
	   wie ein Fehler. */
	.webx-owner-object,
	.webx-owner-block,
	.webx-owner-service,
	.webx-owner-timeline-entry,
	.webx-owner-marketing-item {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.webx-owner a {
		text-decoration: none;
	}

	.webx-owner a[href]::after {
		content: "";
	}
}
