/* Login and registration. Loaded only on those two screens. */

.sozemy-auth-page {
	background: var(--sozemy-surface);
}

.sozemy-auth {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: clamp(1rem, 5vh, 3.5rem) 1rem;
	font-family: var(--font);
	color: var(--sozemy-text);
}

.sozemy-auth__card {
	width: 100%;
	max-width: 460px;
	background: var(--sozemy-background);
	border: 1px solid var(--sozemy-border);
	border-radius: var(--radius-medium);
	box-shadow: var(--shadow-card);
	padding: 2rem 2rem 1.75rem;
}

.sozemy-auth__logo {
	display: flex;
	justify-content: center;
	margin-bottom: 1.5rem;
	font-weight: 700;
	font-size: 1.375rem;
	color: var(--sozemy-text);
	text-decoration: none;
}

.sozemy-auth__logo img {
	display: block;
	height: 36px;
	width: auto;
}

.sozemy-auth__panel[hidden],
.sozemy-auth [hidden] {
	display: none !important;
}

.sozemy-auth__title {
	margin: 0;
	text-align: center;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
	outline: none;
}

.sozemy-auth__lead {
	margin: 0.375rem 0 1.5rem;
	text-align: center;
	color: var(--sozemy-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.sozemy-auth__text {
	margin: 0 0 1.5rem;
	text-align: center;
	color: var(--sozemy-muted);
	font-size: 0.9375rem;
	line-height: 1.55;
}

/* Step indicator */

.sozemy-steps {
	display: flex;
	justify-content: center;
	gap: 0.5rem 1.25rem;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--sozemy-muted);
}

.sozemy-steps li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.sozemy-steps__num {
	display: inline-grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	border: 1px solid var(--sozemy-border);
	background: var(--sozemy-background);
	font-weight: 600;
	font-size: 0.75rem;
}

.sozemy-steps li.is-current {
	color: var(--sozemy-text);
	font-weight: 600;
}

.sozemy-steps li.is-current .sozemy-steps__num,
.sozemy-steps li.is-done .sozemy-steps__num {
	background: var(--sozemy-primary);
	border-color: var(--sozemy-primary);
	color: #fff;
}

/* Choice cards (Kund/Säljare, Privatperson/Företag) */

.sozemy-choices {
	display: grid;
	gap: 0.75rem;
	margin: 0 0 0.25rem;
	padding: 0;
	border: 0;
	min-width: 0;
}

.sozemy-choice {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 1rem 1rem 1rem 1.125rem;
	border: 1.5px solid var(--sozemy-border);
	border-radius: var(--radius-small);
	background: var(--sozemy-background);
	cursor: pointer;
	transition: border-color var(--ease), background-color var(--ease);
}

.sozemy-choice:hover {
	border-color: #cfd3cc;
}

.sozemy-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.sozemy-choice:has(input:checked) {
	border-color: var(--sozemy-primary);
	background: var(--sozemy-primary-light);
}

.sozemy-choice:has(input:focus-visible) {
	outline: 2px solid var(--sozemy-focus);
	outline-offset: 2px;
}

.sozemy-choice__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--sozemy-surface);
	color: #3b4250;
}

.sozemy-choice:has(input:checked) .sozemy-choice__icon {
	background: #fff;
	color: var(--sozemy-primary);
}

.sozemy-choice__body {
	flex: 1;
	min-width: 0;
	padding-right: 1.75rem;
}

.sozemy-choice__title {
	display: block;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 0.2rem;
}

.sozemy-choice__text {
	display: block;
	color: var(--sozemy-muted);
	font-size: 0.875rem;
	line-height: 1.45;
}

.sozemy-choice__points {
	margin: 0.25rem 0 0;
	padding: 0 0 0 1rem;
	color: var(--sozemy-muted);
	font-size: 0.8125rem;
	line-height: 1.55;
}

