:root {
  --front: #3c4043;
  --blue: #4a89ef;
  --white: #fff;
  --bg-gray: #efefef;
}

body {
  font-size: 13px;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  margin: 0;
  height: 100vh;
  color: var(--front);
  background-color: var(--bg-gray);
  display: grid;
  grid-template-rows: min-content min-content min-content 1fr min-content;
}
input {
  font-size: 12px;
  outline: none;
  border: none;
  padding: 5px;
  cursor: pointer;
}
input[type=submit] {
  background-color: var(--bg-gray);
}
input[type=button] {
  background-color: var(--white);
}
input[type=button],
input[type=submit] {
  transition: all 0.2s;
}
input[type=button]:active,
input[type=submit]:active {
  opacity: 0.8;
  transition: all 0s;
}
@media screen and (max-width: 400px) {
  input {
    padding: 10px;
  }
  input[type=button] {
    min-width: unset;
  }
}
h1 {
  font-size: 100%;
  font-weight: normal;
  margin: 0;
  padding: 10px;
  background-color: var(--blue);
  color: var(--white);
  text-align: center;
}

.entry {
  display: grid;
  grid-template-columns: min-content 1fr min-content;
  grid-gap: 5px 10px;
  white-space: nowrap;
  padding: 5px;
  margin: 5px;
  background-color: var(--white);
  align-items: center;
}
.entry input[type=number],
.entry input[type=text] {
  background-color: transparent;
}
.entry input[type=number]:focus,
.entry input[type=text]:focus {
  background-color: var(--bg-gray);
}
.entry span[name=links]:not(:empty) {
  font-size: 10px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 10px;
  height: 100%;
}

.entry input[name="link"] {
  grid-column: span 2;
}

#list {
  overflow: auto;
  position: relative;
}
#list > input[type=submit] {
  display: none;
}
body[data-count="0"] #list > div::before {
  content: 'Your new downloading jobs appear here. For M3U8 links wait for parsing.';
  position: absolute;
  margin: 20px;
  width: calc(100% - 40px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#tools {
  display: grid;
  grid-template-columns: min-content min-content min-content min-content;
  grid-gap: 5px;
  margin: 5px;
  justify-content: end;
}
#new .entry input[type=number]:focus,
#new .entry input[type=text]:focus {
  border-bottom-color: transparent;
}
#new label {
  display: grid;
  grid-template-columns: min-content 1fr;
  grid-gap: 5px;
  align-items: center;
}
#download {
  font-weight: bold;
}
