/* Login- und Konto-Einstieg — Split-Screen. NICHT block-scoped.
 *
 * NICHT block-scoped, und das ist der Punkt. Die Regeln greifen auf
 * `.fr-login-alpha`, egal wer das Markup ausgibt: heute der Block
 * frs/login-alpha, nach dem Umbau auf die kanonische Anmelde-Oberflaeche
 * auch WooCommerce auf /mein-konto/. Eine Quelle fuer beide Ausgaben —
 * die Vorgabe "nur eine Pflegestelle" haengt genau daran.
 *
 * Liegt bewusst NICHT im Block-Verzeichnis. `style.scoped.css` greift nur dort,
 * wo bs_get_scoped_class() auf demselben Element sitzt wie der BEM-Wurzelname —
 * WooCommerce-Markup traegt diese Klasse nicht. Ein Dateiname `global-styles.css`
 * loest das NICHT: die entsprechende Zeile in docs/hub/blockstudio/SUMMARY.md
 * §File-naming stimmt fuer diese Blockstudio-Version nicht (dort taucht
 * `global-styles` nur als WordPress-Core-Handle auf, das Blockstudio dequeued —
 * vendor/blockstudio/blockstudio/includes/classes/assets.php:198). Am Staging-Deploy
 * vom 2026-09-10 gemessen: Blockstudio erzeugt dafuer kein _dist-Artefakt und die
 * Regeln erreichen die Seite nicht. Deshalb regulaerer Theme-Enqueue, siehe
 * functions.php.
 *
 * Bis 2026-09-10 lag das hier in style.scoped.css und war ueber die
 * Scope-Klasse (`&`) an den Block gebunden. WooCommerce-Markup traegt diese
 * Klasse nicht und waere ungestylt geblieben. Siehe #302 und
 * .planning/2026-09-10-login-architektur.html.
 *
 * Zieht mit, sobald ein anderer Block die Auth-Oberflaeche besitzt.
 *
 * Das Layout der Bricks-Vorlage hat es nie in das prod-verbatim-Buendel
 * geschafft, deshalb ist es hier neu gesetzt: gleich breite Rasterhaelften
 * geben dem Foto eine volle Haelfte, ein Zeichenmass haelt das Formular
 * auf breiten Schirmen lesbar. Das Formular bestimmt die Hoehe, also
 * brauchen Passwort-Wiederherstellung und Eingeloggt-Hinweis keine
 * Variantenklassen. Eingabe-Chrom, Checkbox-Grafik und Primaerbuttons
 * bleiben bei ACSS.
 */

.fr-login-alpha {
	/* Let WooCommerce's own field rules consume the shared form tokens. */
	--wc-form-border-color: var(--base-semi-dark);
	--wc-form-border-radius: var(--btn-radius);
	--wc-form-border-width: var(--f-input-border-top-size);
	padding: 0;
	background: var(--white);
	color: var(--text-dark);
	font-family: var(--font-body);
}

.fr-login-alpha .fr-login-alpha__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: stretch;
	gap: 0;
	width: 100%;
	min-height: 75svh;
}

.fr-login-alpha .fr-login-alpha__content-wrapper {
	--f-label-size: var(--text-s);
	display: grid;
	grid-template-columns: minmax(0, 42ch);
	align-content: center;
	justify-content: center;
	gap: var(--space-m);
	min-width: 0;
	/* Percentage padding follows the panel width, leaving room for 42ch
	 * even in the 1025–1280px split-screen band. */
	padding: var(--space-xl) clamp(var(--space-s), 6%, var(--space-xl));
	background: var(--white);
	overflow-wrap: anywhere;
}

.fr-login-alpha .fr-login-alpha__content-wrapper > * {
	width: 100%;
}

.fr-login-alpha .fr-login-alpha__heading {
	font-family: var(--font-heading);
	font-size: var(--h1);
	font-weight: 600;
	color: var(--base);
	text-wrap: balance;
}

/* Use the existing form hooks instead of duplicating its field rules.
 * Explicit sizes also repair ACSS's invalid --text-m fallback values. */
.fr-login-alpha .fr-login-alpha__inner .fr-login-alpha__content-wrapper form {
	/* Outrank WooCommerce and prod alignment; the shell owns spacing. */
	text-align: left;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	gap: 0;
	--f-field-margin-bottom: var(--space-xs);
	--f-label-margin-bottom: var(--f-option-label-spacing);
	--f-input-size: var(--text-m);
	--f-input-padding-y: var(--space-xs);
	--f-input-padding-x: var(--space-s);
	/* ACSS falls back to --neutral-light (#d9d9d9, 1.4:1 on white), which misses
	 * the 3:1 that WCAG asks of a control's own boundary. --base-semi-dark sits
	 * at 7.2:1 and stays in the same blue-grey family as the heading, where
	 * --neutral (pure black) reads harsh next to it. */
	--f-light-input-border-color: var(--base-semi-dark);
}

/* Replace WC row margins and Bricks group padding with one shared rhythm.
 * Match the account paragraph reset's specificity; this sheet loads later. */
.fr-login-alpha .fr-login-alpha__inner .fr-login-alpha__content-wrapper form :is(.form-row, .form-group) {
	margin: 0 0 var(--f-field-margin-bottom);
	padding: 0;
}