.sozemy-choice__dot {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: grid;
	place-items: center;
	width: 1.375rem;
	height: 1.375rem;
	border-radius: 50%;
	border: 1.5px solid #c9cdc6;
	background: #fff;
	color: transparent;
	transition: background-color var(--ease), border-color var(--ease);
}

.sozemy-choice:has(input:checked) .sozemy-choice__dot {
	background: var(--sozemy-primary);
	border-color: var(--sozemy-primary);
	color: #fff;
}

/* Social */

.sozemy-auth__social {
	display: grid;
	gap: 0.625rem;
	margin-top: 1.25rem;
}

.sozemy-auth__social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	min-height: 48px;
	padding: 0 1rem;
	border: 1px solid var(--sozemy-border);
	border-radius: var(--radius-small);
	background: #fff;
	color: var(--sozemy-text);
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	transition: background-color var(--ease), border-color var(--ease);
}

.sozemy-auth__social-btn:hover {
	background: var(--sozemy-surface);
	border-color: #d9dcd5;
}

.sozemy-auth__social-btn:focus-visible {
	outline: 2px solid var(--sozemy-focus);
	outline-offset: 2px;
}

.sozemy-auth__social-btn.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

.sozemy-auth__divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0;
	color: var(--sozemy-muted);
	font-size: 0.8125rem;
}

.sozemy-auth__divider::before,
.sozemy-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--sozemy-border);
}

.sozemy-auth__via {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	margin: 1.25rem 0;
	padding: 0.75rem 1rem;
	border-radius: var(--radius-small);
	background: var(--sozemy-primary-light);
	font-size: 0.875rem;
}

.sozemy-auth__via p {
	margin: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* Fields */

.sozemy-auth__form {
	margin: 0;
}

[data-sozemy-signup-form] [data-step="account"] .sozemy-auth__grid:first-of-type {
	margin-top: 1.25rem;
}

.sozemy-auth__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 0.75rem;
}

.sozemy-auth__field {
	margin-bottom: 1rem;
}

.sozemy-auth__field label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.8125rem;
	font-weight: 600;
}

.sozemy-auth__field input,
.sozemy-auth__field select {
	width: 100%;
	min-height: 46px;
	padding: 0 0.875rem;
	border: 1px solid var(--sozemy-border);
	border-radius: var(--radius-small);
	background: #fff;
	color: var(--sozemy-text);
	font: inherit;
	font-size: 1rem;
	transition: border-color var(--ease), box-shadow var(--ease);
}

.sozemy-auth__field select {
	appearance: none;
	padding-right: 2.25rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.875rem center;
}

.sozemy-auth__field input:focus,
.sozemy-auth__field select:focus {
	outline: none;
	border-color: var(--sozemy-primary);
	box-shadow: 0 0 0 3px rgba(2, 134, 95, 0.15);
}

.sozemy-auth__field input[readonly] {
	background: var(--sozemy-surface);
	color: var(--sozemy-muted);
}

.sozemy-auth__field [aria-invalid="true"] {
	border-color: var(--sozemy-danger);
}

.sozemy-auth__phone {
	display: flex;
	gap: 0.5rem;
}

.sozemy-auth__field .sozemy-auth__phone select {
	flex: none;
	width: 7rem;
}

.sozemy-auth__password {
	position: relative;
}

.sozemy-auth__field .sozemy-auth__password input {
	padding-right: 3rem;
}

.sozemy-auth__eye {
	position: absolute;
	top: 50%;
	right: 0.25rem;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: none;
	color: var(--sozemy-muted);
	cursor: pointer;
}

.sozemy-auth__eye:hover {
	color: var(--sozemy-text);
}

.sozemy-auth__eye:focus-visible {
	outline: 2px solid var(--sozemy-focus);
	outline-offset: -2px;
}

.sozemy-auth__eye-closed,
.sozemy-auth__eye[aria-pressed="true"] .sozemy-auth__eye-open {
	display: none;
}

.sozemy-auth__eye[aria-pressed="true"] .sozemy-auth__eye-closed {
	display: block;
}

.sozemy-auth__hint {
	margin: 0.375rem 0 0;
	color: var(--sozemy-muted);
	font-size: 0.75rem;
}

