/* =========================================================
	Authica – Global Styles
	- Combined selectors where safe
	- Indentation uses TABS (no leading spaces)
   ========================================================= */


/* =========================================================
	1) Base document + viewport
   ========================================================= */

html, body{
	height: 100%;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;

	/* Modern viewport handling (mobile safe areas) */
	min-height: 100dvh;
	min-height: 100svh;
	min-height: -webkit-fill-available;

	overflow-x: clip;
	font-family: "Segoe UI", sans-serif;
	color: #111;
	line-height: normal;
	letter-spacing: normal;
}

.authica-viewport{
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	min-height: 100svh;
	min-height: 100dvh;
	min-height: -webkit-fill-available;

	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	overflow-x: clip;
	/* Safe-area insets (for JS clamping + notch devices) */
	--authica-safe-top: env(safe-area-inset-top, 0px);
	--authica-safe-bottom: env(safe-area-inset-bottom, 0px);

}

.authica-centerer{
	flex: 1 0 auto;
	display: grid;
	place-items: center;

	overflow: hidden;
	min-width: 200px;
	width: var(--authica-form-width, 300px);
	max-width: 800px;

	/* Centerer offset logic */
	margin-inline-start: calc(((var(--authica-form-offset-factor, 0) + 1) / 2) * (100% - min(100%, var(--authica-form-width, 300px))));
	margin-inline-end: calc(((1 - var(--authica-form-offset-factor, 0)) / 2) * (100% - min(100%, var(--authica-form-width, 300px))));

	transform: none !important;

	/* Shared field tokens */
	--authica-input-height: 40px;
	--authica-input-radius: 6px;
	--authica-input-mb: 12px;
	--authica-input-pb: 0px;
}

@media (max-width: 400px){
	.authica-centerer{
		padding-left: 10vw;
		padding-right: 10vw;
	}
}


/* =========================================================
	2) Form switching (data-active)
   ========================================================= */

.authica-form-overlay [data-form]{ display: none; }
.authica-form-overlay[data-active="login"]		[data-form="login"]{ display: block; }
.authica-form-overlay[data-active="register"]	[data-form="register"]{ display: block; }
.authica-form-overlay[data-active="reset"]		[data-form="reset"]{ display: block; }


/* =========================================================
	3) Logo + title links
   ========================================================= */

.authica-logo-wrapper{
	margin-top: 0;
}

.authica-logo-link,
.authica-title-link{
	display: inline-block;
	text-decoration: none;
	cursor: pointer;
	color: inherit;
}

.authica-logo-link img{
	display: block;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: auto;
}

.authica-logo-link:focus,
.authica-logo-link img:focus{
	outline: none;
	box-shadow: none;
}

.authica-title-link:hover,
.authica-title-link:focus{
	text-decoration: underline;
}


/* =========================================================
	4) Form containers + core forms
   ========================================================= */

.authica-form-overlay,
.authica-register-overlay,
.authica-lostpass-overlay,
.authica-resetpass-overlay,
.authica-2fa-overlay{
	width: inherit;
	padding: calc(var(--authica-form-padding, 16px) + var(--authica-form-border-size, 0px));
	max-width: 100%;
	box-sizing: border-box;
	border: 0 !important;
		border-radius: var(--authica-form-border-radius, 16px);
		/* Border is rendered as an inset shadow to avoid gradient/backdrop compositing seams */
		box-shadow: var(--authica-form-shadow, 0 0 0 transparent),
				inset 0 0 0 var(--authica-form-border-size, 0px) var(--authica-form-border-color, transparent);
	filter: none;
	-webkit-filter: none;
	text-align: center;

	position: relative;
	isolation: isolate;
	transform: translateZ(0);
	backface-visibility: hidden;

	overflow-x: hidden;
	overflow-y: auto;

	max-height: calc((var(--authica-vh, 1vh) * 100) - var(--footer-height, 0px));
}

#loginform,
#registerform,
#lostpasswordform,
#resetpasswordform{
	display: block;
	margin: 0;
	box-sizing: border-box;
}


/* =========================================================
	5) Background overlay layer
   ========================================================= */

.authica-overlay-bg{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

	z-index: 0;
	pointer-events: none;

	background-color: rgba(0, 0, 0, 0.0);
	background: var(--authica-overlay-gradient, none);
}


/* =========================================================
	6) Header + logo rendering
   ========================================================= */

.authica-header{
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	background-size: contain;

	/* Fix invalid value */
	margin-bottom: 0;
}

.authica-header.no-bg{
	background: none !important;
}

.authica-logo{
	display: block;
	height: auto;

	margin: var(--authica-logo-margin);
	padding-bottom: var(--authica-logo-padding);
}


