/* Template category navigation visibility fix
   Keep every category available without a hidden horizontal overflow area. */

/* Full Templates page */
:is(#albumView, #myAlbumView) .album-template-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow: visible;
  padding: 4px 0 18px;
  scrollbar-width: none;
}

:is(#albumView, #myAlbumView) .album-template-categories::-webkit-scrollbar {
  display: none;
}

:is(#albumView, #myAlbumView) .album-template-categories button {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

/* Studio template drawer: use the same multi-line behavior. */
.template-categories {
  display: flex;
  flex-wrap: wrap !important;
  align-items: center;
  gap: 7px;
  overflow: visible !important;
  padding: 3px 0 9px;
  scrollbar-width: none;
}

.template-categories::-webkit-scrollbar {
  display: none;
}

.template-categories button {
  flex: 0 0 auto;
  max-width: 100%;
}

@media (max-width: 560px) {
  :is(#albumView, #myAlbumView) .album-template-categories {
    gap: 7px;
  }

  :is(#albumView, #myAlbumView) .album-template-categories button {
    padding: 8px 10px;
    font-size: 11px;
  }
}
