.root {
  position: relative;

  overflow: hidden;
  display: flex;
  flex: 1 calc(50% - 0.5rem);
  align-items: center;

  min-width: 0;
}

.preview {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.duration {
  -webkit-user-select: none;
  user-select: none;

  position: absolute;
  z-index: 1;
  top: 0.1875rem;
  left: 0.1875rem;

  padding: 0 0.375rem;
  border-radius: 0.75rem;

  font-size: 0.75rem;
  line-height: 1.125rem;
  color: #fff;

  background: rgba(0, 0, 0, 0.25);
}

.single .preview {
  height: auto;
  max-height: 24rem;
}

.no-grouping {
  flex-basis: 100%;
  margin-inline: 0.5rem;
  border-radius: 1rem;
  transition: background-color 0.15s;

  &:hover {
    background-color: var(--color-item-hover);
  }
}

.file {
  flex-grow: 1;

  min-width: 0;
  margin-block: 0.25rem;
  margin-inline-start: 0.25rem;
  margin-inline-end: 0.75rem;
}

.overlay {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;

  overflow: hidden;
  display: flex;
  gap: 0.25rem;

  padding-inline: 0.25rem;
  border-radius: 1rem;

  font-size: 1.25rem;

  opacity: 0;
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);

  transition: opacity 0.15s ease-in-out;

  .root:hover & {
    opacity: 1;
  }

  :global(body.no-menu-blur) & {
    background-color: #707579;
    backdrop-filter: none;
  }
}

.action-item {
  cursor: var(--custom-cursor, pointer);

  display: block;

  padding: 0.375rem;
  border-radius: 1.125rem;

  color: white;

  transition: 0.2s background-color;

  &:hover {
    background-color: rgba(0, 0, 0, 0.05);
  }

  @media (max-width: 600px) {
    font-size: 1.25rem;
  }
}

.delete-file {
  margin-inline-end: 0.625rem;

  font-size: 1.5rem;
  color: var(--color-text-secondary);

  opacity: 0;

  transition: opacity 0.15s, background-color 0.15s;

  .root:hover & {
    opacity: 1;
  }
}
