/* Skeleton loading (2026-12-01, owner: «Skeleton loading رو برای سایتمون داشته باشیم»). Behaviour after the 21st.dev
   «Skeleton Swap» (ddoemonn, id 23557, code retrieved 2026-12-01): a skeleton only when the wait is longer than 120 ms
   (no flash on fast loads), kept at least ~380 ms, then the content crossfades in with a little blur, without moving the
   layout. Rebuilt in plain CSS/JS in the site's ink-and-gold. Places: photos (skel.js), search window (app.js), the
   «دسته‌ها» tree (tree-menu.js). Dropping the `tg-skel` enqueue lines in functions.php removes all of it. */

/* one bar */
.sk{display:block; height:.72em; border-radius:6px; background:linear-gradient(100deg, rgba(216,178,74,.07) 30%, rgba(241,210,122,.17) 50%, rgba(216,178,74,.07) 70%) 0 0 / 240% 100%;
  animation:sk-sheen 1.5s linear infinite}
.sk + .sk{margin-top:.55em}
@keyframes sk-sheen{from{background-position:120% 0} to{background-position:-120% 0}}
@keyframes sk-in{from{opacity:0; filter:blur(4px); transform:scale(.99)}}
@keyframes sk-appear{from{opacity:0} to{opacity:1}}

/* photos: the frame shimmers while the picture downloads, then the picture settles in */
img.sk-wait{background:linear-gradient(100deg, #1b150e 30%, #2d2416 50%, #1b150e 70%) 0 0 / 240% 100%; animation:sk-sheen 1.6s linear infinite}
img.sk-in{animation:sk-img .45s cubic-bezier(.22,1,.36,1)}
@keyframes sk-img{from{opacity:.01; filter:blur(8px)}}

/* search window: rows shaped like results */
.search-item.sk-row{pointer-events:none; animation:sk-appear .2s both}
.search-item.sk-row .sk-th{flex:none; width:52px; height:52px; border-radius:10px; margin:0}
.search-item.sk-row > div{flex:1; min-width:0}
.search-item.sk-row .sk-s{height:.55em; opacity:.8}
.search-results.sk-fresh .search-item:not(.sk-row){animation:sk-in .35s cubic-bezier(.22,1,.36,1) both}

/* «دسته‌ها» tree: rows shaped like the tree's rows (shown after 120 ms) */
.at-wait.is-sk{opacity:0; animation:sk-appear .25s .12s forwards}
.at-sk{display:flex; align-items:center; gap:10px; min-height:44px; padding:9px 12px; border-radius:12px; border:1px solid var(--line, #3b2e1f); background:var(--ink-2, #1b150e)}
.at-sk .sk{margin:0}
.at-sk .sk-dot{flex:none; width:22px; height:22px; border-radius:50%}
.at-sk .sk-l{flex:1}
.at-sk .sk-n{flex:none; width:34px; height:18px; border-radius:999px}

@media (prefers-reduced-motion: reduce){
  .sk, img.sk-wait{animation:none}
  img.sk-in, .search-results.sk-fresh .search-item, .search-item.sk-row{animation:none}
  .at-wait.is-sk{animation:none; opacity:1}
}
