/* «التنفيذ ثم التحميل» (owner 2026-11-14 «فيه تهنيج … ممكن تستخدم تأثير شيمر»): every tap answers at once —
   a thin progress bar on top + a shimmer over the page while the next page loads (public/js/kload.js), and shimmer
   placeholders (.kl-skel) wherever a list or a conversation is still on its way. Works in the dashboard (app.ejs) and the Kauthar chat. */
:root { --kl-a: #0f766e; --kl-base: #ebe7df; --kl-shine: #f7f4ee; }
@media (prefers-color-scheme: dark) { :root { --kl-base: #2a2825; --kl-shine: #3a3733; } }
.kl-bar { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 100000; pointer-events: none; opacity: 0; transition: opacity .2s; }
.kl-bar::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--kl-a); box-shadow: 0 0 8px var(--kl-a); }
html.kl-going .kl-bar { opacity: 1; }
html.kl-going .kl-bar::before { animation: kl-grow 8s cubic-bezier(.1,.7,.2,1) forwards; }
@keyframes kl-grow { 0% { width: 0 } 10% { width: 35% } 40% { width: 70% } 100% { width: 94% } }
/* the page under a tap that is loading: dimmed + a shimmer sweep — and no second tap gets through */
.kl-veil { position: fixed; inset: 0; z-index: 99999; pointer-events: none; opacity: 0; transition: opacity .15s; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%) 0 0 / 250% 100%; }
html.kl-slow .kl-veil { opacity: 1; pointer-events: auto; animation: kl-sweep 1.1s linear infinite; background-color: rgba(247,245,240,.35); }
@media (prefers-color-scheme: dark) { html.kl-slow .kl-veil { background-color: rgba(22,21,19,.35); } }
/* the tapped control shows it is working */
.kl-busy { position: relative; pointer-events: none; opacity: .75; }
.kl-busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.55) 50%, transparent 75%) 0 0 / 250% 100%; animation: kl-sweep 1s linear infinite; }
/* shimmer placeholders */
.kl-skel { display: block; border-radius: 10px; background: linear-gradient(100deg, var(--kl-base) 30%, var(--kl-shine) 50%, var(--kl-base) 70%) 0 0 / 250% 100%; animation: kl-sweep 1.2s linear infinite; }
@keyframes kl-sweep { from { background-position: 125% 0 } to { background-position: -125% 0 } }
[dir="rtl"] .kl-skel, [dir="rtl"] .kl-busy::after, [dir="rtl"] .kl-veil { animation-direction: reverse; }
.kl-line { height: 46px; margin: 6px 10px; }
.kl-ch { pointer-events: none; }
.kl-dot { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto; }
.kl-txt { width: 46px; height: 10px; margin: 8px auto 0; }
.kl-feed { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.kl-bub { height: 54px; width: 72%; border-radius: 16px; }
.kl-bub.kl-me { align-self: flex-end; width: 52%; }
.kl-bub.kl-tall { height: 96px; }
.kl-card { height: 120px; border-radius: 14px; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .kl-skel, .kl-busy::after, .kl-veil { animation: none !important; } html.kl-going .kl-bar::before { animation: none; width: 70%; } }
