/* PrepMode EduTech — loaders (D-LOADER, 19 Nov 2026). Design: canvas "PrepMode EduTech — loaders", style A (answer bubbles).
   Works with js/loader.js. Colours come from the institute (--brand, --brand-fill, --brand-fill-ink set by app.js / a11y.js),
   so nothing here names an institute. Exam screens are never touched. Undo = remove the loader.css and loader.js lines from index.html. */

/* ---------- answer bubbles (A–E fill one after another) ---------- */
.ld-bubs { display: flex; gap: 10px; justify-content: center; }
.ld-bubs > span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #D0D5DD; box-sizing: border-box; display: grid; place-items: center;
  font: 600 12px/1 var(--body, "Inter", system-ui, sans-serif); color: #667085; animation: ld-fill 1.8s ease-in-out infinite; }
.ld-bubs > span:nth-child(2) { animation-delay: .2s; } .ld-bubs > span:nth-child(3) { animation-delay: .4s; }
.ld-bubs > span:nth-child(4) { animation-delay: .6s; } .ld-bubs > span:nth-child(5) { animation-delay: .8s; }
@keyframes ld-fill {
  0%, 6% { background: transparent; border-color: var(--ld-off, #D0D5DD); color: var(--ld-off-ink, #667085); }
  14%, 34% { background: var(--ld-c); border-color: var(--ld-c); color: var(--ld-ink); }
  46%, 100% { background: transparent; border-color: var(--ld-off, #D0D5DD); color: var(--ld-off-ink, #667085); }
}
.ld-bubs.sm { gap: 5px; justify-content: flex-start; }
.ld-bubs.sm > span { width: 18px; height: 18px; border-width: 1.5px; font-size: 9px; }

/* ---------- first-load screen ---------- */
.ld-boot { --ld-c: var(--brand-fill, var(--brand, #0E7C7B)); --ld-ink: var(--brand-fill-ink, var(--brand-ink, #FFFFFF));
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: #FFFFFF; color: #101828; font-family: var(--body, "Inter", system-ui, sans-serif); text-align: center; animation: ld-in .25s ease-out both; }
.ld-id { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ld-tile { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; background: var(--ld-c); color: var(--ld-ink);
  font: 700 28px/1 var(--display, var(--body, "Inter", system-ui, sans-serif)); letter-spacing: .02em; overflow: hidden; }
.ld-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-logo { max-width: 220px; max-height: 72px; object-fit: contain; display: block; }
.ld-name { font: 700 20px/1.2 var(--display, var(--body, "Inter", system-ui, sans-serif)); color: inherit; }
.ld-wait { margin: 0; max-width: 320px; font-size: 14px; line-height: 1.5; color: #475467; }
.ld-wait strong { display: block; font: 700 17px/1.3 var(--display, inherit); color: #101828; margin-bottom: 2px; }
.ld-boot .ld-again { margin-top: 4px; }
/* installed app: the whole screen in the institute's colour */
.ld-boot.ld-app { --ld-off: rgba(255, 255, 255, .5); --ld-off-ink: #FFFFFF; --ld-c: #FFFFFF; background: var(--ld-bg); color: var(--ld-bg-ink, #FFFFFF); }
.ld-boot.ld-app .ld-tile { width: 88px; height: 88px; border-radius: 22px; background: #FFFFFF; color: var(--ld-bg); font-size: 34px; }
.ld-boot.ld-app .ld-name { font-size: 22px; }
.ld-boot.ld-app .ld-wait, .ld-boot.ld-app .ld-wait strong { color: inherit; }
/* PrepMode's own portals (Platform administration, Content studio) */
.ld-boot.ld-dark { --ld-c: #FFC857; --ld-ink: #101828; --ld-off: rgba(255, 255, 255, .35); --ld-off-ink: #D0D5DD; background: #101828; color: #FFFFFF; gap: 36px; }
.ld-boot.ld-dark .ld-id { flex-direction: row; align-items: center; gap: 12px; }
/* PrepMode's P mark, as on prepmode.ai: the knob slides like a switch (off: grey, on: teal body + sun knob) */
.ld-pm { display: block; height: 64px; width: auto; overflow: visible; }
.ld-pm .ld-pb { fill: #0E7C7B; animation: ld-pbody 2.4s ease-in-out infinite; }
.ld-pm .ld-knob { fill: #FFC857; stroke: rgba(0, 0, 0, .14); stroke-width: 2; animation: ld-knob 2.4s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes ld-knob { 0%, 12% { transform: translateX(0); fill: #7D8C9B; } 38%, 62% { transform: translateX(36px); fill: #FFC857; } 88%, 100% { transform: translateX(0); fill: #7D8C9B; } }
@keyframes ld-pbody { 0%, 12% { fill: #42556A; } 38%, 62% { fill: #0E7C7B; } 88%, 100% { fill: #42556A; } }
@font-face { font-family: "LD Urbanist"; font-weight: 900; font-display: block; src: url(data:font/woff2;base64,d09GMgABAAAAAARYABAAAAAACFQAAAP9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhYbgTYcIAZgP1NUQVREAFQRCAqFFIRCATYCJAMgCxIABCAFg2oHIAwHG9gGAB6FcZsTDqEIle9M2W1HmxAPX2vl+909cEAg1LpzwGHFQqZ8Vphg+ZQPC0ksXBT5M25+eE97KSYo7eR0IFN4Mr935hdUnID+B6CFfXWYevelUfdW7MEe+EFfZL+0Nl5aTbVggIKPwV4pz+kakGgwoJJlblSpo/r0HxEYBiQhNEJg0ConyGF4bCrIKdD9LxB38XI+yCEQiqQVWsklJFzHRlbTXfLGI70eBXRvAqC7oTdA98iOR3bntrMqR+QShjRcsBQ5XS8cCaYqeeSal5lgT6EUNrETKqpp0g7wNKyQPkIvZQqGFEgkwsIMBPBiF4+S4+EkxClvuP+UaE+RLwjI51UtgHVEsQ4JpkNou+seg1mJAD/iqCAIhGK8GzFI7AQ1l0lhDYAACRnTiCLcTbILDGvp4ZclwgmVd5LCLiX4odttxbSpGaQJQYhjb9OCcWAYvwBiBwAUQEhwjxhRVtRWM5DXUAul1RUblOvUM5XymQrsXMUG1QGxGFpFIgUFkqzigFSKtEkkCgqFSpCTvxX6JYCJtEkLigNiLNft1i8SQatYzOsXAK5KVVk6JfbYJ0WLRCK28nLR8WL6rrYSZTdUgys1KMMPoS+k7zdEKyhgHlRasV7Z/HK5RFjm/rrtpL46uRY0n/t6NoiWuI59Xvl8BUMwqi/pzmoVhyt5pyurhaeOVAiemMWetsPsbEPs7V8It9qdBvf7d5yAjM/Ivd6MJfGOJY2OJh3j8RBgiIPZszlY9LMrEA/y49BoFGg2MLA0yJcCfhdAF/ofDXW/H+PFHe8d3ZfEqD3P7N3tc1+neuHai1DzKzvRtruo4f6dH98kdtfc8sKirR0daMgTq8t7N8Y3tITG0TG0dxlHn+wAN3pAkCcj29/TOzvQnREQ7Iln+8HG58Eq5T9poCXxcSIj8cQe/KSGkMffuwJKg5EDG6AzYOAY+7bBUEfz3EnFoAWN8GypQlFrNNbJKRZ1BIBAXB7rer6cV6Dq/1Uuy14B/NmcPw74v6LS+E/0T2loQpYLoJZAcHe8w8MlaL/7t4EA9mzzC6VNJ/RLJWjJG/6lkP9KbTb7JQha15DdQW6jMwsMeRLrK/LAMyAlYdm6JBn1WZL1XFhbykkqi/6Ja8uhV4eA4XDHGCEHSxRgMGKx9dekQwgBoTrlWBiYKplxReGKykwqJpyZNOWKFeFjqcCHJSonwIYrSdsTU6USk0A5B5hlhxmrJBTdvlAoBhY5vEoxFyUEeNBwthyuLndjtLfN7PtP03AV1WZxJCcYqtL+ejkqF24o3PiJESZZPL821J1xun7Mi1gE+Mye2WuiDMuKpaNUKspFrPGx6WeobyFABLR1i/VUvkX+d400BAA=) format("woff2"); }
@font-face { font-family: "LD Urbanist"; font-weight: 700; font-display: block; src: url(data:font/woff2;base64,d09GMgABAAAAAAPIABAAAAAABywAAANtAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhYbgTIcIAZgP1NUQVREAEQRCAqDEIJjATYCJAMcCxAABCAFg2QHIAwHG9sFUZQtzidIfhzGzugwNoYDIWTbZIyVbNh7EVYeOUZQ7ffZ8+D+O6Ig+KuoSEQF5IAVsSYbVhGK6FdchANERztkp/eF+GOETS6ITwNdKk/was71BGHuCud/fuHENfUzAXuRxDPKpkit8Ch6wBk94CIF/nw8G+DAdDTbckv0LYEgl8khJiHx8MPciwm0ADIhNAiBJsOQIFOmRSQAGwWkJBAbVhk0wAaBUMhUQiUzhwUWwlgpASB9TT92z7OkDxxXpoH0Ij0kvYRYG41yECzGOUoKZ2Dk8taBhwgCXUJRzM7qSsqeYglH0SGrG5elSM1NRZFZlyMAYPbUuCgwZLLE2sb/LVQz4jcC8vdlOWAEczGDc+hhhjHMtq/BIIJfOFmkK9zxB4gqqyMXshgLIECGHD3MBXpY6ANUKhmmCpGYYLIQCUm6merpnAAQItEOaqANNWwGXAAUgJAJIcSoVseWlqr/poNXVw+j4dH1vebWF4kJV1dNLbcvbjtw5/JOc+u95MSLl+aq1kNOyQFWako6giJEw91ikx09oJNT1qola7e7eWdT2VY04TlF+24OVVNjS2w6eHUX1s0NB+rS19fwQ2ZpYMe6+naJ1dFjWqzHtuzBHTOBfZmNt5AVspCclzEcVtEsXsgvkMzjxFBYRsFcCjvs1pTZENgPypXlJ93/qs1N1X93twYxaM/rvn97yByT1VTLx7Kz5aM1NaOyrIewqea9MuDr91d95Ttgn6V3oHUogdhxkYCZt7Yn55rfm+fewZTv1P9oq8c07b2vIGyiLa+wqDUvZKLgzrK66IfeyYNMAAIQkd1rxXrHbGfOR5VbnwiDh2Mnb8KTwbY9/9//b2leUdu4siKylqnYfCdA/Hm7B0KOqeXvrSwPWlBOUF7MUl4OweJnHrDgQxDULGBpGcu8Xy7QLGTmikacYWihw4iWqZzXcn2WtcIgr0DJhgXYgAR5BC0xHgx0SrlS+yNiLLtYQExLp4KBQjEMhGKgYaBDJcAUQiUyyJNLQ8EIQsUw0CpRKB+EEjKBMFoGRigcDATpGLFQURVTgDAmeSjyaalRsW9QqIIaU18zxrvfLaKlUoCOgomGiS2cVJwo7ESePDZTHK0nKWweZKKWJlG+a2E7WeHUqqFgDFTV88V9LZx6mzmQThtHZq9G6mxxBAA=) format("woff2"); }
.ld-word { display: flex; flex-direction: column; text-align: left; font-family: "LD Urbanist", "Urbanist", var(--display, sans-serif); line-height: 1; }
.ld-word b { font-weight: 900; font-size: 34px; letter-spacing: -.02em; color: #FFFFFF; }
.ld-word small { margin-top: 5px; font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #FFC857; }
.ld-boot.ld-dark .ld-wait, .ld-boot.ld-dark .ld-wait strong { color: #D0D5DD; }
.ld-boot.ld-dark .ld-wait strong { color: #FFFFFF; }

/* ---------- placeholders while a page or panel loads ---------- */
p.loading.ld-sk { padding: 8px 0 24px; color: var(--slate, #475467); animation: ld-in .2s ease-out .12s both; }
.ld-sk .ld-b { display: block; background: #EAECF0; border-radius: 6px; position: relative; overflow: hidden; }
.ld-sk .ld-b::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); animation: ld-sheen 1.6s ease-in-out infinite; }
.ld-sk .ld-col { display: flex; flex-direction: column; gap: 10px; }
.ld-sk .ld-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 24px 0; }
.ld-sk .ld-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--rule, #EAECF0); border-radius: 12px; background: var(--surface, #FFFFFF); }
.ld-sk .ld-rows { display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--rule, #EAECF0); border-radius: 12px; background: var(--surface, #FFFFFF); }
.ld-sk .ld-row { display: flex; align-items: center; gap: 12px; }
.ld-sk .ld-row .ld-b:nth-child(2) { flex: 1; }
.ld-sk.ld-box { padding: 12px 0; }
/* a loading line with its own words ("Checking every row…") keeps the words, with small bubbles */
p.loading.ld-msg { --ld-c: var(--brand-fill, var(--brand, #0E7C7B)); --ld-ink: var(--brand-fill-ink, #FFFFFF); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* "Still loading…" after a few seconds */
.ld-slow { display: block; margin-top: 16px; font-size: 14px; line-height: 1.5; color: var(--slate, #475467); }
.ld-slow strong { color: var(--ink, #101828); }

/* ---------- a load that failed ---------- */
.empty.ld-fail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; border-style: solid; border-color: var(--rule, #EAECF0); }
.ld-fail .ld-fail-ico { width: 40px; height: 40px; color: var(--danger, #B42318); }
.ld-fail .ld-fail-h { margin: 0; font: 700 20px/1.3 var(--display, inherit); color: var(--ink, #101828); }
.ld-fail .ld-fail-p { margin: 0; max-width: 380px; font-size: 15px; line-height: 1.5; color: var(--slate, #475467); }
.ld-fail .ld-again { margin-top: 8px; }

/* ---------- buttons: working, done, failed ---------- */
.ld-busy { cursor: progress !important; }
.ld-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ld-dots > span { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; opacity: .75; animation: ld-dot 1.2s ease-in-out infinite; }
.ld-dots > span:nth-child(2) { animation-delay: .15s; } .ld-dots > span:nth-child(3) { animation-delay: .3s; }
@keyframes ld-dot { 0%, 15% { background: transparent; } 30%, 60% { background: currentColor; } 80%, 100% { background: transparent; } }
button.ld-done, .btn.ld-done { background: var(--ok, #027A48) !important; border-color: var(--ok, #027A48) !important; color: #FFFFFF !important; }
.ld-done .ld-tick { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
button.ld-failed, .btn.ld-failed { background: #FFFFFF !important; border: 1px solid var(--danger, #B42318) !important; color: var(--danger, #B42318) !important; }

/* ---------- shared ---------- */
.ld-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes ld-sheen { to { transform: translateX(100%); } }
@keyframes ld-in { from { opacity: 0; } to { opacity: 1; } }

/* still versions: reduced motion, and anything on the way into a test */
@media (prefers-reduced-motion: reduce) {
  .ld-bubs > span, .ld-dots > span, .ld-sk .ld-b::after, .ld-boot, p.loading.ld-sk, .ld-pm .ld-pb, .ld-pm .ld-knob { animation: none !important; }
  .ld-pm .ld-knob { transform: translateX(36px); }
  .ld-sk .ld-b::after { display: none; }
  .ld-bubs > span:first-child { background: var(--ld-c); border-color: var(--ld-c); color: var(--ld-ink); }
}
.ld-still .ld-bubs > span { animation: none; }
.ld-still .ld-bubs > span:first-child { background: var(--ld-c); border-color: var(--ld-c); color: var(--ld-ink); }
