:root {
  --border-rad: 10px;
  --header-font: 'Roboto', sans-serif;
  --main-font: 'Open Sans', sans-serif;
  --code-font: 'Fira Mono', monospace;

  --font-dark--light: black;
  --font-light--light: white;
  --font-dark--dark: var(--font-light--dark);
  --font-light--dark: #bebebe;

  --bg-col--light: #c4c4c4;
  --bg-sub-col--light: #cbcbcb;
  --bnt-col--light: #666666;
  --bg-col--dark: #262626;
  --bg-sub-col--dark: #242424;
  --bnt-col--dark: #3d3d3d;


  --font-dark: var(--font-dark--light);
  --font-light: var(--font-light--light);
  --bg-col: var(--bg-col--light);
  --bg-sub-col: var(--bg-sub-col--light);
  --bnt-col: var(--bnt-col--light);
}

@media (prefers-color-scheme: dark) {
  :root {
    --font-dark: var(--font-dark--dark);
    --font-light: var(--font-light--dark);
    --bg-col: var(--bg-col--dark);
    --bg-sub-col: var(--bg-sub-col--dark);
    --bnt-col: var(--bnt-col--dark);
  }
}

[data-theme=light]:root {
  --font-dark: var(--font-dark--light);
  --font-light: var(--font-light--light);
  --bg-col: var(--bg-col--light);
  --bg-sub-col: var(--bg-sub-col--light);
  --bnt-col: var(--bnt-col--light);
}

[data-theme=dark]:root {
  --font-dark: var(--font-dark--dark);
  --font-light: var(--font-light--dark);
  --bg-col: var(--bg-col--dark);
  --bg-sub-col: var(--bg-sub-col--dark);
  --bnt-col: var(--bnt-col--dark);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: var(--bg-col);
}

::-webkit-scrollbar-thumb {
  background-color: #4b4b4b;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #353535;
}

::-webkit-scrollbar-thumb:active {
  background-color: black;
}

h1,
h2,
h3,
h4 {
  font-family: var(--header-font);
  color: var(--font-dark);
}

span,
a,
button,
p,
label,
input,
select,
table,
footer,
ul,
ol,
li,
textarea {
  font-size: 1em;
  font-family: var(--main-font);
  color: var(--font-dark);
}

pre code,
pre code span {
  font-size: 0.9em;
  font-family: var(--code-font);
  color: var(--font-dark);
}

input,
select,
textarea {
  border-radius: var(--border-rad);
  border: none;
  background-color: var(--bnt-col);
  padding: 8px;
  color: var(--font-light);
}

textarea {
  resize: none;
}

a {
  color: #1476bd;
}

body {
  background-color: var(--bg-col);
  max-width: 1300px;
  margin: auto;
  padding: 12px;
}

header {
  margin-bottom: 30px;
}

header nav {
  display: flex;
  gap: 15px;
}

header nav a {
  display: flex;
  align-items: center;
}

header nav :nth-child(2) {
  margin-left: auto;
}

button,
.bnt {
  border-radius: var(--border-rad);
  padding: 10px;
  color: var(--font-light);
  text-decoration: none;
  background-color: var(--bnt-col);
  border: none;
}

button:hover,
.bnt:hover {
  background-color: black;
  cursor: pointer;
}

form,
.sub {
  border-radius: var(--border-rad);
  background-color: var(--bg-sub-col);
  padding: 15px;
  margin-bottom: 15px;
}

table {
  text-align: left;
  width: 100%;
  border-collapse: collapse;
}

footer {
  text-align: center;
  margin-top: 100px;
  border-top-style: solid;
  padding-top: 10px;
}

.hidden {
  display: none;
}

.flashes {
  position: fixed;
  float: right;
  top: 10px;
  right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--font-light);
}

.flashes div {
  border-radius: var(--border-rad);
  padding: 10px;
  margin-bottom: 5px;
}

.flashes div span {
  margin-left: 15px;
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.flashes div span:hover {
  color: black;
}

.error {
  background-color: #c24141;
}

.ok {
  background-color: #3c9630;
}

.feather-icon {
  width: 24px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.down {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel {
  background-color: var(--bg-sub-col);
  border: 2px solid black;
  border-radius: var(--border-rad);
  padding: 4px;
}

.control-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.button-option {
  display: flex;
  padding: 10px;
}

.button-option :first-child {
  margin-right: auto;
}

.repo {
  display: flex;
  gap: 14px;
}

.repo .main {
  width: 100%;
}

.repo .aside {
  max-width: 25%;
}

.tree-nav {
  display: flex;
  align-items: center;
}

.tree-nav :last-child {
  margin-left: auto;
}

.breadcrumb {
  padding: 2px;
  list-style: none;
}

.breadcrumb>li {
  display: inline;
}

ol.breadcrumb>li+li:before {
  padding: 0 5px;
  content: "/";
}

ol.breadcrumb li.active {
  text-decoration: none;
  user-select: none;
  color: var(--font-dark);
}

.sm-text {
  font-size: 0.8em;
}

table.tree-objects {
  font-size: 0.9em;
  display: table-row;
}

table.tree-objects tbody tr td a {
  color: var(--font-dark);
  text-decoration: none;
}

table.tree-objects tbody tr td a:hover {
  color: #1476bd;
  text-decoration: underline;
}

#theme-picker-selector {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .3rem;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: #00000091;
  backdrop-filter: blur(4px);
  width: 100%;
  height: 100%;
  border: none;
}

#theme-picker-selector button {
  padding: 1rem 2rem;
}

#theme-picker-selector .current {
  background-color: #005e94;
}

#login-form {
  margin: auto;
  display: flex;
  gap: 10px;
  flex-direction: column;
  width: 50%;
}

#rendered-text {
  overflow: auto;
}

#rendered-text img {
  max-width: 100%;
}

#welcome-panel img {
  max-width: 25%;
  margin: auto;
}

#welcome-panel h1 {
  font-size: 3em;
  text-align: center;
}

#welcome-panel h2 {
  font-size: 1.5em;
  text-align: center;
}

#login-form img {
  margin: auto;
  max-width: 200px;
}

#repo-ssh-url,
#repo-http-url {
  width: 90%;
}

#commit-log tbody tr {
  border: .15rem solid var(--bnt-col);
}

#commit-log td {
  padding: 8px;
}

@media(min-width:1000px) {
  .repo .aside {
    max-width: 35%;
  }
}

@media(max-width:780px) {
  .repo {
    flex-direction: column;
  }

  .repo .aside {
    max-width: 100%;
  }

  #commit-log tr td {
    display: none;
  }

  #commit-log tr td:nth-child(1) {
    display: initial;
  }

  #theme-picker-selector {
    flex-direction: column;
  }

  #theme-picker-selector button {
    min-width: 50%;
  }
}
