/* Micromodal — Recallix Design System skin */
.modal { display: none; }
.modal.is-open { display: block; }
.modal__overlay {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(15, 23, 42, 0.5);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: recallix-modal-fade-in 0.2s ease;
}
.modal__container {
	background: var(--rx-bg);
	border-radius: var(--rx-radius-lg);
	box-shadow: var(--rx-shadow-lg);
	width: min(420px, 100%);
	max-height: 90vh;
	overflow: auto;
	position: relative;
	padding: 1.5rem;
	animation: recallix-modal-scale-in 0.2s ease;
}
.modal__container--wide { width: min(var(--rx-content-width), 100%); padding: 0; overflow: hidden; }
.modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	border: 0;
	background: var(--rx-bg-secondary);
	border-radius: 999px;
	width: 2rem;
	height: 2rem;
	padding: 0 !important;
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 1.375rem;
	line-height: 1;
	color: var(--rx-foreground-muted);
	-webkit-text-fill-color: var(--rx-foreground-muted);
	background-image: none;
	/* × 字形视觉略偏上，微调光学居中 */
	transform: translateY(-0.5px);
}
.modal__close:hover,
.modal__close:focus,
.modal__close:focus-visible {
	background: var(--rx-border);
	color: var(--rx-foreground-muted) !important;
	-webkit-text-fill-color: var(--rx-foreground-muted) !important;
}
@keyframes recallix-modal-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
@keyframes recallix-modal-scale-in {
	from { opacity: 0; transform: scale(0.96); }
	to { opacity: 1; transform: scale(1); }
}

/* Sign-in modal */
#recallix-sign-in-modal .modal__container {
	width: min(320px, calc(100% - 2rem));
	padding: 1.375rem 1.25rem 1.5rem;
}
.recallix-signin-modal__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-right: 1.5rem;
}
.recallix-signin-modal__mark {
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border-radius: 0.5rem;
	background: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.recallix-signin-modal__mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
	display: block;
}
.recallix-signin-modal__mark-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: inherit;
	background: linear-gradient(135deg, var(--rx-brand) 0%, var(--rx-brand-hover) 100%);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
}
.recallix-signin-modal__heading {
	min-width: 0;
}
.recallix-signin-modal__title {
	margin: 0 0 0.125rem;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--rx-foreground);
}
.recallix-signin-modal__subtitle {
	margin: 0;
	color: var(--rx-foreground-muted);
	font-size: 0.875rem;
	line-height: 1.4;
}
/* 三 IdP：按钮高度维持，垂直间距加大，补回原先第四行的视觉重量 */
.recallix-signin-providers {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.recallix-signin-provider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.875rem;
	width: 100%;
	min-height: 3rem;
	padding: 0.625rem 1rem;
	border: 1px solid var(--rx-border);
	border-radius: var(--rx-radius-md);
	background: var(--rx-bg);
	color: var(--rx-foreground);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
/* Astra 全局 button:focus/hover 会把 color 设为 transparent，导致白底上文字“消失” */
#recallix-sign-in-modal .recallix-signin-provider,
#recallix-sign-in-modal .recallix-signin-provider:hover,
#recallix-sign-in-modal .recallix-signin-provider:focus,
#recallix-sign-in-modal .recallix-signin-provider:focus-visible,
#recallix-sign-in-modal .recallix-signin-provider:active {
	color: var(--rx-foreground) !important;
	-webkit-text-fill-color: var(--rx-foreground) !important;
	background-image: none;
}
.recallix-signin-provider__icon {
	flex: 0 0 1.125rem;
	width: 1.125rem;
	height: 1.125rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.recallix-signin-provider__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}
.recallix-signin-provider__icon--fallback {
	border-radius: 999px;
	background: var(--rx-bg-secondary);
}
.recallix-signin-provider__label {
	flex: 0 1 auto;
	text-align: left;
	line-height: 1.3;
	white-space: nowrap;
	color: inherit !important;
	-webkit-text-fill-color: inherit !important;
}
.recallix-signin-provider:hover:not(:disabled) {
	background: var(--rx-bg-alt) !important;
	border-color: var(--rx-brand);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.recallix-signin-provider[data-idp="0"]:hover:not(:disabled) {
	border-color: #4285f4;
	background: #f8faff !important;
}
.recallix-signin-provider[data-idp="1"]:hover:not(:disabled) {
	border-color: #0078d4;
	background: #f3f9ff !important;
}
.recallix-signin-provider[data-idp="2"]:hover:not(:disabled) {
	border-color: #24292f;
	background: #f6f8fa !important;
}
.recallix-signin-provider[data-idp="3"]:hover:not(:disabled) {
	border-color: #0f172a;
	background: #f6f7f9 !important;
}
.recallix-signin-provider:focus-visible {
	outline: 2px solid var(--rx-brand);
	outline-offset: 2px;
}
.recallix-signin-provider:disabled { opacity: 0.65; cursor: wait; }
.recallix-signin-provider.is-loading { pointer-events: none; }
.recallix-signin-provider__spinner {
	flex: 0 0 1rem;
	width: 1rem;
	height: 1rem;
	border: 2px solid var(--rx-border);
	border-top-color: var(--rx-brand);
	border-radius: 50%;
	animation: recallix-spin 0.7s linear infinite;
}
@keyframes recallix-spin { to { transform: rotate(360deg); } }

/* 全页 OIDC 离站 overlay */
.recallix-signin-redirect-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(2px);
}
.recallix-signin-redirect-overlay[hidden] {
	display: none !important;
}
body.recallix-signin-redirect-active {
	overflow: hidden;
}
.recallix-signin-redirect-overlay__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.875rem;
	padding: 1.5rem 1.75rem;
	border-radius: 0.75rem;
	background: var(--rx-surface);
	box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
	max-width: min(90vw, 20rem);
	text-align: center;
}
.recallix-signin-redirect-overlay__spinner {
	width: 2rem;
	height: 2rem;
	border: 3px solid var(--rx-border);
	border-top-color: var(--rx-brand);
	border-radius: 50%;
	animation: recallix-spin 0.7s linear infinite;
}
.recallix-signin-redirect-overlay__text {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--rx-foreground);
}
