/* KFX Google Login
   The button is a plain <button> we style completely. Google's popup is
   triggered programmatically via the OAuth token client, so nothing here
   fights with markup injected by Google. */

.kfx-google-wrap {
	margin: 0 0 20px;
	max-width: 100%;
}

.kfx-google-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 46px;
	padding: 0 20px;
	margin: 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}

.kfx-full-width .kfx-google-btn {
	display: flex;
	width: 100%;
}

.kfx-google-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.kfx-google-face {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	pointer-events: none;
}

.kfx-google-mark {
	flex: 0 0 auto;
	display: block;
	background: none; /* no white tile behind the G */
}

.kfx-google-label { white-space: nowrap; }

/* ---- Shapes ---- */

.kfx-shape-rectangular .kfx-google-btn { border-radius: 8px; }
.kfx-shape-pill .kfx-google-btn        { border-radius: 999px; }

/* ---- Themes ---- */

.kfx-theme-dark .kfx-google-btn {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.16);
	color: #fff;
}
.kfx-theme-dark .kfx-google-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(255, 255, 255, 0.28);
}

.kfx-theme-light .kfx-google-btn {
	background: #fff;
	border: 1px solid #dadce0;
	color: #1f1f1f;
}
.kfx-theme-light .kfx-google-btn:hover:not(:disabled) {
	background: #f7f8f8;
	border-color: #d2d5d9;
}

.kfx-theme-blue .kfx-google-btn {
	background: #1a73e8;
	border: 1px solid #1a73e8;
	color: #fff;
}
.kfx-theme-blue .kfx-google-btn:hover:not(:disabled) {
	background: #1b66c9;
	border-color: #1b66c9;
}

.kfx-theme-inherit .kfx-google-btn {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
	opacity: 0.9;
}
.kfx-theme-inherit .kfx-google-btn:hover:not(:disabled) { opacity: 1; }

/* ---- Busy state ---- */

.kfx-google-btn.is-busy {
	pointer-events: none;
	opacity: 0.65;
}
.kfx-google-btn.is-busy .kfx-google-face { opacity: 0; }

.kfx-google-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	animation: kfx-google-spin .7s linear infinite;
}
.kfx-google-btn.is-busy .kfx-google-spinner { opacity: 1; }

@keyframes kfx-google-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.kfx-google-spinner { animation: none; }
	.kfx-google-btn     { transition: none; }
}

/* ---- Divider ---- */

.kfx-google-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0;
	font-size: 13px;
	letter-spacing: 0.04em;
	opacity: 0.55;
}

.kfx-google-divider::before,
.kfx-google-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: currentColor;
	opacity: 0.35;
}

.kfx-google-divider span { flex: 0 0 auto; }

/* ---- Error ---- */

.kfx-google-error {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-left: 3px solid #e5484d;
	background: rgba(229, 72, 77, 0.09);
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
}
