/**
 * Smarttec Auth – Styles
 *
 * Design exakt nach den Referenzbildern:
 * - Zentrierte Tabs (aktiv schwarz/fett, inaktiv hellgrau)
 * - Abgerundete Eingabefelder mit dezentem grauen Rahmen
 * - Warme, rötlich-braune Label- und Hinweistexte
 * - Schwarzer Button, weiße Schrift, Großbuchstaben
 * - Blaue Links ("Passwort vergessen?"), dunkle "OR LOGIN WITH"-Trennlinie
 *
 * Alle Werte über CSS-Variablen anpassbar (auch via Bricks-Controls).
 */

.smarttec-auth {
	--stauth-accent: #111111;
	--stauth-accent-text: #ffffff;
	--stauth-field-radius: 9px;
	--stauth-field-border: #dedede;
	--stauth-field-border-focus: #111111;
	--stauth-text: #1a1a1a;
	--stauth-tab-inactive: #b9b9b9;
	--stauth-label: #6a4a3a;      /* warmer, rötlich-brauner Ton der Labels */
	--stauth-hint: #7a5540;       /* Hinweistexte (Intro, Passwort, Datenschutz) */
	--stauth-muted: #6b6b6b;
	--stauth-required: #d0342c;   /* rotes Pflicht-Sternchen */
	--stauth-link: #3b6fd6;       /* blaue Links */
	--stauth-divider-text: #2b3a67;
	--stauth-error-bg: #fdecea;
	--stauth-error-text: #b3261e;
	--stauth-success-bg: #e7f5ec;
	--stauth-success-text: #1e7e46;
	--stauth-gap: 16px;

	box-sizing: border-box;
	width: 100%;
	max-width: 430px;
	margin-inline: auto;
	color: var(--stauth-text);
	font-family: inherit;
	line-height: 1.5;
}

.smarttec-auth *,
.smarttec-auth *::before,
.smarttec-auth *::after {
	box-sizing: border-box;
}

/* --- Tabs --- */
.smarttec-auth__tabs {
	display: flex;
	justify-content: center;
	align-items: baseline;
	gap: 18px;
	margin-bottom: 22px;
}

.smarttec-auth__tab {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--stauth-tab-inactive);
	cursor: pointer;
	text-decoration: none;
	transition: color 0.15s ease;
	font-family: inherit;
}

.smarttec-auth__tab.is-active,
.smarttec-auth__tab:hover {
	color: var(--stauth-text);
}

/* --- Panels --- */
.smarttec-auth__panel[hidden] {
	display: none !important;
}

/* --- Intro / Hinweistexte (warmer Ton, zentriert bei Intro) --- */
.smarttec-auth__intro {
	text-align: center;
	color: var(--stauth-hint);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 auto 22px;
	max-width: 90%;
}

.smarttec-auth__password-hint {
	color: var(--stauth-hint);
	font-size: 13px;
	line-height: 1.5;
	margin: -8px 0 0;
}

.smarttec-auth__privacy {
	color: var(--stauth-hint);
	font-size: 12.5px;
	line-height: 1.5;
	margin: 2px 0 18px;
}

/* --- Form --- */
.smarttec-auth__form {
	display: flex;
	flex-direction: column;
	gap: var(--stauth-gap);
}

.smarttec-auth__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.smarttec-auth__field[hidden] {
	display: none !important;
}

.smarttec-auth__label {
	font-size: 13px;
	font-weight: 400;
	color: var(--stauth-label);
	letter-spacing: 0.01em;
}

.smarttec-auth__required {
	color: var(--stauth-required);
}

.smarttec-auth__input {
	width: 100%;
	height: 38px !important;
	min-height: 0 !important;
	padding: 4px 12px !important;
	font-size: 13px;
	line-height: 1.2;
	color: var(--stauth-text);
	background: #fff;
	border: 1px solid var(--stauth-field-border);
	border-radius: var(--stauth-field-radius);
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.smarttec-auth__input::placeholder {
	color: #b8b8b8;
}

.smarttec-auth__input:focus {
	border-color: var(--stauth-field-border-focus);
	box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.06);
}

.smarttec-auth__input.is-invalid {
	border-color: var(--stauth-required);
}

/* --- Passwort-Feld mit Toggle --- */
.smarttec-auth__password-wrap {
	position: relative;
}

.smarttec-auth__password-wrap .smarttec-auth__input {
	padding-right: 48px;
}

.smarttec-auth__toggle-pw {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: #333;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.smarttec-auth__toggle-pw:hover {
	color: #000;
}

