/*
 * Auth / signup split-layout — /opret-konto/ + /bliv-udbyder/.
 *
 * Two-column composition: a dark brand panel (value + trust) on the
 * left, a clean white form card on the right. On <=880px it collapses
 * to a single column (brand panel on top, form below). Reuses the
 * existing form-input styling from dashboards.css (.stowly-auth-form)
 * and global.css (.stowly-provider-signup__form) — this file only owns
 * the page composition + the brand panel.
 */

.stowly-auth-split {
	display: grid;
	grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
	gap: clamp(18px, 2.4vw, 32px);
	align-items: start;
	max-width: 1060px;
	margin: 4px auto 64px;
	padding: 0 16px;
}

@media (max-width: 880px) {
	.stowly-auth-split {
		grid-template-columns: 1fr;
		margin-bottom: 48px;
	}
}

/* ---------- Brand panel (left) ---------- */
.stowly-auth-split__aside {
	position: sticky;
	top: 104px;
	overflow: hidden;
	display: flex;
	color: #fff;
	background: #1b1b1d;
	border-radius: var(--stowly-radius-xl);
	padding: clamp(28px, 3.6vw, 44px);
}

@media (max-width: 880px) {
	.stowly-auth-split__aside {
		position: static;
		top: auto;
	}
}

/* Decorative brand-red glow in the lower-left corner. Purely cosmetic,
   sits behind the content. */
.stowly-auth-split__aside::after {
	content: "";
	position: absolute;
	left: -30%;
	bottom: -40%;
	width: 90%;
	height: 90%;
	background: radial-gradient(circle at center, rgba(var(--stowly-color-primary-rgb), 0.5), transparent 68%);
	opacity: 0.5;
	pointer-events: none;
}

.stowly-auth-split__aside-inner {
	position: relative;
	z-index: 1;
	align-self: center;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: clamp(22px, 2.6vw, 30px);
}

.stowly-auth-split__logo {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	text-decoration: none;
}

.stowly-auth-split__logo img {
	display: block;
	height: 28px;
	width: auto;
	/* Teal SVG → monochrome → white on the dark auth panel. */
	filter: brightness(0) invert(1);
}

.stowly-auth-split__aside-title {
	margin: 0;
	font-family: var(--stowly-font-heading);
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #fff;
}

.stowly-auth-split__aside-lead {
	margin: -10px 0 0;
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.74);
	max-width: 34ch;
}

/* Trust points */
.stowly-auth-trust {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.stowly-auth-trust li {
	display: flex;
	align-items: flex-start;
	gap: 13px;
}

.stowly-auth-trust__icon {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--stowly-color-primary);
	color: #fff;
	display: grid;
	place-items: center;
}

.stowly-auth-trust__icon svg {
	width: 17px;
	height: 17px;
}

.stowly-auth-trust__text {
	display: block;
	padding-top: 2px;
}

.stowly-auth-trust__text strong {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	color: #fff;
	line-height: 1.3;
}

.stowly-auth-trust__text span {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.72);
}

/* Economic stat rows (provider panel) */
.stowly-auth-stats {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stowly-auth-stats li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.stowly-auth-stats__num {
	font-family: var(--stowly-font-heading);
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
	line-height: 1;
	flex: 0 0 auto;
}

.stowly-auth-stats__label {
	font-size: 13px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.74);
	text-align: right;
}

.stowly-auth-stats__label strong {
	display: block;
	font-weight: 600;
	color: #fff;
}

/* ---------- Form card (right) ---------- */
.stowly-auth-split__main {
	display: flex;
}

.stowly-auth-split__form-card {
	width: 100%;
	align-self: stretch;
	background: var(--stowly-color-surface);
	border: 1px solid var(--stowly-color-line);
	border-radius: var(--stowly-radius-xl);
	padding: clamp(24px, 3vw, 40px);
	box-shadow: var(--stowly-shadow-md);
}

.stowly-auth-split__title {
	margin: 0 0 8px;
	font-family: var(--stowly-font-heading);
	font-size: clamp(1.5rem, 2.3vw, 1.95rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--stowly-color-ink);
}

.stowly-auth-split__intro {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--stowly-color-ink-soft);
}

.stowly-auth-split__footnote {
	margin: 22px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--stowly-color-line);
	font-size: 14px;
	color: var(--stowly-color-ink-soft);
}

.stowly-auth-split__footnote a {
	color: var(--stowly-color-primary);
	font-weight: 600;
	text-decoration: none;
}

.stowly-auth-split__footnote a:hover,
.stowly-auth-split__footnote a:focus {
	text-decoration: underline;
}

/* ---------- Provider form: strip its own card chrome when nested in
   the split (it becomes the card itself). Keep all field styling. ---- */
.stowly-auth-split .stowly-provider-signup {
	max-width: none;
	margin: 0;
	padding: 0;
}

.stowly-auth-split .stowly-provider-signup__form {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	gap: 20px;
}

/* The full-width submit reads better than a floating pill inside the
   narrower card column. */
.stowly-auth-split .stowly-provider-signup__footer {
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	padding-top: 18px;
}

/* The footer flips to a column in the split, so the consent label must
   not keep its row flex-basis (320px) — in a column that becomes a 320px
   height. Reset it to its natural height. */
.stowly-auth-split .stowly-provider-signup__footer .stowly-consent-check {
	flex: 0 0 auto;
}

.stowly-auth-split .stowly-provider-signup__submit {
	width: 100%;
	justify-content: center;
}

/* Tighter vertical rhythm so the whole provider form fits on screen
   without a long scroll (matches the shorter /opret-konto/ card). */
.stowly-auth-split--provider .stowly-auth-split__intro {
	margin-bottom: 18px;
}

.stowly-auth-split .stowly-provider-signup__form {
	gap: 16px;
}

.stowly-auth-split .stowly-provider-signup__section {
	padding-top: 16px;
	gap: 12px;
}

.stowly-auth-split .stowly-provider-signup__grid {
	gap: 12px 14px;
}

.stowly-auth-split .stowly-provider-signup__section--entity {
	padding: 14px 16px;
}

.stowly-auth-split .stowly-entity-type--signup {
	margin: 0;
}

.stowly-auth-split .stowly-entity-type--signup legend {
	margin-bottom: 4px;
}

.stowly-auth-split .stowly-entity-type__hint {
	margin: 0 0 10px;
}

.stowly-auth-split .stowly-entity-type__card {
	padding: 10px 14px;
}

/* ---------- Entrance motion (subtle, opt-out under reduced motion) -- */
@media (prefers-reduced-motion: no-preference) {
	.stowly-auth-split__aside,
	.stowly-auth-split__form-card {
		animation: stowly-auth-rise 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.stowly-auth-split__form-card {
		animation-delay: 0.06s;
	}

	@keyframes stowly-auth-rise {
		from {
			opacity: 0;
			transform: translateY(12px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}
