/**
 * Firebase auth shell — scoped to toolkit root only.
 *
 * @package Botpress_Easy_Toolkit
 */

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) {
	--bet-auth-gap-1: 8px;
	--bet-auth-gap-2: 16px;
	--bet-auth-gap-3: 24px;
	--bet-auth-radius: 16px;
	--bet-auth-border: #d0d5dd;
	--bet-auth-focus: #3b82f6;
	--bet-auth-text: #101828;
	--bet-auth-muted: #475467;
	--bet-auth-font-label: 1.26rem;
	--bet-auth-font-body: 1.22rem;
	--bet-auth-font-small: 1.16rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) #bet-toolkit-auth:not( .bet-toolkit-auth--inactive ) {
	width: 100%;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: min( 70vh, 52rem );
	overflow: hidden;
	border-radius: 18px;
	background: linear-gradient( 180deg, #f8fafc 0%, #eef2ff 100% );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var( --bet-auth-gap-3 );
	padding: clamp( 1.25rem, 3vw, 2.5rem );
	color: #f8fafc;
	background: linear-gradient( 145deg, #0f172a 0%, #1e293b 42%, #312e81 100% );
	background-size: cover;
	background-position: center;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__media-video,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__media-image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand.bet-auth-brand--image,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand.bet-auth-shell__brand--image {
	background-image: var( --bet-auth-shell-bg-image );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand.bet-auth-brand--image::before,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand.bet-auth-shell__brand--image::before,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand.bet-auth-brand--media::before,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand.bet-auth-shell__brand--media::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient( 145deg, rgba( 15, 23, 42, 0.85 ) 0%, rgba( 30, 41, 59, 0.72 ) 100% );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__logo,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand-logo {
	position: relative;
	z-index: 1;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__logo img,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand-logo img {
	display: block;
	max-width: 160px;
	max-height: 56px;
	width: auto;
	height: auto;
	object-fit: contain;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__visual {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	min-height: 4rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__bottom,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand-inner {
	position: relative;
	z-index: 1;
	max-width: 24rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__title,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand-title {
	margin: 0;
	font-size: clamp( 1.95rem, 2.8vw, 2.35rem );
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand__support {
	margin: 0.55rem 0 0;
	font-size: 1rem;
	line-height: 1.45;
	color: rgba( 248, 250, 252, 0.88 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-main,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__main {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: clamp( 1.1rem, 2.5vw, 2rem );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-card,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__card {
	width: min( 100%, 460px );
	padding: 40px;
	border-radius: var( --bet-auth-radius );
	background: #ffffff;
	box-shadow:
		0 1px 2px rgba( 16, 24, 40, 0.06 ),
		0 20px 48px rgba( 15, 23, 42, 0.12 );
	transition: box-shadow 0.25s ease, transform 0.2s ease, opacity 0.25s ease;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell .bet-auth-panel {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	animation: bet-auth-panel-in 260ms ease both;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-header {
	margin-bottom: var( --bet-auth-gap-3 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-title {
	margin: 0 0 var( --bet-auth-gap-1 );
	font-size: clamp( 2.35rem, 3vw, 2.8rem );
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var( --bet-auth-text );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-description {
	margin: 0;
	font-size: 1.32rem;
	line-height: 1.5;
	color: var( --bet-auth-muted );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-mode-button {
	margin: 0;
	padding: 0.45rem 0.8rem;
	border: 1px solid transparent;
	border-radius: 0.45rem;
	background: transparent;
	color: #475467;
	font-size: 1.02rem;
	font-weight: 600;
	line-height: 1.35;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-modes {
	margin-bottom: var( --bet-auth-gap-3 );
	padding-bottom: var( --bet-auth-gap-2 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-form {
	display: grid;
	gap: var( --bet-auth-gap-2 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field {
	display: grid;
	gap: 0;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating {
	position: relative;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-input {
	width: 100%;
	height: 52px;
	padding: 1.45rem 0.9rem 0.45rem;
	border: 1px solid var( --bet-auth-border );
	border-radius: 12px;
	background: #ffffff;
	font-size: 1.24rem;
	line-height: 1.35;
	color: var( --bet-auth-text );
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-input:focus {
	border-color: var( --bet-auth-focus );
	outline: none;
	box-shadow: 0 0 0 3px rgba( 59, 130, 246, 0.16 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating .bet-auth-label {
	position: absolute;
	left: 0.86rem;
	top: 50%;
	transform: translateY( -50% );
	padding: 0 0.2rem;
	margin: 0;
	border-radius: 6px;
	background: #ffffff;
	font-size: var( --bet-auth-font-label );
	line-height: 1;
	color: #667085;
	pointer-events: none;
	transition: transform 0.2s ease, top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating.bet-auth-field--is-focused .bet-auth-label,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating.bet-auth-field--has-value .bet-auth-label,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating.bet-auth-field--is-autofilled .bet-auth-label {
	top: 0;
	transform: translateY( -50% );
	font-size: 1rem;
	color: #2563eb;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-checkrow {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.6rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-checkrow-label {
	font-size: 1.2rem;
	line-height: 1.45;
	color: #344054;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-link-action {
	padding: 0;
	border: 0;
	background: transparent;
	color: #5b68f5;
	font-size: 1.18rem;
	font-weight: 600;
	cursor: pointer;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-link-action:hover {
	color: #4756eb;
	text-decoration: underline;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-row {
	display: flex;
	align-items: stretch;
	width: 100%;
	border: 1px solid var( --bet-auth-border );
	border-radius: 12px;
	background: #ffffff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-row:focus-within {
	border-color: var( --bet-auth-focus );
	box-shadow: 0 0 0 3px rgba( 59, 130, 246, 0.16 );
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--password .bet-auth-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 52px;
	border: 0;
	border-radius: 12px 0 0 12px;
	box-shadow: none;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle {
	flex: 0 0 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-left: 1px solid #eaecf0;
	border-radius: 0 12px 12px 0;
	background: #f8fafc;
	color: #475467;
	line-height: 0;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle:hover {
	background: #f2f4f7;
	color: #101828;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle:focus-visible {
	outline: 2px solid var( --bet-auth-focus );
	outline-offset: -2px;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle:disabled {
	opacity: 0.48;
	cursor: not-allowed;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	line-height: 1;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-toggle-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-remember {
	margin-top: -2px;
	white-space: nowrap;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-remember-label {
	font-size: 1.2rem;
	font-weight: 500;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button {
	min-height: 52px;
	margin-top: var( --bet-auth-gap-1 );
	font-size: 1.3rem;
	font-weight: 650;
	border-radius: 12px;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-alt-link-row {
	margin: 0.2rem 0 0;
	text-align: center;
	font-size: 1.2rem;
	line-height: 1.55;
	color: #667085;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-alt-sep {
	color: #667085;
	font-weight: 500;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button--secondary {
	background: #eef2ff;
	color: #1e3a8a;
	border: 1px solid #c7d2fe;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button--secondary:hover {
	background: #e0e7ff;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button--guest {
	margin-top: 0.35rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-consent {
	align-items: flex-start;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-consent-label {
	font-size: 1.18rem;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-consent-label a {
	color: #1d4ed8;
	text-decoration: underline;
	text-underline-offset: 2px;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button--loading {
	position: relative;
	padding-left: 2.8rem;
	pointer-events: none;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-button--loading::before {
	content: '';
	position: absolute;
	left: 1.1rem;
	top: 50%;
	width: 1.05rem;
	height: 1.05rem;
	margin-top: -0.52rem;
	border: 2px solid rgba( 255, 255, 255, 0.35 );
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: bet-auth-spin 0.7s linear infinite;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-form-feedback {
	margin-top: var( --bet-auth-gap-2 );
	font-size: var( --bet-auth-font-body );
	line-height: 1.5;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-status,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-success,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-user-email {
	font-size: var( --bet-auth-font-body );
	line-height: 1.5;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-error {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	padding: 0.8rem 0.9rem;
	border-left: 3px solid #d92d20;
	border-radius: 10px;
	background: #fef3f2;
	color: #912018;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-error__icon {
	flex: 0 0 auto;
	line-height: 1;
	margin-top: 1px;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-error__text {
	font-size: 1.18rem;
	line-height: 1.45;
}

@keyframes bet-auth-spin {
	to {
		transform: rotate( 360deg );
	}
}

@keyframes bet-auth-panel-in {
	from {
		opacity: 0;
		transform: translateY( 6px );
	}

	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

@media ( min-width: 1025px ) {
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-shell {
		flex-direction: row;
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		height: 100dvh;
		min-height: 100vh;
		min-height: 100dvh;
		border-radius: 0;
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-brand,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-shell__brand,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-main,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-shell__main {
		flex: 1 1 50%;
		min-width: 0;
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-main,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='fullscreen'] .bet-auth-shell__main {
		padding-inline: clamp( 1.4rem, 3vw, 3rem );
	}
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='embedded'] .bet-auth-brand,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='embedded'] .bet-auth-shell__brand,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='modal'] .bet-auth-brand,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='modal'] .bet-auth-shell__brand {
	display: none;
}

:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='embedded'] .bet-auth-shell,
:is(#botpress-easy-toolkit-root, .bet-toolkit-scope)[data-bet-runtime-mode='modal'] .bet-auth-shell {
	min-height: min( 74vh, 54rem );
}

@media ( max-width: 1024px ) {
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell {
		min-height: min( 80vh, 56rem );
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-brand,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__brand {
		min-height: 11rem;
	}
}

@media ( max-width: 768px ) {
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-card,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__card {
		width: min( 100%, 460px );
		padding: clamp( 1.35rem, 4.5vw, 2rem );
	}
}

@media ( max-width: 480px ) {
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell {
		min-height: min( 88vh, 760px );
		border-radius: 12px;
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-main,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell__main {
		padding: 0.9rem;
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-title {
		font-size: clamp( 1.95rem, 8vw, 2.2rem );
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-row {
		flex-wrap: wrap;
		align-items: flex-start;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-shell .bet-auth-panel {
		animation: none;
	}

	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-input,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-password-row,
	:is(#botpress-easy-toolkit-root, .bet-toolkit-scope) .bet-auth-field--floating .bet-auth-label {
		transition: none;
	}
}