.sozemy-auth__error {
	margin: 0.375rem 0 0;
	color: var(--sozemy-danger);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.sozemy-choices + .sozemy-auth__error {
	margin-bottom: 0.5rem;
}

[data-step="seller-type"] .sozemy-auth__btn {
	margin-top: 1.5rem;
}

.sozemy-auth__notice {
	margin: 0 0 1.25rem;
	padding: 0.75rem 1rem;
	border-radius: var(--radius-small);
	font-size: 0.875rem;
	line-height: 1.45;
	background: var(--sozemy-surface);
}

.sozemy-auth__notice--error {
	background: #fdecef;
	color: #9f1239;
}

.sozemy-auth__notice--info {
	background: #eef4ff;
	color: #1e3a8a;
}

.sozemy-auth__notice--success {
	background: var(--sozemy-primary-light);
	color: var(--sozemy-primary-dark);
}

/* Checkboxes */

.sozemy-auth__checks {
	display: grid;
	gap: 0.875rem;
	margin-bottom: 1.5rem;
}

.sozemy-auth__check {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	font-size: 0.875rem;
	cursor: pointer;
}

.sozemy-auth__check--block {
	display: flex;
	align-items: flex-start;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.sozemy-auth__check input {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--sozemy-primary);
	cursor: pointer;
}

.sozemy-auth__check--block input {
	margin-top: 0.125rem;
}

.sozemy-auth__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin: 0.25rem 0 1.25rem;
}

/* Buttons and links */

.sozemy-auth__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	padding: 0 1.25rem;
	border: 0;
	border-radius: var(--radius-small);
	background: var(--sozemy-primary);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--ease);
}

.sozemy-auth__btn:hover {
	background: var(--sozemy-primary-hover);
	color: #fff;
}

.sozemy-auth__btn:focus-visible {
	outline: 2px solid var(--sozemy-focus);
	outline-offset: 3px;
}

.sozemy-auth__btn[disabled] {
	opacity: 0.75;
	cursor: progress;
}

.sozemy-auth__back {
	display: block;
	margin: 0.75rem auto 0;
	padding: 0.5rem 0.75rem;
	border: 0;
	background: none;
	color: var(--sozemy-muted);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
}

.sozemy-auth__back:hover {
	color: var(--sozemy-text);
}

.sozemy-auth__link {
	padding: 0;
	border: 0;
	background: none;
	color: var(--sozemy-primary);
	font: inherit;
	font-size: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.sozemy-auth__row .sozemy-auth__link {
	font-size: 0.875rem;
}

.sozemy-auth__link:hover {
	color: var(--sozemy-primary-hover);
}

.sozemy-auth__foot {
	margin: 1.25rem 0 0;
	text-align: center;
	color: var(--sozemy-muted);
	font-size: 0.875rem;
}

.sozemy-auth__secure {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin: 1rem 0 0;
	color: var(--sozemy-muted);
	font-size: 0.8125rem;
}

/* Success */

.sozemy-auth__done {
	text-align: center;
	padding-top: 0.5rem;
}

.sozemy-auth__success {
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	margin: 0 auto 1.25rem;
	border-radius: 50%;
	background: var(--sozemy-primary);
	color: #fff;
	box-shadow: 0 0 0 10px var(--sozemy-primary-light);
}

/* Mobile: one step per screen, edge to edge */

@media (max-width: 540px) {
	.sozemy-auth-page {
		background: var(--sozemy-background);
	}

	.sozemy-auth {
		padding: 1.25rem 1rem 2rem;
	}

	.sozemy-auth__card {
		max-width: none;
		padding: 0;
		border: 0;
		box-shadow: none;
	}

	.sozemy-auth__title {
		font-size: 1.375rem;
	}

	.sozemy-steps {
		gap: 0.5rem 0.875rem;
	}
}

@media (max-width: 360px) {
	.sozemy-auth__grid {
		grid-template-columns: 1fr;
	}
}
