/* SIS Course Non-Degree — Subject Booking: emoji loader (front end + admin).
   Self-contained: it is mounted inside the catalog, dialogs, the admin
   workspace and directly on <body>. */

.cndx-ld {
	--ld-ink: #344054;
	--ld-mute: #667085;
	--ld-slot: #f2f4f7;
	--ld-ring: rgba(18, 113, 90, .16);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	font-family: "Sis-Reg", "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1;
	color: var(--ld-ink);
	pointer-events: none;
}
.cndx-ld__row { display: inline-flex; gap: .3rem; }
.cndx-ld__slot {
	display: grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border-radius: .7rem;
	background: var(--ld-slot);
	box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
	font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
	font-size: 1.15rem;
	line-height: 1;
}
.cndx-ld__slot.is-on { animation: cndx-ld-pop .26s cubic-bezier(.34, 1.56, .64, 1) both; background: #fff; box-shadow: 0 0 0 1px var(--ld-ring), 0 4px 10px -6px rgba(16, 24, 40, .35); }
.cndx-ld__slot.is-out { animation: cndx-ld-out .16s ease both; }
@keyframes cndx-ld-pop { from { transform: scale(.35) translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cndx-ld-out { to { transform: scale(.7); opacity: 0; } }
.cndx-ld__text { color: var(--ld-mute); font-size: .9rem; line-height: 1.3; text-align: center; }
.cndx-ld__text--sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cndx-ld--lg .cndx-ld__slot { width: 2.75rem; height: 2.75rem; border-radius: .9rem; font-size: 1.5rem; }
.cndx-ld--lg .cndx-ld__text { font-size: 1rem; }
.cndx-ld--sm { flex-direction: row; gap: .45rem; }
.cndx-ld--sm .cndx-ld__row { gap: .15rem; }
.cndx-ld--sm .cndx-ld__slot { width: 1.35rem; height: 1.35rem; border-radius: .45rem; font-size: .8rem; }
.cndx-ld--sm .cndx-ld__text { font-size: .8125rem; }
.cndx-ld--light { --ld-ink: #fff; --ld-mute: rgba(255, 255, 255, .85); --ld-slot: rgba(255, 255, 255, .16); --ld-ring: rgba(255, 255, 255, .35); }
.cndx-ld--light .cndx-ld__slot.is-on { background: rgba(255, 255, 255, .95); }

/* placements */
.cndx-ld-inline { display: inline-flex; animation: cndx-ld-fade .2s ease both; }
.cndx-ld-inline.is-block { display: flex; justify-content: center; width: 100%; padding: 2.5rem 1rem; }
.cndx-ld-inline.is-leaving, .cndx-ld-overlay.is-leaving, .cndx-ld-chip.is-leaving, .cndx-ld-screen.is-leaving { animation: cndx-ld-fade .18s ease reverse both; }

.cndx-ld-overlay {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, .62);
	backdrop-filter: blur(1.5px);
	-webkit-backdrop-filter: blur(1.5px);
	border-radius: inherit;
	animation: cndx-ld-fade .2s ease both;
}
.cndx-ld-overlay.is-top { align-items: start; padding-top: 2.5rem; }
.cndx-ld-overlay .cndx-ld { padding: .9rem 1.1rem; border-radius: 1rem; background: #fff; box-shadow: 0 16px 36px -14px rgba(16, 24, 40, .3), 0 0 0 1px rgba(16, 24, 40, .05); }
.cndx-ld-overlay.is-top .cndx-ld { position: sticky; top: 7rem; }

.cndx-ld-screen {
	position: fixed;
	inset: 0;
	z-index: 100090;
	display: grid;
	place-items: center;
	background: rgba(16, 24, 40, .35);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: cndx-ld-fade .2s ease both;
}
.cndx-ld-screen__card { padding: 1.4rem 1.6rem; border-radius: 1.2rem; background: #fff; box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .4); }

.cndx-ld-chip {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 100080;
	padding: .55rem .8rem;
	border-radius: 999px;
	background: #101828;
	box-shadow: 0 14px 30px -10px rgba(16, 24, 40, .5);
	animation: cndx-ld-chip-in .25s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes cndx-ld-chip-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* buttons keep their size; label hides under the loader */
.cndx-ld-busy { position: relative; }
.cndx-ld-busy > :not(.cndx-ld-btn) { visibility: hidden; }
.cndx-ld-busy::after, .cndx-ld-busy::before { display: none !important; }
.cndx-ld-btn { position: absolute; inset: 0; display: grid; place-items: center; }
.cndx-ld-btn .cndx-ld__slot { width: 1.2rem; height: 1.2rem; font-size: .72rem; }

@keyframes cndx-ld-fade { from { opacity: 0; } to { opacity: 1; } }

/* Reduced motion: emojis still change (that change is the "alive" signal),
   they just do not bounce. */
@media (prefers-reduced-motion: reduce) {
	.cndx-ld__slot.is-on, .cndx-ld__slot.is-out, .cndx-ld-inline, .cndx-ld-overlay, .cndx-ld-chip, .cndx-ld-screen { animation: none !important; }
}
/* bare text nodes inside the button are hidden too */
.cndx-ld-busy { color: transparent !important; }
.cndx-list > .cndx-ld-inline { grid-column: 1 / -1; }

/* the floating card has to read clearly over dimmed content */
.cndx-ld-overlay .cndx-ld { padding: 1rem 1.25rem; box-shadow: 0 18px 40px -14px rgba(16, 24, 40, .38), 0 0 0 1px rgba(16, 24, 40, .08); }
.cndx-ld-overlay .cndx-ld__slot { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; background: #eef1f4; }
.cndx-ld-overlay .cndx-ld__text { color: #344054; font-size: .95rem; }

/* the card follows the viewport while the (tall) list loads, so it is seen
   wherever the visitor is scrolled to */
.cndx-list .cndx-ld-overlay, .cndx-list .cndx-ld-overlay.is-top { align-items: start; justify-items: center; padding: 0; }
.cndx-list .cndx-ld-overlay .cndx-ld { position: sticky; top: calc(50vh - 3.5rem); margin: 2.5rem 0; }
