/*
  Copyright (c) 2021-2026 Littleton Robotics
  http://github.com/Mechanical-Advantage

  Use of this source code is governed by a BSD
  license that can be found in the LICENSE file
  at the root directory of this project.
*/

body {
  background-color: #fff;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #222;
  }
}

/* File list */

div.file-list {
  position: absolute;
  left: 0px;
  top: 0px;
  right: 0px;
  bottom: 46px;
  overflow: hidden;
  background-color: #eee;
  box-shadow: inset 0px 0px 2px #ccc;
}

div.file-item {
  height: 25px;
  margin-left: 6px;
  margin-right: 6px;
  padding-left: 0px;
  padding-right: 5px;
  border-radius: 8px;

  font-size: 14px;
  line-height: 25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

div.file-item:first-child {
  margin-top: 3px;
}

div.file-item:last-child {
  margin-bottom: 3px;
}

div.file-item:nth-child(even) {
  background-color: #ddd;
}

div.file-item img {
  position: relative;
  top: 2px;
  height: 15px;
  padding-left: 8px;
  padding-right: 5px;
  filter: drop-shadow(0px 0.5px 1px #bbb);
}

div.file-item img.mac {
  top: 3px;
  height: 18px;
  padding-left: 7px;
  padding-right: 4px;
}

div.file-item > span:last-child {
  font-weight: 300;
  color: #777;
}

div.file-item.selected > span:last-child {
  color: #555;
}

@media (prefers-color-scheme: dark) {
  div.file-list {
    background-color: #111;
    box-shadow: inset 0px 0px 2px #000;
  }

  div.file-item:nth-child(even) {
    background-color: #1a1a1a;
  }

  div.file-item img {
    filter: drop-shadow(0px 0.5px 4px #000);
  }

  div.file-item img.folder {
    filter: invert(1) drop-shadow(0px 0.5px 4px #000);
  }

  div.file-item.selected > span:last-child {
    color: #999;
  }
}

/* File selection */
div.file-item:not(.selected):hover {
  background-color: #e8e8e8;
}

div.file-item:not(.selected):nth-child(even):hover {
  background-color: #d7d7d7;
}

div.file-item.selected {
  background-color: #88f;
}

div.file-item.selected:nth-child(even) {
  background-color: #77e;
}

@media (prefers-color-scheme: dark) {
  div.file-item:not(.selected):hover {
    background-color: #151515;
  }

  div.file-item:not(.selected):nth-child(even):hover {
    background-color: #1e1e1e;
  }

  div.file-item.selected {
    background-color: #22a;
  }

  div.file-item.selected:nth-child(even) {
    background-color: #33b;
  }

  div.file-item.selected img {
    filter: drop-shadow(0px 0.5px 1px #000);
  }
}

/* Control bar */

div.alert-text {
  position: absolute;
  bottom: 8px;
  height: 30px;
  left: 12px;
  right: 85px;

  font-size: 14px;
  line-height: 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

progress {
  position: absolute;
  bottom: 23px;
  height: 18px;
  left: 12px;
  width: calc(100% - 12px - 85px);
}

div.progress-details {
  position: absolute;
  bottom: 5px;
  height: 18px;
  left: 12px;
  width: calc(100% - 12px - 85px);
  text-align: center;

  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Courier, monospace;
}

button {
  position: absolute;
  bottom: 8px;
  width: 30px;
  height: 30px;
}

#exit {
  right: 43px;
}

#download {
  right: 8px;
}
