/* The automation library, after the app's Automations tab (sidebars.bdeb2397/automations.03378ba4.css): a search field
   on the ground, topic chips with their 3D icons, and cards with a thumbnail, the app, what it does and when it runs. */
.lib-tools { display: grid; gap: var(--sp-16); }
.lib-search { position: relative; display: block; }
.lib-search-ic { position: absolute; left: var(--sp-16); top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.lib-search input {
  width: 100%; height: var(--btn-l); padding: 0 var(--sp-16) 0 var(--sp-48);
  background: var(--surface); border: var(--hair) solid var(--sel); border-radius: var(--r-pill);
  font-size: var(--fs-body);
  transition: border-color var(--d-fast) var(--ease-std);
}
.lib-search input::placeholder { color: var(--muted); }
.lib-search input:focus-visible { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.lib-chips { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.lib-chip {
  display: inline-flex; align-items: center; gap: var(--sp-6); min-height: 40px; padding: 0 var(--sp-12) 0 var(--sp-8);
  background: var(--surface); border: var(--hair) solid var(--sel); border-radius: var(--r-pill);
  font-size: var(--fs-small); font-weight: 500; white-space: nowrap;
  transition: background-color var(--d-fast) var(--ease-std), border-color var(--d-fast) var(--ease-std);
}
.lib-chip:hover { background: var(--ground); }
.lib-chip[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); }
.lib-chip .fx { width: 22px; height: 22px; }
.lib-chip small { color: var(--muted); font-size: var(--fs-tiny); font-variant-numeric: tabular-nums; }
.lib-sum { min-height: 20px; margin: var(--sp-24) 0 var(--sp-12); font-size: var(--fs-meta); color: var(--muted); }

.lib-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-16); }
.lib-card { display: flex; flex-direction: column; background: var(--surface); border: var(--hair) solid var(--sel); border-radius: var(--r-surf); overflow: hidden; }
.lib-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ground); }
.lib-body { display: flex; flex-direction: column; gap: var(--sp-12); flex: 1; padding: var(--sp-16); }
.lib-head { display: flex; align-items: flex-start; gap: var(--sp-12); }
.lib-app-ic { width: 32px; height: 32px; }
.lib-head h3 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.lib-app { font-size: var(--fs-meta); color: var(--muted); }
.lib-desc { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-foot { display: flex; align-items: center; gap: var(--sp-12); margin-top: auto; padding-top: var(--sp-12); border-top: var(--hair) solid var(--sel); }
.lib-when { display: flex; align-items: center; gap: var(--sp-8); flex: 1; min-width: 0; font-size: var(--fs-meta); line-height: 1.35; }
.lib-when .fx { width: 20px; height: 20px; }
.lib-when span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-try { min-height: 36px; padding: 0 var(--sp-16); font-size: var(--fs-small); }
.lib-more { display: flex; justify-content: center; margin-top: var(--sp-32); }
.lib-more button[hidden] { display: none; }

/* waiting for the catalogue: cards with the same anatomy, blank */
.lib-card.is-skel .lib-thumb, .skel { background: var(--ground); }
.skel { display: block; height: 12px; border-radius: var(--r-pill); }
.skel.w-60 { width: 60%; height: 16px; }
.skel.w-90 { width: 90%; }
.skel.w-40 { width: 40%; }
.is-skel .lib-body { gap: var(--sp-12); }
.is-skel .skel { animation: lib-pulse 1.4s var(--ease-std) infinite alternate; /* deliberate */ }
@keyframes lib-pulse { to { opacity: 0.45; } }

.lib-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: var(--sp-16); padding: var(--sp-48) var(--sp-24); text-align: center; color: var(--muted); background: var(--surface); border: var(--hair) solid var(--sel); border-radius: var(--r-surf); }

@media (max-width: 960px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .lib-grid { grid-template-columns: minmax(0, 1fr); }
  .lib-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .lib-chips::-webkit-scrollbar { display: none; }
  .lib-search input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-skel .skel { animation: none; }
  .lib-chip, .lib-search input { transition: none; }
}
