/* Templates row at the top of the panel (templates.js). */
.templates {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}
.templates[hidden] { display: none; }
.templates-head {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.templates-cards {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.templates-cards::-webkit-scrollbar { height: 5px; }
.templates-cards::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
.template-card {
  flex: none;
  width: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--ink-mid);
  font: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}
.template-pic {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.template-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.template-name {
  font-size: 11.5px;
  line-height: 1.25;
}
.template-card:hover .template-pic { border-color: var(--accent-line); }
.template-card:hover { color: var(--ink); }
.template-card:focus-visible { outline: none; }
.template-card:focus-visible .template-pic { border-color: var(--accent); }
.template-card[aria-pressed="true"] { color: var(--ink); }
.template-card[aria-pressed="true"] .template-pic {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
