/* Show style: larger tiles with file size */
.show-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 200px;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.2s;
}

.show-file:hover {
  transform: translateY(-2px);
}

.show-file-preview {
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.show-file-preview img,
.show-file-preview video {
  height: 100%;
  width: auto;
  max-width: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.show-file-icon {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
}

.show-file-icon svg {
  width: 64px;
  height: 64px;
}

.show-file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 0.5rem;
  line-height: 1.3;
  align-self: stretch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.show-file-size {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.15rem;
}

.show-file:hover .show-file-name {
  color: var(--primary-dark);
}

/* Index style: compact grid tiles without file size */
.index-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 200px;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.2s;
}

.index-file:hover {
  transform: translateY(-2px);
}

.index-file-preview {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.index-file-preview img,
.index-file-preview video {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.index-file-icon {
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
}

.index-file-icon svg {
  width: 72px;
  height: 72px;
}

.index-file-name {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  padding: 0 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  align-self: stretch;
}
