/* License: gpl-v2 */
@import 'common.css';

body {
  display: grid;
  grid-template-rows: max-content 1fr;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  overflow: hidden;
}

body > * {
  flex: 0 0 auto;
}

#toolbar {
  display: flex;
  margin: 0;
  background: var(--toolbar-bg-color) var(--tile-url) repeat-x;
}

#toolbar .spacer {
  flex-grow: 1;
}

#toolbar .thin-spacer {
  width: 1em;
}

#toolbar > .button {
  display: flex;
  -moz-appearance: none;
  -webkit-appearance: none;
  font-size: 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  width: 36px;
  height: 36px;
  margin: 0.6ex 0.3ex;
  justify-items: center;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--general-button-shadow);
  background: var(--general-button-bgcolor);
  color: var(--general-button-color);
  transition: box-shadow 0.5s, background 1s;
  font-size: 24px;
  line-height: 24px;
}
#toolbar > .button > span:before {
  display: block;
}

#toolbar > .button.disabled {
  color: darkgray !important;
  opacity: 0.4;
  cursor: initial;
}

#toolbar > .button:hover:not(.disabled) {
  background: var(--general-button-bgcolor-hover);
  box-shadow: 0px 0px 7px 2px rgba(70,70,70,0.75);
}

#toolbar > .button:active {
  box-shadow: 0px 0px 7px 2px rgba(220,220,220,0.75);
}

#toolbar > .button > .icon-add {
  color: var(--add-color);
}

#toolbar > .button > .icon-go {
  color: var(--done-color);
}

#toolbar > .button > .icon-pause {
  color: var(--pause-color);
}

#toolbar > .button > .icon-error {
  color: var(--error-color);
}

#downloads {
  flex: 1 1 auto;
  overflow: hidden;
  display: grid;
  background: var(--general-bgcolor);
}

#loading {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--general-button-bgcolor);
  font-weight: bolder;
  font-size: 200%;
  z-index: 10;
}

#loading,
#items {
  grid-column: 1;
  grid-row: 1;
}

#colURL {
  width: 42%;
}

#colPercent {
  width: 4em;
  min-width: 3em;
}

#colProgress {
  width: 25%;
}

#colSize {
  width: 14em;
}

#colSpeed {
  width: 7em;
}

#colDomain,
#colSegments,
#colMask {
  display: none;
}

.donate {
  margin-right: 1ex;
  top: 0;
  height: 33px;
  width: 114px;
  background: url(donate33.png) top right no-repeat;
  cursor: pointer;
}
.donate:active {
  background: url(donate33.png) bottom right no-repeat;
}

.virtualtable-body {
  border: 0;
}

.virtualtable-row {
  height: 26px;
}

.virtualtable-row.opening {
  background: var(--open-color) !important;
}

.virtualtable-progress-container {
  border-radius: 2px;
}

.virtualtable-progress-bar {
  height: 14px;
}

.virtualtable-icon {
  font-size: 16px;
}

.queued .virtualtable-column-2 .virtualtable-icon {
  color: var(--queue-color);
}
.queued .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--queue-color);
}
.queued .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--queue-color),
    var(--queue-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.paused .virtualtable-column-2 .virtualtable-icon {
  color: var(--pause-color);
}
.paused .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--pause-color);
}
.paused .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--pause-color),
    var(--pause-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.retrying .virtualtable-column-2 .virtualtable-icon {
  color: var(--retry-color);
}
.retrying .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--retry-color);
}
.retrying .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--retry-color),
    var(--retry-color) 6px,
    transparent 6px,
    transparent 12px
  );
}


.missing .virtualtable-column-2 .virtualtable-icon,
.canceled .virtualtable-column-2 .virtualtable-icon {
  color: var(--error-color);
}
.missing .virtualtable-column-2 .virtualtable-progress-bar,
.canceled .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--error-color);
}
.missing .virtualtable-column-2 .virtualtable-progress-undetermined,
.canceled .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--error-color),
    var(--error-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.running .virtualtable-column-2 .virtualtable-icon {
  color: var(--done-color);
}
.running .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--running-color);
}
.running .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--running-color),
    var(--running-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.finishing .virtualtable-column-2 .virtualtable-icon {
  color: var(--done-color);
}
.finishing .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--finishing-color);
}
.finishing .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--finishing-color),
    var(--finishing-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.done .virtualtable-column-2 .virtualtable-icon {
  color: var(--done-color);
}
.done .virtualtable-column-2 .virtualtable-progress-bar {
  background: var(--done-color);
}
.done .virtualtable-column-2 .virtualtable-progress-undetermined {
  background: repeating-linear-gradient(
    45deg,
    var(--done-color),
    var(--done-color) 6px,
    transparent 6px,
    transparent 12px
  );
}

.virtualtable-column-6,
.virtualtable-column-4,
.virtualtable-column-3 {
  text-align: right;
}

#status .hidden {
  display: none !important;
}