/* =========================================================
	7) Title
   ========================================================= */

.authica-title{
	text-align: center;
	font-size: 32px;
	color: #111;
	margin-bottom: 30px;
}

.authica-title-text{
	margin-block: var(--authica-title-margin, 0);
	margin-inline: 0;

	color: var(--authica-title-color);
	font-size: var(--authica-title-size);
	padding-bottom: var(--authica-title-padding);

	text-shadow: 0 0 var(--authica-title-shadow-size) var(--authica-title-shadow-color);
}

.authica-title-text.bold{ font-weight: bold; }
.authica-title-text.italic{ font-style: italic; }
.authica-title-text.underline{ text-decoration: underline; }


/* =========================================================
	8) Form text + links
   ========================================================= */

.authica-form-text,
.authica-form-links,
.authica-form-text a,
.authica-form-links a,
p.authica-remember-me,
p.authica-remember-me.centered,
p.authica-remember-me label,
.authica-form-text a:hover,
.authica-form-links a:hover{
	color: var(--authica-form-text-color, #113266);
	border-color: var(--authica-form-text-color, #113266);

	font-size: var(--authica-form-text-size);
	text-shadow: 0 0 var(--authica-form-text-shadow-size, 0px) var(--authica-form-text-shadow-color, transparent);

	text-decoration: none;
	font-weight: normal;
}


/* =========================================================
	9) Inputs
   ========================================================= */

.authica-input::placeholder{
	color: var(--authica-placeholder-color, #888);
}

.authica-input{
	transition: border-color 0.2s ease;

	border-style: solid;
	height: var(--authica-input-height);
	border-radius: var(--authica-input-radius);

	margin-bottom: var(--authica-input-mb);
	padding-bottom: var(--authica-input-pb);
}

.authica-input:focus{
	outline: none;
}

/* Field styling fallback (in case inputs do not use .authica-input) */
.authica-form-overlay input[type="text"],
.authica-form-overlay input[type="password"],
.authica-form-overlay input[type="email"],
.authica-register-overlay input[type="text"],
.authica-register-overlay input[type="email"],
.authica-register-overlay input[type="password"],
.authica-lostpass-overlay input[type="email"],
.authica-resetpass-overlay input[type="password"],
.authica-2fa-overlay input[type="text"],
.authica-2fa-overlay input[type="password"]{
	width: 100%;
	padding: 12px;
	margin-bottom: 14px;
	border-radius: 8px;

	background-color: rgba(255, 255, 255, 0.8);

	font-size: 16px;
	box-sizing: border-box;
	display: block;

	transition: border-color 0.3s;
}

.authica-form-overlay input:invalid{
	border-color: #e74c3c;
	outline: none;
}

/* Ensure submit elements never inherit opacity filters from elsewhere */
.authica-form-overlay button,
.authica-form-overlay input[type="submit"]{
	opacity: 1 !important;
	filter: none !important;
	min-height: 24px !important;
}

/* Resetpass strength message (WordPress) */
.authica-resetpass-overlay #pass-strength-result,
.authica-resetpass-overlay #pass-strength-result.authica-form-text{
	color: var(--authica-form-text-color, #444444) !important;
	font-size: var(--authica-form-text-size, 17px) !important;
	font-weight: 400 !important;

	background: none !important;
	border: none !important;
	box-shadow: none !important;

	padding: 0 !important;
	min-height: 0 !important;
	margin: 0 0 16px 0 !important;

	display: block !important;
	text-align: center !important;

	pointer-events: none;
	user-select: none;

	line-height: 1.3 !important;
	letter-spacing: normal !important;

	text-shadow: 0 0 var(--authica-form-text-shadow-size, 0px) var(--authica-form-text-shadow-color, transparent) !important;
}


/* =========================================================
	10) Form cards (multi-form transitions)
   ========================================================= */

.authica-form-card{
	position: absolute;
	z-index: 0;

	display: none;
	opacity: 0;
	pointer-events: none;

	transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
}

.authica-form-card.active{
	display: block;
	opacity: 1;
	pointer-events: auto;
	z-index: 2;
}

.authica-form-card.fading-out{
	opacity: 0 !important;
	pointer-events: none;
	z-index: 1;
}

/* Optional entrance */
.authica-form-card.anim-in{
	animation: authicaCardIn 0.5s;
}

@keyframes authicaCardIn{
	from{ transform: translateY(40px) scale(.97); opacity: 0; }
	to{ transform: translateY(0) scale(1); opacity: 1; }
}


/* =========================================================
	11) Error shake
   ========================================================= */

@keyframes authica-shake{
	0%{ transform: translate3d(0,0,0); }
	15%{ transform: translate3d(-12px,0,0); }
	30%{ transform: translate3d(12px,0,0); }
	45%{ transform: translate3d(-10px,0,0); }
	60%{ transform: translate3d(10px,0,0); }
	75%{ transform: translate3d(-6px,0,0); }
	90%{ transform: translate3d(6px,0,0); }
	100%{ transform: translate3d(0,0,0); }
}

.authica-shake{
	animation: authica-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
	will-change: transform;
	backface-visibility: hidden;
}


/* =========================================================
	12) Password toggle
   ========================================================= */

.authica-password-wrap{
	position: relative;
}

.authica-password-wrap input{
	padding-right: 40px;
	height: 44px;
	font-size: 16px;
}

.authica-toggle-password{
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: pointer;

	width: auto;
	height: auto;

	color: #666;
	padding: 0;
	border: none;
	background: none;
	line-height: 1;
}

.authica-eye{
	width: 100%;
	height: 100%;
	display: block;
	transition: all 0.2s ease;
}

.authica-eye.eye-rotate{
	animation: eyeRotate 0.4s cubic-bezier(.7,-0.4,.6,1.2);
}

@keyframes eyeRotate{
	from{ transform: rotate(0deg); }
	to{ transform: rotate(360deg); }
}


/* =========================================================
	13) Remember me + 2FA remember device
   ========================================================= */

.authica-remember-device{
	margin-top: 8px;
	justify-content: center;
}

.authica-remember-device label{
	cursor: pointer;
}

.authica-remember-me{
	display: flex !important;
	align-items: center;
	justify-content: flex-start !important;

	width: 100%;
	margin-top: 0;
}

.authica-remember-me label{
	display: flex;
	align-items: center;
	gap: 6px;
}

.authica-remember-me.centered{
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: 100% !important;
	text-align: center !important;

	margin-left: 0 !important;
	margin-right: 0 !important;
}

.authica-remember-me input[type="checkbox"]{
	margin: 0;
	padding: 0;
	border: none;
	outline: none;
	box-shadow: none;
}

.authica-remember-me.authica-remember-hidden,
.authica-remember-me.centered.authica-remember-hidden,
.authica-remember-me[style*="display:none"]{
	display: none !important;
}


/* =========================================================
	14) Buttons + button text toggles
   ========================================================= */

.authica-btn-text.bold{ font-weight: bold; }
.authica-btn-text.italic{ font-style: italic; }
.authica-btn-text.underline{ text-decoration: underline; }

.authica-btn-wrap{
	display: block;
	width: 100%;
}

.authica-login-actions{
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 10px;
	width: 100%;
}

.authica-login-actions .authica-login-btn{
	margin: 0 !important;
	width: auto !important;
	min-width: 0;
}

.authica-login-actions .authica-login-submit{
	flex: 1 1 0;
}

.authica-passkey-link-row{
	margin-top: 12px;
	text-align: center;
	line-height: inherit;
}

.authica-form-overlay .authica-passkey-login-link{
	display: inline;
	margin: 0;
	padding: 8px 0 0 0;
	width: auto !important;
	min-width: 0;
	min-height: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	text-shadow: inherit !important;
	text-align: inherit;
	text-decoration: none !important;
	vertical-align: baseline;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.authica-passkey-login-link:hover,
.authica-passkey-login-link:focus{
	background: none !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.authica-passkey-login-link:focus-visible{
	outline: none;
}

.authica-login-btn{
	display: inline-block;
	position: relative;

	border: none;
	border-radius: 40px;

	background: linear-gradient(90deg, #0099ff, #00ffaa);
	color: #fff;

	font-family: inherit;
	font-size: 2em;
	font-weight: normal;
	font-style: normal;
	text-decoration: none;

	line-height: normal;
	letter-spacing: normal;
	box-sizing: border-box;
}

.authica-btn-wrap .authica-login-btn{
	display: block;
	margin: 0 auto;
}

.authica-login-btn:disabled{
	filter: opacity(0.55) !important;
}

/* =========================================================
	14b) Social Login row (icons under Login button)
   ========================================================= */

.authica-social-login-row{
	margin-top: 18px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
}

.authica-social-btn{
	width: 32px;
	height: 32px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	text-decoration: none;
	--authica-social-brand: rgba(0,0,0,0.88);
	--authica-social-bg: rgba(255,255,255,0.34);
	--authica-social-border: rgba(255,255,255,0.85);
	color: rgba(0,0,0,0.88);
	background: rgba(255,255,255,0.24);
	border: 1px solid rgba(255,255,255,0.24);
	box-shadow: 0 0 0 1px rgba(0,0,0,0.40);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: transform .12s ease, color .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.authica-social-btn:visited{
	color: rgba(0,0,0,0.88);
}

/* Brand colors (applied on hover/focus/press) */
/*
 * Hover/focus backgrounds are lightly tinted per brand to improve contrast
 * while keeping the icon in the provider color.
 */
.authica-social-btn--google{
	--authica-social-brand: #4285F4;
	--authica-social-bg: rgba(232,240,254,0.92);
}
.authica-social-btn--facebook{
	--authica-social-brand: #1877F2;
	--authica-social-bg: rgba(231,241,255,0.92);
}
.authica-social-btn--github{
	--authica-social-brand: #24292F;
	--authica-social-bg: rgba(246,248,250,0.92);
}
.authica-social-btn--microsoft{
	--authica-social-brand: #00A4EF;
	--authica-social-bg: rgba(229,247,255,0.92);
}
.authica-social-btn--linkedin{
	--authica-social-brand: #0A66C2;
	--authica-social-bg: rgba(230,241,255,0.92);
}
.authica-social-btn--discord{
	--authica-social-brand: #5865F2;
	--authica-social-bg: rgba(238,240,255,0.92);
}

.authica-social-btn--x{
	--authica-social-brand: #111111;
	--authica-social-bg: rgba(246,248,250,0.92);
}
.authica-social-btn--apple{
	--authica-social-brand: #111111;
	--authica-social-bg: rgba(246,248,250,0.92);
}
.authica-social-btn--amazon{
	--authica-social-brand: #FF9900;
	--authica-social-bg: rgba(255,243,224,0.92);
}
.authica-social-btn--gitlab{
	--authica-social-brand: #FC6D26;
	--authica-social-bg: rgba(255,238,232,0.92);
}
.authica-social-btn--tiktok{
	--authica-social-brand: #FE2C55;
	--authica-social-bg: rgba(255,230,238,0.92);
}
.authica-social-btn--slack{
	--authica-social-brand: #4A154B;
	--authica-social-bg: rgba(243,232,246,0.92);
}
.authica-social-btn--steam{
	--authica-social-brand: #1B2838;
	--authica-social-bg: rgba(235,241,248,0.92);
}
.authica-social-btn--reddit{
	--authica-social-brand: #FF4500;
	--authica-social-bg: rgba(255,233,226,0.92);
}

.authica-social-btn--google svg{
    scale: 1.1;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--facebook svg{
    scale: 1.2;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--github svg{
    scale: 1.0;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--microsoft svg{
    scale: 0.80;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--linkedin svg{
    scale: 0.8;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--discord svg{
    scale: 1;
    width: 24px;
    height: 24px;
    display: block;
}

.authica-social-btn--x svg{
	scale: 0.9;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--apple svg{
	scale: 0.9;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--amazon svg{
	scale: 1.1;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--gitlab svg{
	scale: 0.9;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--tiktok svg{
	scale: 0.85;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--slack svg{
	scale: 0.85;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--steam svg{
	scale: 0.95;
	width: 24px;
	height: 24px;
	display: block;
}

.authica-social-btn--reddit svg{
	scale: 1.25;
	width: 24px;
	height: 24px;
	display: block;
}


/* Ensure provider SVGs inherit currentColor (default = black; hover = brand color) */
.authica-social-btn svg{
	fill: currentColor;
}
.authica-social-btn svg path,
.authica-social-btn svg circle,
.authica-social-btn svg rect,
.authica-social-btn svg polygon{
	fill: currentColor;
}
.authica-social-btn:hover,
.authica-social-btn:focus-visible,
.authica-social-btn:active{
	transform: translateY(-1px);
	color: var(--authica-social-brand, rgba(0,0,0,0.88));
	border-color: var(--authica-social-border, rgba(255,255,255,0.85));
	box-shadow: 0 0 0 1px rgba(255,255,255,0.88), 0 0 0 2px rgba(0,0,0,0.40);
	background: var(--authica-social-bg, rgba(255,255,255,0.34));
}

.authica-social-btn:focus-visible{
	outline: 1px solid rgba(255,255,255,0.85);
	outline-offset: 2px;
}

.authica-social-btn{
	position: relative;
	overflow: visible;
}

/* default hidden */
.authica-social-btn::after,
.authica-social-btn::before{
	opacity: 0;
	pointer-events: none;
	transition: opacity .12s ease, transform .12s ease;
	transform: translateX(-50%) translateY(2px);
}

/* bubble */
.authica-social-btn:hover::after,
.authica-social-btn:focus-visible::after{
	content: attr(data-authica-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 13px);
	white-space: nowrap;
	padding: 6px 10px;
	border-radius: 10px;
	font-size: 12px;
	line-height: 1;
	background: rgba(0,0,0,1);
	color: #fff;
	box-shadow: none;
	z-index: 60;

	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* arrow */
.authica-social-btn:hover::before,
.authica-social-btn:focus-visible::before{
	content: "";
	position: absolute;
	left: 50%;
	bottom: calc(100% + 2px);
	border: 6px solid transparent;
	border-top-color: rgba(0,0,0,1);
	z-index: 61;

	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Submit button fallback (plain WP-style) */
.authica-form-overlay button{
	width: 100%;
	padding: initial;

	background-color: #0073aa;
	border: none;
	border-radius: 8px;

	color: #fff;
	cursor: pointer;

	transition: background 0.3s;
	font-size: 16px;
}

.authica-form-overlay button:hover{
	background-color: #005f8d;
}

/* Social buttons can be temporarily disabled (e.g., waiting for CAPTCHA). */
.authica-social-btn.is-disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.authica-in-customizer .authica-social-btn.is-disabled {
	cursor: not-allowed;
}

.authica-in-customizer .authica-social-btn,
.authica-in-customizer .authica-social-btn.is-disabled,
.authica-in-customizer .authica-social-btn[aria-disabled="true"],
.authica-in-customizer .authica-social-btn[data-authica-disabled="1"] {
	opacity: 1 !important;
	filter: none !important;
	pointer-events: auto !important;
}


/* =========================================================
	15) Inline links
   ========================================================= */

.authica-form-overlay a{
	display: inline-block;
	text-decoration: none;
}

.authica-inline-links{
	text-align: center;
	margin-top: 30px;
	color: #0073aa;
}

.authica-inline-links a{
	position: relative;
	text-decoration: underline;
	margin: 0 16px;
}


/* =========================================================
	16) Footer
   ========================================================= */

.authica-footer-bar{
	margin-top: auto;
	position: relative;
	flex: 0 0 auto;

	left: 0;
	right: 0;
	bottom: 0;

	width: 100vw;

	max-height: 100px;
	min-height: 10px;

	background: #222;
	color: #f8e9d2;

	z-index: 100;

	box-shadow: 0 -2px 18px rgba(0,0,0,0.10);

	/* Single source of truth */
	padding: 0;
	padding-bottom: calc(var(--authica-footer-pad, 16px) + env(safe-area-inset-bottom));
}

.authica-footer-row{
	display: flex;
	flex-direction: row;
	align-items: flex-end;

	width: 100%;
	max-width: 100vw;
	box-sizing: border-box;
	gap: 0;
}

/* Footer message: flexible, no forced alignment */
.authica-footer-message{
	display: block;

	margin-left: 24px !important;
	margin-right: 24px !important;

	word-break: break-word;

	flex: 1 1 0;
	min-width: 0;
}

.authica-footer-single .authica-footer-message{
	flex: 1 1 100%;
}

.authica-footer-row:not(.authica-footer-single) .authica-footer-message{
	flex: 1 1 50%;
}

/* Inherit font and color for children */
.authica-footer-message a,
.authica-footer-message strong,
.authica-footer-message em{
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	text-align: inherit !important;

	display: inline-block !important;
	text-decoration: none;
}

.authica-footer-message *{
	text-align: inherit !important;
}

.authica-link{
	display: inline-block !important;
}


/* =========================================================
	17) Background + form entrance animations
   ========================================================= */

/* Pan Horizontal */
.authica-anim-pan-horizontal{
	animation: authicaPanHorizontal 30s linear infinite;
}

@keyframes authicaPanHorizontal{
	0%{ background-position: 100% center; }
	50%{ background-position: 0% center; }
	100%{ background-position: 100% center; }
}

/* Zoom (Ken Burns) */
.authica-anim-zoom::before{
	content: '';
	position: fixed;
	top: 0;
	left: 0;

	width: 100vw;
	height: 100vh;

	z-index: -1;

	background-image: inherit;
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;

	transform: scale(1.05);
	animation: authicaZoomEffect 30s ease-in-out infinite alternate;
}

@keyframes authicaZoomEffect{
	from{ transform: scale(1.0); }
	to{ transform: scale(1.4); }
}

.authica-anim-zoom{
	background-size: 100%;
	animation: authicaZoom 20s ease-in-out infinite alternate;
}

@keyframes authicaZoom{
	from{ background-size: 100%; }
	to{ background-size: 120%; }
}

/* Pan */
.authica-anim-pan{
	background-position: 0% 40%;
	background-size: cover;
	animation: authicaPan 50s linear infinite alternate;
}

@keyframes authicaPan{
	from{ background-position: 0% 40%; }
	to{ background-position: 40% 0%; }
}

/* Gradient shift */
.authica-anim-gradient{
	background: linear-gradient(-45deg, #3b8d99, #6b6b83, #aa4b6b, #3b8d99);
	background-size: 800% 800%;
	animation: authicaGradient 30s ease-in-out infinite alternate;
}

@keyframes authicaGradient{
	0%{ background-position: 0% 50%; }
	50%{ background-position: 100% 50%; }
	100%{ background-position: 0% 50%; }
}

/* Form Slide Up */
.authica-anim-form-slideup .authica-form-overlay{
	transform: translateY(30px);
	opacity: 0;
	animation: authicaFormSlideUp .9s ease forwards;
}

@keyframes authicaFormSlideUp{
	to{
		transform: translateY(0);
		opacity: 1;
	}
}

/* Form Blur Fade */
.authica-anim-form-blur .authica-form-overlay{
	opacity: 0;

	/* Keep the overlay shadow while animating blur (filter is not additive). */
	filter: blur(15px);
	-webkit-filter: blur(15px);

	animation: authicaFormBlurFade 0.3s ease-out forwards;
}

@keyframes authicaFormBlurFade{
	to{
		opacity: 1;
		filter: blur(0);
		-webkit-filter: blur(0);
	}
}


/* Shared Fade In (used by form + message bars) */
@keyframes authicaFadeIn{
	from{ opacity: 0; }
	to{ opacity: 1; }
}

/* Fade In */
.authica-anim-fade-in .authica-form-overlay{
	opacity: 0;
	animation: authicaFadeIn 0.4s ease-in-out forwards;
}

/* Fade Form */
.authica-anim-fade .authica-form-overlay{
	opacity: 0;
	animation: authicaFadeForm 1.5s ease-out forwards;

	backdrop-filter: inherit;
	-webkit-backdrop-filter: inherit;
}

@keyframes authicaFadeForm{
	from{ opacity: 0; }
	to{ opacity: 1; }
}

/* Short viewport height tweak (legacy selector kept) */
@media (max-height: 600px){
	.authica-wrapper{
		justify-content: flex-start;
		padding-top: 40px;
	}
}


/* =========================================================
	18) Message bars + captcha bar
   ========================================================= */

.authica-welcome-message{
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;

	font-family: var(--authica-message-font-family, Arial), sans-serif;
	font-size: var(--authica-message-font-size, 14px);
	line-height: 1.4;

	will-change: opacity, transform;
}

.authica-hide{
	opacity: 0 !important;
	transition: opacity 1s cubic-bezier(.4,0,.2,1);
	will-change: opacity;
	pointer-events: none;
}

#authica-message-bar,
#authica-message-bar-below{
	margin: 0;
	padding: 8px 16px;

	text-align: center;

	min-width: 60px;
	max-width: 300px;
	width: auto !important;

	left: auto !important;

	min-height: 40px;
	height: auto;

	pointer-events: auto;
	will-change: opacity, transform;
}

/* Keep scale/zoom/pulse from spilling outside viewport edges */
#authica-message-bar{
	transform-origin: top center;
}
#authica-message-bar-below{
	transform-origin: bottom center;
}


/* CAPTCHA BAR */
.authica-captcha-bar,
.authica-captcha-bar-below{
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;

	line-height: 0;
	overflow: visible;

	/* JS controls top/left/width */
	left: auto !important;

	pointer-events: none;
	opacity: 0;

	transform-origin: top center;
	transition: opacity 0.35s ease-out;
	will-change: opacity;

	background: transparent;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
}

.authica-captcha-bar.captcha-visible,
.authica-captcha-bar-below.captcha-visible{
	opacity: 1;
	/* No shadow on captcha bar (prevents a visible "ghost" frame in Turnstile Invisible mode). */
	box-shadow: none;
	pointer-events: auto;
}


/* =========================================================
	19) Welcome bar styles
   ========================================================= */

.authica-welcome-style-bubble{
	background: var(--authica-message-bg, rgba(255,255,255,0.92));
	color: var(--authica-message-text-color, #444444);
	border-radius: 9px;
	font-weight: normal;
	border: var(--authica-message-border-size, 0px) solid var(--authica-message-border-color, transparent);
	box-shadow: var(--authica-form-shadow, 0 0 0 transparent);
}

.authica-welcome-style-banner{
	/* Default = solid white (Customizer can override via Message Background color). */
	background: var(--authica-message-bg, #ffffff);
	color: var(--authica-message-text-color, #444444);
	border-radius: 0 0 18px 18px;
	font-weight: normal;
	border: var(--authica-message-border-size, 0px) solid var(--authica-message-border-color, transparent);
	box-shadow: var(--authica-form-shadow, 0 0 0 transparent);
}

.authica-welcome-style-card{
	background: var(--authica-message-bg, #fff);
	color: var(--authica-message-text-color, #444444);
	border-radius: 50px;
	border: var(--authica-message-border-size, 0px) solid var(--authica-message-border-color, transparent);
	box-shadow: var(--authica-form-shadow, 0 0 0 transparent);
}

.authica-welcome-style-minimal{
	/* Minimal = text-only. Background control maps to shadow color (not a fill). */
	background: none !important;
	font-weight: normal;
	color: var(--authica-message-text-color, #444444) !important;
	border: none !important;

	border-radius: 0;

	--authica-message-shadow-color: var(--authica-message-bg, #fff);
	text-shadow:
		0 4px 32px var(--authica-message-shadow-color),
		0 2px 16px var(--authica-message-shadow-color),
		0 0 8px var(--authica-message-shadow-color),
		0 0 4px var(--authica-message-shadow-color);

	box-shadow: none !important;
}

#authica-message-bar.authica-welcome-style-minimal,
#authica-message-bar-below.authica-welcome-style-minimal{
	/* Minimal has no visible box, so remove the invisible bar height/padding
	   that otherwise makes the text sit visually too high. */
	padding: 0 4px;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}


/* =========================================================
	20) Welcome bar entrance animations (ENTRANCE ONLY)
   ========================================================= */

.authica-welcome-anim-fade{
	animation: authicaFadeIn 0.6s ease-in-out forwards;
}

.authica-welcome-anim-slide{
	animation: authicaWelcomeSlideIn 1s forwards;
}

@keyframes authicaWelcomeSlideIn{
	/* Default = edge-safe for TOP bars (slides in from below). */
	from{ opacity: 0; transform: translateY(48px); }
	to{ opacity: 1; transform: translateY(0); }
}

/* Edge-safe: BELOW bars must slide in from ABOVE (never from below). */
.authica-welcome-pos-below.authica-welcome-anim-slide{
	animation: authicaWelcomeSlideInUp 1s forwards;
}

@keyframes authicaWelcomeSlideInUp{
	from{ opacity: 0; transform: translateY(-48px); }
	to{ opacity: 1; transform: translateY(0); }
}


/* Edge-safe variants: prevent slide/bounce from moving off-screen at the top/bottom edges */
.authica-welcome-pos-top.authica-welcome-anim-slide{
	animation: authicaWelcomeSlideInDown 1s forwards;
}

@keyframes authicaWelcomeSlideInDown{
	from{ opacity: 0; transform: translateY(48px); }
	to{ opacity: 1; transform: translateY(0); }
}


.authica-welcome-anim-zoom{
	animation: authicaWelcomeZoomIn 0.6s forwards;
}

@keyframes authicaWelcomeZoomIn{
	from{ opacity: 0; transform: scale(0.8); }
	to{ opacity: 1; transform: scale(1); }
}

.authica-welcome-anim-bounce{
	animation: authicaBounceIn 0.9s cubic-bezier(.23,1.24,.32,1) forwards;
}

@keyframes authicaBounceIn{
	0%{ opacity: 0; transform: translateY(40px) scale(0.97); }
	60%{ opacity: 1; transform: translateY(-12px) scale(1.04); }
	80%{ transform: translateY(4px) scale(0.98); }
	100%{ opacity: 1; transform: translateY(0) scale(1); }
}

/* Bounce: invert direction depending on bar position to stay inside the viewport */
.authica-welcome-pos-below.authica-welcome-anim-bounce{
	animation: authicaBounceInUp 0.9s cubic-bezier(.23,1.24,.32,1) forwards;
}

@keyframes authicaBounceInUp{
	/* BELOW bar: never translate DOWN (positive Y). */
	0%{ opacity: 0; transform: translateY(-24px) scale(0.97); }
	60%{ opacity: 1; transform: translateY(0px) scale(1.04); }
	80%{ transform: translateY(-6px) scale(0.98); }
	100%{ opacity: 1; transform: translateY(0) scale(1); }
}

.authica-welcome-pos-top.authica-welcome-anim-bounce{
	animation: authicaBounceInDown 0.9s cubic-bezier(.23,1.24,.32,1) forwards;
}

@keyframes authicaBounceInDown{
	/* TOP bar: never translate UP (negative Y). */
	0%{ opacity: 0; transform: translateY(24px) scale(0.97); }
	60%{ opacity: 1; transform: translateY(0px) scale(1.04); }
	80%{ transform: translateY(6px) scale(0.98); }
	100%{ opacity: 1; transform: translateY(0) scale(1); }
}


.authica-welcome-anim-pulse{
	opacity: 0;
	animation: authicaPulseIn 0.7s cubic-bezier(.45,1.7,.6,1) forwards;
}

@keyframes authicaPulseIn{
	0%{ opacity: 0; transform: scale(0.92); }
	50%{ opacity: 1; transform: scale(1.04); }
	70%{ transform: scale(0.98); }
	100%{ opacity: 1; transform: scale(1); }
}


/* =========================================================
	21) Message bars – responsive
   ========================================================= */

@media (max-width: 540px){
	.authica-welcome-message{
		padding: 0.5em 1em;
	}

	.authica-welcome-style-toast{
		right: 12px;
		left: 12px;
		width: auto;
		max-width: 94vw;
	}

	.authica-welcome-style-overlay{
		min-width: 120px;
		padding: 1em 1.5em;
	}
}


/* =========================================================
	22) Fonts (variable mapping, resilient fallbacks)
	- Supports both old and new variable names
   ========================================================= */

.authica-root,
.authica-root *{
	font-family: var(--authica-font-family, system-ui), sans-serif;
	font-synthesis-weight: none;
	font-synthesis-style: none;
}

/* Title font */
.authica-title-text{
	font-family:
		var(--authica-title-font,
		var(--authica-font-family, system-ui)), sans-serif;
}

/* Form text font (supports --authica-form-text-font OR --authica-text-font) */
.authica-form-text,
.authica-form-links,
p.authica-remember-me,
p.authica-remember-me label{
	font-family:
		var(--authica-form-text-font,
		var(--authica-text-font,
		var(--authica-font-family, system-ui))), sans-serif;
}

/* Input font */
.authica-input,
.authica-form-overlay input,
.authica-register-overlay input,
.authica-lostpass-overlay input,
.authica-resetpass-overlay input,
.authica-2fa-overlay input{
	font-family:
		var(--authica-input-font,
		var(--authica-font-family, system-ui)), sans-serif;
}

/* Button font */
.authica-login-btn,
.authica-form-overlay button,
.authica-form-overlay input[type="submit"]{
	font-family:
		var(--authica-button-font,
		var(--authica-font-family, system-ui)), sans-serif;
}

/* Footer font */
.authica-footer-bar{
	font-family:
		var(--authica-footer-font,
		var(--authica-font-family, system-ui)), sans-serif;
}

/* Turnstile: prevent parent clipping while the captcha bar is visible */
.authica-centerer.authica-captcha-overflow{ overflow: visible !important; }


/* =========================================================
   Turnstile: Stable border overlay (draw on .cf-turnstile so it matches widget size)
   ========================================================= */
/* =========================================================
   Turnstile scaling (render at 100%, then shrink to chosen %)
   - We do NOT scale the captcha bar itself (prevents 74/75/76/77 border drift)
   - We scale an inner wrapper and size the bar to the scaled dimensions
   ========================================================= */

.authica-turnstile-box{
	position: relative;
	z-index: 1;
	display: block;
	line-height: 0;
}

.authica-turnstile-scale{
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: top left;
	line-height: 0;
}

.authica-turnstile-box .cf-turnstile,
.authica-turnstile-box iframe{
	display: block;
	line-height: 0;
}

/* Turnstile border (scaled-only): draw on the CAPTCHA BAR, aligned to the widget edge.
	- We render Turnstile at 100% and scale an inner wrapper
	- Bar has padding: 0 2px (so the widget sits inset by 2px on each side)
	- This border is drawn at left/right = 2px so it overlays the widget edge,
	  avoiding "double frame" while still fixing missing-side borders on Firefox. */

.authica-turnstile-scale{ z-index: 1; }

.authica-captcha-bar.authica-ts-scaled::after,
.authica-captcha-bar-below.authica-ts-scaled::after{
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 2px;
	right: 2px;
	border: 1px solid rgba(255,255,255,0.96);
	border-radius: 2px;
	pointer-events: none;
	z-index: 3;
}


/* =========================================================
   Turnstile: NO borders (user request)
   - Remove any Authica-added border overlays on captcha bars
   ========================================================= */
.authica-captcha-bar::after,
.authica-captcha-bar-below::after,
.authica-captcha-bar.authica-ts-scaled::after,
.authica-captcha-bar-below.authica-ts-scaled::after{
	content: none !important;
	display: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

@media (max-width: 420px){
	.authica-login-actions{
		gap: 8px;
	}

	.authica-passkey-link-row{
		margin-top: 10px;
	}
}

.authica-passkey-login-wrap {
	margin-top: 0;
}

.authica-passkey-login-btn.is-disabled {
	opacity: 0.7;
	cursor: not-allowed;
	text-decoration: none;
}
