* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header,
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-grow: 0;
  flex-shrink: 0;
  background: #2a2a2a;
  color: #fff;
  padding: 0.5rem;
}

footer button,
footer .button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1em;
}

footer button:hover,
footer .button:hover {
  background: #555;
}

button,
.button {
  cursor: pointer;
}

a.button {
  text-decoration: inherit;
}

label.button input[type="file"] {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

input,
select,
textarea {
  font-size: 1em;
  padding: 0.2em 0.4em;
  display: block;
}

input[type="file"] {
  padding: 0.2em 0;
}

progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  position: relative;
}

progress::-webkit-progress-bar {
  background-color: #777;
  border-radius: 0.3em;  
}

progress[value]::-webkit-progress-bar {
  box-shadow: 0 0.3em 0.3em rgba(0,0,0, 0.3) inset;
}

progress::-webkit-progress-value {
  border-radius: 0.3em;
  background-color: #b3ee3a;
}

progress:not([value])::before {
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  border-radius: 0.3em; 
  background:
    linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.25em,
    #b3ee3a;
  background-position: 10%;
  animation-name: stripes;
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in;
}

@keyframes stripes {
  from {background-position: 0%}
  to {background-position: 100%}
}

input[type="range"] {
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  background: none;
  font-size: 1.25em;
}

input[type="range"]::-webkit-slider-thumb {
  border: none;
  background: #fff;
  -webkit-appearance: none;
  border-radius: 0.25em;
  margin-top: -0.25em;
  width: 0.5em;
  height: 1em;
}
input[type="range"]::-webkit-slider-runnable-track {
  width: 5em;
  height: 0.5em;
  border: none;
  border-radius: 0.3em;
  background: #777;
  box-shadow: 0 0.3em 0.3em rgba(0,0,0, 0.3) inset;
}

header h1 {
  margin: 0;
  font-size: 1.7em;
  font-weight: normal;
}

header h1 > img {
  max-height: 1.5em;
  margin-right: 0.5em;
  vertical-align: middle;
}

dialog header h2,
section header h2 {
  margin: 0;
  font-size: 1.1em;
  font-weight: normal;
  display: flex;
  align-items: center;
}

section header .toolbar,
section footer .toolbar {
  display: flex;
  align-items: center;
}

section header button.active {
  background: #fff;
  color: #444;
}

header button,
footer button {
  background: none;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
}

header button:hover,
footer button:hover {
  background: #555;
}

header button i {
  margin-right: 0.25em;
}

header button i:last-child {
  margin-right: 0;
}

table {
  border-collapse: collapse
}
thead tr th {
  background: #fff;
}
th {
  font-size: 0.9em;
  color: #444;
  border: 0.15em solid #fff;
}
td {
  border: 0.15em solid #fff;
}
tr:nth-child(odd) {
  background: #d0d0d0;
}
tr:nth-child(even) {
  background: #eee;
}

form > label {
  display: block;
  margin: 1em 0;
}

form > label input,
form > label textarea,
form > label select,
form > label label,
form > label > span,
form > label > .iti {
  display: block;
}

form label input[type="radio"],
form label input[type="checkbox"] {
  display: inline-block;
}

dialog::backdrop {
  background: rgba(0,0,0, 0.5);
}

dialog {
  padding: 0;
  box-shadow: 0 0 1em rgba(0,0,0, 0.5);
  border: none;
  border-radius: 0.5em;
}

dialog section {
  padding: 1em;
}

dialog footer {
  display: flex;
  padding: 0.5em;
  background: none;
  color: inherit;
}

dialog footer button,
dialog footer .button,
button.full {
  display: flex;
  border: none;
  font-size: 1em;
  min-height: 2.5em;
  min-width: 5em;
  text-align: center;
  align-items: center;
  justify-content: center;
  background: #333;
  color: #fff;
  margin: 0 0.3em;
  padding: 0.5em 1em;
}

.buttonGroup {
  display: flex;
}

root-app {
  flex-grow: 1;
}

.alert {
  display: inline-flex;
  background: #eee;
  color: #666;
  padding: 1em;
  margin: 1em;
  font-size: 0.9em;
}

.alert .icon {
  font-size: 2em;
  justify-content: center;
  margin-right: 0.5em;
}

.alert .icon > * {
  font-size: inherit;
}

.alert .message :first-child {
  margin-top: 0;
}

.alert .message :last-child {
  margin-bottom: 0;
}

.tableScrollPane {
  flex-grow: 1;
  flex-shrink: 1;
  overflow: auto;
  overflow-anchor: none;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tableScrollPane table {
  width: 100%;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

table .material-icons {
  font-size: 0.99em; /* 0.99em rather than 1em fixes a size rounding error where the rows were scaled upwards by 1 pixel. */
}

.tableScrollPane table td,
.tableScrollPane table th {
  max-width: 20em;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.tableScrollPane table th {
  text-overflow: clip;
}

.tableScrollPane thead th {
  position: sticky;
  top: 0;
}
    
.tableScrollPane table tr.selected {
  background: #1d3076;
  color: #fff;
}

.panel {
  background: #fafafa;
  color: #2a2a2a;
  box-shadow: 0 0 0.8em #000a;
  border-radius: 0.5em;
  overflow: hidden;
}

.panel:has(header),
dialog:has(header) {
  background: linear-gradient(
    to bottom,
    #2a2a2a 0em,
    #2a2a2a 1em,
    #fafafa 1em,
    #fafafa 100%
  );
}

.panel:has(footer) {
  background: linear-gradient(
    to bottom,
    #fafafa 0em,
    #fafafa calc(100% - 1em),
    #2a2a2a calc(100% - 1em),
    #2a2a2a 100%
  );
}

.panel:has(header):has(footer) {
  background: linear-gradient(
    to bottom,
    #2a2a2a 0em,
    #2a2a2a 1em,
    #fafafa 1em,
    #fafafa calc(100% - 1em),
    #2a2a2a calc(100% - 1em),
    #2a2a2a 100%
  );
}
