body {
  margin: 0;
  font-family: Google Sans,Roboto,RobotoDraft,Helvetica,Arial,sans-serif;
  font-weight: 300;
}

table {
  width: 100%;
  border: 0;
  table-layout: auto;
}

table tr th, table tr td {
  padding: 0.5625rem 0.625rem;
  font-size: 0.875rem;
  text-align: left;
  line-height: 1.125rem;
}

table thead tr th {
  padding: 0.5rem 0.625rem 0.625rem;
  font-weight: bold;
}

h1{
  font-weight: 400;
  font-variant-ligatures: no-contextual;
  font-size: 18px;
}

h1 a {
  padding : 5px;
}

h1 a:hover{
	border-radius: 3px;
	padding : 5px;
    text-decoration: none;
}

a, a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.img-wrap {
  vertical-align: middle;
  display: inline-block;
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  fill : #FFFFFF;
}

.img-wrap + a {
  display: inline-block;
  vertical-align: middle;
}

.hidden {
  display: none;
}

#page-header {
  display: flex;
  align-items: center;
  margin-left: 0.625rem;
  margin-right: 0.625rem;
  justify-content: space-between;
}

#search {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.25;
  background-image: none;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
  margin: auto;
  margin-top : 5px;
  -webkit-appearance: textfield;
  width:50%;
}

#search:focus {
  outline: 0;
}

/****************************** Theme Color ******************************/
/* https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8 */ 
@media screen and (prefers-color-scheme: light) {
  :root {
    --BG: white;
    --BGHeader: #efefef;
    --TextColor: #404040;
    --BgIndice1: whitesmoke;
    --BgIndice2: snow;
	/* https://stackoverflow.com/a/53336754 */ 

	--filter : invert(19%) sepia(5%) saturate(6414%) hue-rotate(170deg) brightness(92%) contrast(70%); /* 34495e */
  }
}

@media screen and (prefers-color-scheme: dark) {
  :root {
    --BG: #202125;
    --BGHeader: #3c4043;
    --TextColor: #d2d3d7;
    --BgIndice1: #505357;
    --BgIndice2: #3c4043;
	--filter : invert(100%) sepia(9%) saturate(125%) hue-rotate(270deg) brightness(115%) contrast(92%);
  }
}

[data-theme="light"] {
    --BG: white;
    --BGHeader: #efefef;
    --TextColor: #404040;
    --BgIndice1: whitesmoke;
    --BgIndice2: snow;
	/* https://stackoverflow.com/a/53336754 */ 
	--filter : invert(19%) sepia(5%) saturate(6414%) hue-rotate(170deg) brightness(92%) contrast(70%);
}

[data-theme="dark"] {
    --BG: #202125;
    --BGHeader: #3c4043;
    --TextColor: #d2d3d7;
    --BgIndice1: #505357;
    --BgIndice2: #3c4043;
	--filter: invert(100%) sepia(9%) saturate(125%) hue-rotate(270deg) brightness(115%) contrast(92%);
}

body, table {
  color: var(--TextColor);
  background: var(--BG);
}

table thead {
  background: var(--BGHeader);
}

table tr th, table tr td {
  color: var(--TextColor);
}

table tr.even {
  background: var(--BgIndice1);
}

h1 a:hover{
  background-color: var(--BGHeader);
}

a, a:visited {
  color: var(--TextColor);
}

#search {
  color: var(--TextColor);
  background: var(--BgIndice2);
}

#search:focus {
  border-color: var(--BGHeader);
  background:  var(--BgIndice1);
}

.adobe-illustratorSVG, .adobe-photoshopSVG, .backSVG,  .brainfuckSVG, .cobolSVG, .codeSVG, .coffeeSVG, .composerSVG, .configSVG, .file-binarySVG, .file-codeSVG, .file-directorySVG, .file-imageSVG, .file-mediaSVG, .file-pdfSVG, .file-textSVG, .file-zipSVG, .gearSVG, .githubSVG, .markdownSVG, .nunjucksSVG, .stylusSVG, .terminalSVG, .VirtualBoxSVG, .yamlSVG  { /* whitesmoke */
  filter: var(--filter);
}

	

/* Hide extra columns so they don't squash file names */
@media (max-width: 600px) {
  .indexcollastmod, .indexcoldesc, .indexcolsize {
    display: none;
  }

  h1 {
    font-size: 1.5em;
  }

  #page-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 1em
  }

  #search {
    margin-left: 0;
  }
}

@media (max-width: 400px) {
  h1 {
    font-size: 1.375em;
  }
}