/* --- Select (Kundentyp) --- */
.smarttec-auth__select-wrap {
	position: relative;
}

.smarttec-auth__select {
	width: 100% !important;
	height: 38px !important;
	min-height: 0 !important;
	padding-right: 42px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	color: var(--stauth-text);
	font-weight: 400;
	line-height: 1.2;
}

/* Platzhalter-Option gedimmt darstellen, gewählter Wert normal. */
.smarttec-auth__select:required:invalid {
	color: var(--stauth-text);
}

/* --- Zeile: Remember + Passwort vergessen --- */
.smarttec-auth__row-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: -6px;
}

.smarttec-auth__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555;
	cursor: pointer;
}

.smarttec-auth__checkbox input {
	width: 15px;
	height: 15px;
	accent-color: var(--stauth-accent);
	cursor: pointer;
}

.smarttec-auth__lostpw {
	font-size: 13px;
	color: var(--stauth-link);
	text-decoration: none;
}

.smarttec-auth__lostpw:hover {
	text-decoration: underline;
}

/* --- Submit --- */
.smarttec-auth__submit {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--stauth-accent-text);
	background: var(--stauth-accent);
	border: none;
	border-radius: var(--stauth-field-radius);
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
	font-family: inherit;
}

.smarttec-auth__submit:hover {
	opacity: 0.9;
}

.smarttec-auth__submit:active {
	transform: translateY(1px);
}

.smarttec-auth__submit.is-loading {
	opacity: 0.65;
	cursor: progress;
}

/* --- Nachrichten --- */
.smarttec-auth__message {
	display: none;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 13.5px;
}

.smarttec-auth__message.is-error {
	display: block;
	background: var(--stauth-error-bg);
	color: var(--stauth-error-text);
}

.smarttec-auth__message.is-success {
	display: block;
	background: var(--stauth-success-bg);
	color: var(--stauth-success-text);
}

/* --- Social / Divider --- */
.smarttec-auth__social {
	margin-top: 22px;
}

.smarttec-auth__divider {
	display: flex;
	align-items: center;
	text-align: center;
	color: var(--stauth-divider-text);
	font-size: 12px;
	letter-spacing: 0.08em;
	font-weight: 700;
}

.smarttec-auth__divider::before,
.smarttec-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #dcdcdc;
}

.smarttec-auth__divider span {
	padding: 0 16px;
}

.smarttec-auth__social-buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 18px;
	flex-wrap: wrap;
}

/* --- Logged-in-Hinweis --- */
.smarttec-auth__logged-in {
	text-align: center;
	color: var(--stauth-muted);
	font-size: 14px;
	padding: 20px 0;
}

.smarttec-auth__logged-in a {
	color: var(--stauth-link);
}

/* --- Responsive --- */

/* Desktop/Laptop (ab 1025px): alles etwas größer für große Bildschirme. */
@media (min-width: 1025px) {
	.smarttec-auth {
		max-width: 480px;
	}
	.smarttec-auth__tab {
		font-size: 24px;
	}
	.smarttec-auth__intro {
		font-size: 15px;
	}
	.smarttec-auth__label {
		font-size: 14px;
	}
	.smarttec-auth__input {
		height: 46px !important;
		font-size: 15px;
	}
	.smarttec-auth__select {
		height: 46px !important;
	}
	.smarttec-auth__submit {
		height: 52px !important;
		font-size: 14px;
	}
	.smarttec-auth__form {
		gap: 20px;
	}
}

/* Tablet: seitlicher Abstand, damit das Formular nicht am Rand klebt. */
@media (max-width: 1024px) {
	.smarttec-auth {
		padding-left: 28px !important;
		padding-right: 28px !important;
	}
}

/* Mobile: deutlich mehr Abstand zum Rand + iOS-Zoom-Schutz. */
@media (max-width: 600px) {
	.smarttec-auth {
		padding-left: 22px !important;
		padding-right: 22px !important;
	}
	.smarttec-auth__tab {
		font-size: 19px;
	}
	.smarttec-auth__input {
		font-size: 16px; /* verhindert iOS-Zoom beim Fokus */
		height: 34px !important;
		padding-top: 3px !important;
		padding-bottom: 3px !important;
	}
	.smarttec-auth__select {
		height: 34px !important;
	}
	.smarttec-auth__submit {
		height: 42px !important;
		text-align: center !important;
		justify-content: center !important;
	}
	.smarttec-auth__row-between {
		flex-direction: row;
		align-items: center;
	}
}
