/* PrivaCore x Tuwaiq Academy co-brand: login lockup + one-time sign-in card (Assets/js/cobrand.js) */

.cb-lockup {
	display: inline-flex;
	align-items: center;
	gap: clamp(12px, 2.4vw, 22px);
	text-decoration: none;
}
.cb-lockup img {
	display: block;
	width: auto;
	height: clamp(24px, 4.6vw, 40px);
}
.cb-lockup .cb-divider {
	width: 1px;
	height: clamp(30px, 5.6vw, 50px);
	background: linear-gradient(#7352a2, #571cbd);
	transform-origin: center;
	animation: cb-grow 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.cb-lockup .cb-privacore {
	animation: cb-slide 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Tuwaiq reads right to left: reveal from its mark toward the wordmark */
.cb-lockup .cb-tuwaiq {
	animation: cb-wipe 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

@keyframes cb-slide {
	from { opacity: 0; transform: translateX(-14px); }
	to { opacity: 1; transform: none; }
}
@keyframes cb-grow {
	from { transform: scaleY(0); }
	to { transform: scaleY(1); }
}
@keyframes cb-wipe {
	from { clip-path: inset(0 0 0 100%); }
	to { clip-path: inset(0 0 0 0); }
}

/* Dashboard Home, once after sign-in: 1) full-screen loader while the dashboard loads */
.cb-intro {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 32px;
	padding: 16px;
	background: #fdfcff;
	transition: opacity 0.35s ease;
}
.cb-intro .cb-lockup img {
	height: clamp(28px, 6vw, 52px);
}
.cb-intro .cb-lockup .cb-divider {
	height: clamp(36px, 7.5vw, 64px);
}
.cb-intro-bar {
	width: min(280px, 60vw);
	height: 3px;
	border-radius: 3px;
	background: #ece8f4;
	overflow: hidden;
}
.cb-intro-bar span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #7352a2, #571cbd);
	transform-origin: left;
	animation: cb-load 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
	transition: transform 0.25s ease-out;
}
.cb-intro.is-done .cb-intro-bar span {
	animation: none;
	transform: scaleX(1);
}
.cb-intro.is-leaving {
	opacity: 0;
}
.cb-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@keyframes cb-load {
	from { transform: scaleX(0); }
	to { transform: scaleX(0.9); }
}

/* 2) then a bottom-right card (opposite the sidebar) that stays until closed with X or Escape */
.cb-card {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1050;
	width: min(340px, calc(100vw - 32px));
	padding: 18px 20px 18px;
	border: 1px solid #ece8f4;
	border-radius: 14px;
	background: #fdfcff;
	box-shadow: 0 16px 40px -12px rgba(87, 28, 189, 0.28);
	overflow: hidden;
	animation: cb-card-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
	transition: opacity 0.25s ease-in, transform 0.25s ease-in;
}
.cb-card.is-leaving {
	opacity: 0;
	transform: translateY(8px);
}
.cb-card .cb-lockup {
	gap: 14px;
	margin-right: 28px;
}
.cb-card .cb-lockup img {
	height: 26px;
}
.cb-card .cb-lockup .cb-divider {
	height: 30px;
}
/* The loader just played the logo entrance; keep the card's logos still */
.cb-card .cb-lockup .cb-divider,
.cb-card .cb-lockup .cb-privacore,
.cb-card .cb-lockup .cb-tuwaiq {
	animation: none;
}
.cb-card-en {
	margin: 14px 0 2px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 500;
	letter-spacing: normal;
	color: #2b2838;
}
.cb-card-ar {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	letter-spacing: normal;
	color: #6b6780;
}
.cb-card-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #6b6780;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.cb-card-close:hover {
	background: #f1eef8;
	color: #2b2838;
}
.cb-card-close:focus-visible {
	outline: 2px solid #571cbd;
	outline-offset: 2px;
}
@keyframes cb-card-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cb-lockup .cb-divider,
	.cb-lockup .cb-privacore,
	.cb-lockup .cb-tuwaiq,
	.cb-intro-bar span,
	.cb-card {
		animation: none;
	}
	.cb-intro,
	.cb-intro-bar span,
	.cb-card {
		transition: none;
	}
}
