.container {
  touch-action: none;
  cursor: var(--custom-cursor, pointer);

  position: absolute;
  top: 1rem;
  right: 1rem;
  left: 1rem;

  height: 1rem;

  :global(body.is-tauri) & {
    cursor: auto;
  }
}

.preview {
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 0.5rem);
  left: 0;

  overflow: hidden;

  border-radius: 0.25rem;

  background: #000;
}

.previewContainer {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
}

body:global(.is-touch-env) .preview {
  bottom: calc(100% + 0.75rem);
}

.previewTime {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;

  text-align: center;
}

.previewTimeText {
  padding: 0.25rem 0.5rem;
  border-top-left-radius: 0.125rem;
  border-top-right-radius: 0.125rem;

  color: rgba(255, 255, 255, 0.8);

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

.track {
  position: absolute;
  top: 50%;
  right: -0.25rem;
  left: -0.25rem;
  transform: translateY(-50%);

  height: 5px;
  border-radius: var(--border-radius-default);

  background-color: rgba(255, 255, 255, 0.16);
}

.buffered {
  position: absolute;
  top: 0;
  left: 0;

  height: 100%;
  border-radius: var(--border-radius-default);

  background-color: rgba(255, 255, 255, 0.5);
}

.played {
  position: absolute;
  top: 0;
  left: 0;

  height: 100%;
  border-radius: var(--border-radius-default);

  background: var(--color-primary);

  &::after {
    content: "";

    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%) scale(1);

    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;

    background-color: var(--color-primary);

    transition: transform 0.2s ease;
  }
}

body:global(.is-touch-env) .seeking {
  &::after {
    transform: translate(50%, -50%) scale(2);
  }
}
