/* UniQuery Tools — compact sidebar widget ([uniquery_tools_sidebar]).
   A "top 5" teaser for a narrow column, not a reskinned hub: thumbnail +
   name only, no search, no description text. Shows each tool's real
   featured image when its page has one set, falling back to the same
   category icon tile the hub grid uses for a tool that doesn't yet.
   Reuses .uqidx__icon--* category colors from tools-index.css (enqueued
   alongside this file) so the sidebar and the full hub page never
   visually drift apart. */
.uqtool.uqsb {
  max-width: 100%;
  background: var(--uq-bg);
  border: 1px solid var(--uq-line);
  border-top: 4px solid var(--uq-brand);
  border-radius: var(--uq-radius);
  padding: 1.2rem 1.2rem 1.3rem;
  font-family: "Noto Sans Bengali", "Hind Siliguri", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

.uqsb__title {
  font-size: 16px; font-weight: 700; color: var(--uq-ink);
  letter-spacing: -.01em; margin: 0 0 .9rem;
}

.uqsb__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.uqsb__item { margin: 0; }

.uqsb__link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  padding: 8px 8px; border-radius: var(--uq-radius-sm);
  transition: background .15s;
}
.uqsb__link:hover { background: var(--uq-panel); }

.uqsb__thumb {
  flex: none; width: 44px; height: 44px; border-radius: 10px;
  background: var(--uq-panel); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.uqsb__link:hover .uqsb__thumb { background: #fff; }
.uqsb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Icon fallback (no featured image set yet) stays visually smaller than
   the 44px tile so it reads as a placeholder glyph, not a cropped photo. */
.uqsb__thumb svg { width: 19px; height: 19px; }

.uqsb__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.uqsb__cat {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--uq-mute);
}
.uqsb__name {
  font-size: 14px; font-weight: 700; color: var(--uq-ink); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.uqsb__all {
  display: block; text-align: center; margin-top: .9rem;
  font-size: 13.5px; font-weight: 700; color: var(--uq-brand);
  text-decoration: none; padding-top: .8rem; border-top: 1px solid var(--uq-line);
  transition: color .15s;
}
.uqsb__all:hover { color: var(--uq-brand-ink); }

/* If a theme's sidebar column ever goes genuinely narrow (a mobile
   single-column stack, say), let the name wrap instead of ellipsis-hiding
   half the title — there's no space pressure once it's full-width. */
@media (max-width: 340px) {
  .uqsb__name { white-space: normal; }
}