#statusNetwork {
  flex-grow: 0 !important;
  cursor: pointer;
}

@media (min-resolution: 144dpi) {
  #statusNetwork:before {
    font-weight: bold !important;
  }
}

#statusNetwork.icon-network-off {
  color: crimson;
}
#statusNetwork.icon-network-on {
  color: var(--add-color);
}

#statusFilter {
  flex-grow: 0 !important;
  width: 40ex;
  background: white;
  padding-left: 4px;
  border-radius: 8px;
  border: 0 !important;
  box-shadow: 0 0 2px 0 black;
  margin-bottom: 2px;
  transition: box-shadow 1s;
}

[data-platform="win"] #statusFilter {
  border-radius: 2px;
}


#statusFilter:focus-within {
  box-shadow: 0 0 3px 1px #18afff;
}

#statusFilter .icon-find {
  padding-right: 0.5em;
  color: navy;
}
#statusFilter #filter {
  padding: 0;
  height: 16px;
  -moz-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  width: calc(100% - 28px);
}
#statusSpeedContainer {
  width: 10em;
  max-width: 20%;
}

.icon-tacho,
.icon-incoming {
  display: inline-block;
  padding-left: calc(14px + 1em);
  background-size: contain;
  background-repeat: no-repeat;
}
.icon-incoming {
  background-image: url(incoming.svg);
}

.icon-tacho {
  background-image: url(tachometer.png);
}

.table-context .icon-folder {
  color: var(--folder-color);
}

.table-context .icon-go,
.table-context .icon-done {
  color: var(--done-color);
}

.table-context .icon-force {
  color: var(--force-color);
}

.table-context .icon-pause {
  color: var(--pause-color);
}

.table-context .icon-error,
.table-context .icon-failed {
  color: var(--error-color);
}

.table-context .icon-missing {
  color: var(--missing-color);
}

@media (-webkit-min-device-pixel-ratio: 1.3), (min-resolution: 124.8dpi) {
  .icon-tacho {
    background-image: url(tachometer@2x.png);
  }
}

#nagging, #nagging * {
  font-size: 10pt !important;
}
#nagging {
  border-top: 1px solid var(--general-border-color);
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-content: center;
  align-items: center;
  grid-column-gap: 1ex;
  margin: 0;
  padding: 1ex;
  min-height: 2em;
}

@media (max-width: 1000px) {
  #nagging-message {
    grid-column: 1 / -1;
  }
  #nagging-donate {
    grid-column: 2;
  }
}

#nagging.hidden {
  display: none;
}

#nagging-message {
  margin-left: 1em;
  margin-right: 1em;
  align-self: center;
}

#nagging .icon-donate {
  color: darkgreen;
  display: inline-block;
  padding-right: 1ex;
}
#nagging-donate {
  font-weight: bold;
}

#tooltip {
  position: absolute;
  opacity: 0.9;
  width: 450px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  z-index: 10000;
  background: InfoBackground;
  color: InfoText;
  padding: 1em;
  justify-items: stretch;
  border-radius: 4px;
  box-shadow: 2px 2px 6px black;
  -webkit-user-select: none;
  user-select: none;
}

#tooltip-infos {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: repeat(5, auto);
  grid-column-gap: 1em;
  grid-row-gap: 0.5ex;
  margin-bottom: 1ex;
}

#tooltip-icon {
  height: 64px;
  width: 64px;
  background-size: 64px 64px;
  background-repeat: no-repeat;
  background-position: center center;
  font-size: 64px;
  line-height: 64px;
  padding: 6px;
  text-align: center;
  grid-row: 1/-1;
}

#tooltip-infos div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tooltip label {
  font-style: italic;
}

#tooltip .hidden {
  display: none;
}

#tooltip-name {
  font-weight: bold;
  grid-column: 2 / span 2;
}

#tooltip-speedbox {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  grid-column-gap: 1em;
  grid-row-gap: 0.5ex;
  justify-items: stretch;
}

#tooltip-speedbox div {
  font-weight: bold;
}

#tooltip-speedbar {
  height: 50px;
  grid-column: 1 / span 4;
}
#tooltip-progressbar {
  margin-top: 1ex;
  height: 20px;
  border: 1px solid lightgray;
  border-radius: 4px;
}

#tooltip-progress {
  height: 100%;
  width: 100%;
  background: var(--done-color);
}

#tooltip-eta.single {
  font-weight: bold;
  grid-column-end: span 2;
}

.deletefiles-list {
  padding-left: 1ex;
  padding-right: 1.5ex;
  border: 1px solid lightgray;
  border-radius: 6px;
  background-color: rgba(128,128,128,0.1);
  max-height: 8em;
  overflow-y: auto;
}
.deletefiles-list > li {
  list-style-type: none;
  padding: 0;
  margin: 0;
}