@font-face {
  font-family: SemiComeback-Regular;
  src: url("fonts/SemiComeback-Regular.woff") format("woff");
}

@font-face {
  font-family: SemiComeback-Bold;
  src: url("fonts/SemiComeback-Bold.woff") format("woff");
}

html {
  font-family: SemiComeback-Regular;
}

.navbar {
  margin: 0;
  padding-inline-start: 0;
}

.navbar > * {
  display: inline-block;
  list-style: none;
}

.navbar > *::after {
  content: ' | ';
  color: lightgray;
  margin-left: 0.5em;
  margin-right: 0.5em;
}

.navbar > *:last-child::after {
  content: '';
}

.filter-bar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-auto-flow: row;
  column-gap: 2em;
}

.filter-bar input {
  width: calc(100%-1em);
}

h1, h2 {
  font-family: SemiComeback-Bold;
}

.logo {
  position: absolute;
  top: 1em;
  left: 0.5em;
  background-size: contain;
}

a,
a:visited {
  color: blue;
}

a[disabled=true] {
  color: gray;
  pointer-events: none;
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  text-decoration: underline;
}

.table {
  display: grid;
  grid-auto-flow: row;
  align-items: stretch;
  grid-auto-rows: minmax(2em, auto);
}

.table > * > * {
  display: flex;
  align-items: center;
  padding: 2px;
}

.table > *.no-flex > * {
  display: initial !important;
}

.table-header {
  display: contents;
}

.table-header > * {
  background-color: #00461E;
  color: white;
  font-family: SemiComeback-Bold;
}

.table-total {
  display: contents;
}

.table-total > * {
  background-color: #bfe8e7;
  font-family: SemiComeback-Bold;
  border-top: 3px double black;
}

.table-row {
  display: contents;
  cursor: pointer;
}

.table-row-no-hover {
  display: contents;
}

a.table-row,
a.table-row-no-hover {
  color: black;
}

.table-row:hover > * {
  border-top: 2px solid #01c857;
  border-bottom: 2px solid #01c857;
  padding-top: 0px;
  padding-bottom: 0px;
}

.table-row:hover > *:first-child {
  border-right: 2px solid #01c857;
  padding-right: 0px;
}

.table-row:hover > *:last-child {
  border-left: 2px solid #01c857;
  padding-left: 0px;
}

.table-row:nth-child(odd) > *,
.table-row-no-hover:nth-child(odd) > * {
  background-color: #CCF4DD;
}

.note-customer::before {
  content: '★';
  color: red;
}

.note-mire::before {
  content: '★';
  color: green;
}

.minutes,
.units {
  font-size: 60%;
  position: relative;
  color: rgb(192, 192, 192);
}

.units {
  top: 0.3em;
  margin-right: 0.2em;
}

.minutes {
  top: -0.5em;
}

.ltr {
  direction: ltr;
}

h2 > .units {
  color: initial;
}

.center {
  justify-content: center;
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none;
}

.deleted {
  color: rgb(192, 192, 192);
  direction: ltr;
  text-decoration: line-through;
  margin-right: 1ex;
  margin-left: 1ex;
}

.multiplier {
  color: rgb(128, 128, 128);
  direction: ltr;
  margin-right: 1ex;
}

.multiplier::after {
  content: 'x';
}

.before,
.weighable {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
  left: 1.3em;
  top: -1.05em;  
}

.before > * {
  width: fit-content;
}

.weighable::before {
  color: green;
  font-size: 150%;
  content: '\2696';
}

.rotated {
  transform: rotate(180deg);
}

.card button > *::after {
  margin-right: 0.5em;
  content: '▾';
  display: inline-block;
  position: relative;
  top: 0.05em;
  transition-duration: 0.2s;
  transition-property: transform;
  transform: rotate(180deg);
}

.card.open button > *::after {
  transform: rotate(0deg);
}

.error {
  color: red;
}

@media screen {
  .expensive > * {
    background-color: rgb(255 170 0 / 40%) !important;
  }

  .print {
    display: none;
  }
  
  .edit {
    display: block;
  }
}

@media only print {
  body {
    font-size: 20px;
  }

  .logo,
  .filter-bar,
  .navbar,
  .edit,
  .deleted,
  .multiplier,
  .no-print {
    display: none;
  }
  
  img.logo {
    position: fixed;
    display: inline-block;
    height: 5em;
    width: calc(5em * 1330 / 614);
  }

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

  .print {
    display: block;
  }
  
  .table-row:hover > * {
    padding: 2px !important;
    border: none !important;
  }
}

@media only screen and (min-width: 460px) {
  .logo {
    background-image: url("logo.png");
    height: 3em;
    width: calc(3em * 1330 / 614);
  }

  img.logo {
    display: none;
  }
}

@media only screen and (max-width: 459px) {
  .logo {
    background-image: url("logo-cow-only.png");
    height: 2em;
    width: calc(2em * 452 / 281);
  }

  img.logo {
    display: none;
  }
}
