/* container layout */
#iml-app {
  display: flex;
  gap: 1rem;
}
#iml-search {
	max-width: 160px;
}
.iml-sidebar {
  flex: 0 0 240px;
  padding: 1rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
}
.iml-content {
  flex: 1;
  padding: 1rem;
}

/* gallery grid */
#iml-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.iml-asset {
  display: flex;
  flex-direction: column;
}

.iml-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 75%;  /* 4:3 aspect */
/* or change to 100% for square boxes */
  overflow: hidden;
}

.iml-thumb img,
.iml-thumb video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iml-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.iml-name {
  flex: 1;
  margin-right: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iml-download {
  text-decoration: none;
  font-size: 1.2rem;
}

/* load-more button */
#iml-load-more {
  display: block;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
}
.iml-clear-btn {
  background: none;
  border: none;
  font-size: 1.2em;
  line-height: 1;
  padding: 0 0.3em;
  cursor: pointer;
  vertical-align: middle;
}
.iml-clear-btn:hover {
  color: #900;
}