/* Also outrank WC's inline-block remember-me label and block-theme margins. */
.fr-login-alpha .fr-login-alpha__inner .fr-login-alpha__content-wrapper form label {
	display: block;
	margin-bottom: var(--f-label-margin-bottom);
	color: var(--f-light-label-text-color, var(--neutral-dark));
	font-size: var(--f-label-size);
}

/* WC keeps this paragraph inside the form; the reference block places it after. */
.fr-login-alpha .fr-login-alpha__content-wrapper :is(.lost_password, form + p) {
	font-size: var(--f-label-size);
}

/* WC has no height/padding variables; bind its text fields to the same
 * tokens as the reference form. Checkbox and hidden inputs stay native. */
.woocommerce .fr-login-alpha form .form-row input.input-text {
	height: var(--f-input-height);
	padding: var(--f-input-padding-y) var(--f-input-padding-x);
	font-size: var(--f-input-size);
}

/* Reserve trailing control space without targeting an extension's injected DOM. */
.woocommerce .fr-login-alpha form .form-row input[autocomplete="username"] {
	padding-inline-end: var(--f-input-height);
}

/* Keep text clear of the native toggle and adjacent password-manager controls. */
.woocommerce .fr-login-alpha form .form-row .password-input input.input-text,
.woocommerce-account .woocommerce form .form-row .password-input input.input-text {
	padding-inline-end: calc(var(--f-input-height) + var(--space-s));
}

.fr-login-alpha form .show-password-input::after,
.woocommerce-account form .show-password-input::after {
	content: none;
}

.fr-login-alpha form .show-password-input,
.woocommerce-account form .show-password-input {
	justify-content: center;
}

.fr-login-alpha .wc-block-components-notice-banner > svg,
.woocommerce-account .wc-block-components-notice-banner > svg {
	align-self: flex-start;
	width: 24px;
	min-width: 24px;
	height: 24px;
	min-height: 24px;
}

.fr-login-alpha .fr-login-alpha__content-wrapper form button:is([type="submit"], .btn--primary) {
	width: 100%;
}

/* Stock WC submit buttons have no btn--primary class. Reuse the reference
 * recipe after excluding auth from the account reset. */
.woocommerce .fr-login-alpha form button[type="submit"] {
	background-color: var(--primary);
	color: var(--primary-ultra-light);
	padding-block: var(--btn-padding-block);
	padding-inline: var(--btn-padding-inline);
	font-size: var(--btn-font-size, var(--text-m));
	font-weight: var(--btn-font-weight);
	line-height: var(--btn-line-height);
	border: var(--btn-border-width) var(--btn-border-style) var(--primary);
	border-radius: var(--btn-radius);
}

.woocommerce .fr-login-alpha form button[type="submit"]:hover {
	background-color: var(--primary-hover);
	border-color: var(--primary-hover);
}

.fr-login-alpha .fr-login-alpha__notice {
	display: grid;
	gap: var(--space-m);
}

.fr-login-alpha .fr-login-alpha__secondary-nav {
	display: grid;
	gap: var(--space-xs);
	padding-top: var(--space-s);
	border-top: 1px solid var(--base-light);
	font-size: var(--f-label-size);
}

.fr-login-alpha .fr-login-alpha__secondary-nav p {
	margin: 0;
}

.fr-login-alpha .fr-cta-links-bravo {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs) var(--space-m);
}

.fr-login-alpha a:not(.brxe-button) {
	color: var(--base);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.fr-login-alpha a:not(.brxe-button):hover {
	color: var(--primary);
}

/* ACSS hides the real checkbox and paints its label; focus that surface. */
.fr-login-alpha :is(input:not([type="checkbox"]), button, a):focus-visible,
.fr-login-alpha label:is(:has(> input[type="checkbox"]:focus-visible), input[type="checkbox"]:focus-visible + label) {
	outline: var(--focus-width) solid var(--base);
	outline-offset: var(--focus-offset);
}

.fr-login-alpha .fr-login-alpha__media-wrapper {
	position: relative;
}

.fr-login-alpha .fr-login-alpha__media {
	position: absolute;
	inset: 0;
}

.fr-login-alpha .fr-login-alpha__media img {
	height: 100%;
	object-fit: cover;
	/* Keep the illuminated upper-left start of the mesh diagonal; wider
	 * panels crop the dark lower portion of the portrait first. The zero-gap
	 * grid makes a deliberate hard seam against the opaque white form panel. */
	object-position: left top;
}

/* Retain one breakpoint: two usable panels from 1025px, a centred card
 * below. Intrinsic card width and panel-relative padding handle the middle
 * range without extra tablet breakpoints or an empty second grid row. */
@media (min-width: 1025px) {
	.fr-login-alpha .fr-login-alpha__inner:has(> .fr-login-alpha__media-wrapper) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ponytail: hide the supporting photo on smaller screens to prioritize
 * account access; use an aspect-ratio row if mobile imagery becomes required. */
@media (max-width: 1024px) {
	.fr-login-alpha {
		background: var(--base-ultra-light);
	}

	.fr-login-alpha .fr-login-alpha__inner {
		padding: var(--space-l) var(--space-s);
	}

	.fr-login-alpha .fr-login-alpha__content-wrapper {
		place-self: center;
		width: min(100%, calc(42ch + 2 * var(--space-l)));
		padding: var(--space-l) var(--space-s);
	}

	.fr-login-alpha .fr-login-alpha__media-wrapper {
		display: none;
	}
}
