/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#activityManager[lwt-tree] {
  background-color: var(--toolbar-bgcolor);
  color: var(--lwt-text-color);
}

body {
  margin: 0;
}

#activityContainer {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#activityContainer > #activityView {
  min-height: 0;
  flex: 1 1 auto;
}

#activityContainer > #clearListButton {
  align-self: start;
  flex: 0 0 auto;
}

ul.activityview {
  display: block;
  margin: 0;
  padding-inline-start: 0;
  overflow: auto;
  border-bottom: 1px solid var(--field-border-color);
  background-color: var(--field-background-color);
}

li.activitygroup {
  display: block;
}

li.activityitem {
  display: grid;
  grid-template:
    "icon display time" auto
    "icon progress progress" auto
    "icon status status" 1fr / auto 1fr auto;
  align-items: baseline;
}

.activityitem {
  padding: 7px 4px;
  border-bottom: 1px solid var(--field-border-color);
}

.activitygroup-list .activityitem {
  padding-inline-start: 12px;
}

.activityitem > img {
  width: 48px;
  height: 48px;
  grid-area: icon;
  align-self: start;
}

.activityitem > .displayText {
  grid-area: display;
}

.activityitem > .dateTime {
  grid-area: time;
}

.activityitem > .progressmeter {
  grid-area: progress;
}

.activityitem > .statusText {
  grid-area: status;
}

.contextDisplayText,
.progressmeter,
.dateTime,
.displayText,
.statusText {
  margin: 2px 6px;
}

:is(
  .contextDisplayText,
  .dateTime,
  .displayText,
  .statusText
):empty {
  display: none;
}

.contextDisplayText,
.displayText,
.statusText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h2.contextDisplayText {
  font-size: inherit;
}

.dateTime,
.statusText {
  font-size: smaller;
  opacity: .8;
}
