/* Templates (docs/design-system.md, Editor, the Templates page; Preview
   cards): the user's page is one card of two columns; the template card
   serves the admin's page: its name row with the delete control, the
   description when there is one, then the 9:16 preview. */

.templates__placeholder {
  display: flex;
  justify-content: center;
  padding: var(--space-12);
}

.template-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.template-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--control-height);
}

.template-card__name {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  color: var(--color-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The description for people, under the name row. */
.template-card__description {
  margin: 0;
  font-size: var(--text-note);
  color: var(--color-text-muted);
}

/* A template's slide is often white; the frame under it matches, so no
   dark edge shows at the rounded corners. */
.template-card .preview {
  background: var(--color-bg-surface);
}

.template-card:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* The Templates page's detail (components/templates_browser.cljs): the
   name, the slide count and the description, then the example's slides in
   one row, each numbered at its top-left. */
.templates-browser__detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.templates-browser__title {
  margin: 0;
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

.templates-browser__count {
  margin: var(--space-1) 0 0;
  font-size: var(--text-note);
  color: var(--color-text-muted);
}

.templates-browser__description {
  margin: var(--space-3) 0 0;
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.templates-browser__slides {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}

.templates-browser__slides li {
  flex: none;
}

/* A slide is often white on the white card; a line marks its edge. A click
   on it opens the slides at this one. */
.templates-browser__slide {
  position: relative;
  display: block;
  width: var(--templates-thumb-width);
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  border-radius: var(--radius-media);
  box-shadow: 0 0 0 var(--border-width) var(--color-border);
  cursor: zoom-in;
}

.templates-browser__slide:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.templates-browser__slide-number {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text);
  background: var(--color-bg-surface);
  border-radius: var(--radius-media);
  padding: 0 var(--space-1);
}
