@font-face {
  font-family: Avant-Garde-Book;
  src: url("/fonts/ITCAvantGardeStd-Bk.woff") format("woff");
}

@font-face {
  font-family: Avant-Garde-Demi;
  src: url("/fonts/ITCAvantGardeStd-Demi.woff") format("woff");
}

:focus {
  outline: none;
}

a {
  color: #313131;
}

body,
button,
input,
select,
textarea {
  color: #494949;
  font-family: Avant-Garde-Book, Helvetica, Arial, sans-serif;
  font-size: 14px;
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

button {
  background-color: white;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  cursor: pointer;
  padding: 8px 16px;
  user-select: none;
}

button:hover {
  background-color: #eee;
}

button:disabled {
  background-color: #999;
  border-color: #999;
  color: #eee;
}

h1 {
  font-family: Avant-Garde-Demi, Helvetica, Arial, sans-serif;
  font-weight: normal;
}

input,
textarea {
  border-radius: 5px;
}

input,
select,
textarea {
  border: 1px solid #d9d9d9;
  padding: 8px;
  width: 190px;
}

input::placeholder {
  color: #999;
}

table {
  border-spacing: 0 2px;
}

th {
  font-family: Avant-Garde-Demi, Helvetica, Arial, sans-serif;
  font-weight: normal;
}

td,
th {
  padding: 3px 16px 3px 0px;
  white-space: nowrap;
}

td:last-child,
th:last-child {
  padding-right: 0;
}

th {
  text-align: left;
}

tbody tr:hover {
  background: #eee;
}

ul {
  margin: 0;
  padding-inline-start: 20px;
}

#content {
  padding: 20px;
}

#controls {
  align-items: center;
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

#pagination {
  align-items: center;
  display: flex;
  gap: 20px;
}

#dialog {
  display: none;
}

h1 {
  font-size: 28px;
  margin: 0;
}

#heading {
  align-items: center;
  background-color: white;
  border-bottom: 1px solid #d9d9d9;
  display: flex;
  padding: 20px;
}

#heading > *:first-child {
  flex: 1;
}

#heading img {
  display: block;
}

.no-top-margin {
  margin-top: 0px;
}

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

.right-align {
  text-align: right;
}

.order-icon {
  height: 24px;
  width: 24px;
}

.order-icons {
  align-items: center;
  display: flex;
  gap: 4px;
}

.action-menu {
  display: inline-block;
  position: relative;
}

.action-menu-cell {
  text-align: right;
}

.action-menu-button {
  align-items: center;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.action-menu-button:hover,
.action-menu.open > .action-menu-button {
  background-color: #eee;
  border-color: #d9d9d9;
}

.action-menu-list {
  background-color: white;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  min-width: 160px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: 36px;
  z-index: 10;
}

.action-menu.open > .action-menu-list {
  display: flex;
}

.action-menu.open-upward > .action-menu-list {
  bottom: 36px;
  top: auto;
}

.action-menu-item {
  align-items: center;
  border-radius: 5px;
  color: #494949;
  cursor: pointer;
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.action-menu-item:hover {
  background-color: #eee;
}

.action-menu-item a {
  color: inherit;
  text-decoration: none;
}

.action-menu-versions {
  color: #999;
  font-size: 12px;
}

.action-menu-versions a {
  color: #999;
}

.truncate-long,
.truncate-short {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truncate-long {
  max-width: 400px;
}

.truncate-short {
  max-width: 180px;
}

input[type="checkbox"] {
  margin: 3px 0;
  width: auto;
}

#search-button {
  margin-left: 5px;
}

#next-anchor {
  margin-left: 5px;
}

#next-anchor,
#previous-anchor {
  align-items: center;
  background-color: white;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

#next-anchor:hover,
#previous-anchor:hover {
  background-color: #eee;
}

#next-anchor:not([href]),
#previous-anchor:not([href]) {
  opacity: 0.4;
}

#next-anchor:not([href]):hover,
#previous-anchor:not([href]):hover {
  background-color: white;
}

.fill-right {
  flex: 1;
  text-align: right;
}

#heading > a {
  line-height: 0;
}

/* Below small devices */
@media (max-width: 900px) {
  /* Lay #heading out on a 2-column grid instead of the wide-screen flex row, so the navigation
     can span its own full-width row below the logo and the heading instead of overflowing off
     the right edge of the screen. Placing logoDiv/h1/nav by grid-area (rather than relying on
     flex-wrap's source-order line breaking) keeps the logo and "Reports" together on the first
     row regardless of how much either one shrinks. */
  #heading {
    align-items: center;
    column-gap: 12px;
    display: grid;
    grid-template-areas:
      "logo title"
      "nav nav";
    grid-template-columns: auto 1fr;
    row-gap: 8px;
  }

  /* Promote heading-content's children (the h1 and the navigation) to be direct grid items of
     #heading so they can each be placed into their own grid area. */
  #heading-content {
    display: contents;
  }

  #heading > *:first-child {
    grid-area: logo;
  }

  #heading-content h1 {
    font-size: 22px;
    grid-area: title;
  }

  #heading-content > div {
    grid-area: nav;
  }

  #heading img {
    height: auto;
    max-width: 200px;
  }

  /* Put the e-mail on its own line below the links, instead of wrapping wherever it happens to
     run out of room on the links' line. */
  .navigation-separator {
    display: none;
  }

  .navigation-email {
    display: block;
    padding-top: 5px;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* Below 600px, give the search box/button and the pagination controls their own full-width rows
   (rather than squeezing all of them onto one cramped row) so the previous/next icons and the
   page label stay side by side instead of each wrapping onto their own line. The search box keeps
   its normal fixed width - only the row layout changes. */
@media (max-width: 600px) {
  #controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
