/* The Oleading O in motion (see app/ui/logo.jsx). Reduced motion slows the loops, it never stops
 * them, so a loader does not look frozen. */

@keyframes logo-arc { to { stroke-dashoffset: -100; } }
@keyframes logo-splash-fill { 0% { stroke-dasharray: 0 100; } 75%, 100% { stroke-dasharray: 100 0; } }

.logo-arc { animation: logo-arc 1.4s linear infinite; }
.logo-splash-arc { animation: logo-splash-fill 3s ease-in-out infinite; }
.logo-fill { transition: stroke-dasharray .5s var(--ease-out, ease); }
.logo-progress.is-done { animation: logo-pop .45s var(--ease-out, ease) both; }
@keyframes logo-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.logo-loader, .logo-progress { color: var(--text); }

/* A panel waiting for the server. */
.logo-loading { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.logo-loading-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--muted); }
.logo-loading-text strong { color: var(--text); font-weight: 600; }

/* ---- the same arc inside buttons, replacing the plain spinner ---- */
.kb-btn.is-busy::after {
  border: 0; border-radius: 0; width: 18px; height: 18px; animation: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='40 50 160 140'%3E%3Cstyle%3E@keyframes a%7Bto%7Bstroke-dashoffset:-100%7D%7D.a%7Banimation:a 1.2s linear infinite%7D%3C/style%3E%3Cpath d='M98 65H142C172 65 185 87 185 109V131C185 153 172 175 142 175H98C68 175 55 153 55 131V109C55 87 68 65 98 65Z' fill='none' stroke='white' stroke-opacity='.3' stroke-width='24'/%3E%3Cpath class='a' d='M98 65H142C172 65 185 87 185 109V131C185 153 172 175 142 175H98C68 175 55 153 55 131V109C55 87 68 65 98 65Z' pathLength='100' stroke-dasharray='28 72' fill='none' stroke='white' stroke-width='24' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.kb-root[data-theme='light'] .kb-btn:not(.kb-btn-accent):not(.kb-btn-danger).is-busy::after { filter: invert(1) brightness(.35); }

/* ---- navigation progress: a thin accent line and the O in the top bar while a page loads ---- */
.kb-navprogress {
  position: fixed; z-index: 70; top: 0; left: 0; height: 2px; width: 100%; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; opacity: 0;
  transition: opacity .15s ease;
}
.kb-navprogress.is-on { opacity: 1; animation: kb-navprogress 1.1s ease-in-out infinite; }
@keyframes kb-navprogress { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.kb-navspin {
  position: fixed; z-index: 70; top: 62px; left: 50%; margin-left: -15px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-4px) scale(.9); pointer-events: none; transition: opacity .15s ease, transform .15s ease;
}
.kb-navspin.is-on { opacity: 1; transform: none; }
@media (max-width: 860px) { .kb-navspin { top: 108px; } }

@media (prefers-reduced-motion: reduce) {
  .logo-arc { animation-duration: 4s; }
  .logo-splash-arc { animation-duration: 8s; }
  .kb-navprogress.is-on { animation-duration: 3s; }
}

/* ---- the O replaces the dot and ring spinners where the app waits ---- */
:root { --logo-arc-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='40 50 160 140'%3E%3Cstyle%3E@keyframes a%7Bto%7Bstroke-dashoffset:-100%7D%7D.a%7Banimation:a 1.4s linear infinite%7D@media (prefers-reduced-motion:reduce)%7B.a%7Banimation-duration:4s%7D%7D%3C/style%3E%3Cpath d='M98 65H142C172 65 185 87 185 109V131C185 153 172 175 142 175H98C68 175 55 153 55 131V109C55 87 68 65 98 65Z' fill='none' stroke='%239b9b98' stroke-opacity='.25' stroke-width='20'/%3E%3Cpath class='a' d='M98 65H142C172 65 185 87 185 109V131C185 153 172 175 142 175H98C68 175 55 153 55 131V109C55 87 68 65 98 65Z' pathLength='100' stroke-dasharray='28 72' fill='none' stroke='%234f6bf6' stroke-width='20' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Chat and assistant "typing": the O instead of three dots. */
.ch-typing i, .kb-assist-typing span { display: none; }
.ch-typing::before, .kb-assist-typing::before {
  content: ''; display: block; width: 26px; height: 24px; background: var(--logo-arc-url) center / contain no-repeat;
}

/* Upload in progress. */
.up-busy-spin { width: 34px; height: 30px; border: 0; border-radius: 0; animation: none; background: var(--logo-arc-url) center / contain no-repeat; }

/* Listings wizard: the O fills as you move through the steps. */
.kb-step-logo { display: inline-flex; margin-right: 10px; }

/* Login: the splash tile above the wordmark. */
.auth-splash { display: flex; justify-content: flex-start; margin: 0 0 16px; }
.auth-splash .logo-splash { border-radius: 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }

/* AI answer waiting: loader first, then placeholder lines. */
.srch-ai-skel .logo-loading { padding: 0 0 12px; }
