body {
  flex-direction: column;
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  position: fixed;
  box-sizing: border-box;
  width: 100%;
  height: 100px;
  padding: 10px 0;
  background: #cac;
  z-index: 1;
}

#new-item-button,
#filter-button,
#logout-button {
  position: relative;
  color: #cac;
  font-size: x-large;
  font-weight: 1000;
  margin: 0 5px;
  padding: 0 7.5px;
  border-radius: 5px;
  opacity: 0.75;
  cursor: pointer;
  background: #fff;
  z-index: 2;
}

#new-item-button:hover,
#filter-button:hover,
#logout-button:hover {
  opacity: 1;
}

#searchbar {
  flex: 1;
  position: relative;
  margin: 0 5px;
  max-width: 50%;
  padding: 6px;
  border: 2px solid #aaa;
  border-radius: 5px;
}

#filtering-indicator {
  position: absolute;
  top: auto;
  left: auto;
  bottom: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 100%;
  opacity: 0;
  background: #f00;
}

body.filtering #filtering-indicator {
  opacity: 1;
}

#table-toggle {
  display: flex;
  width: 100%;
  height: 50px;
  text-align: center;
  padding: 10px 10px 0 10px;
}

#table-toggle p {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  height: 100%;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  opacity: 0.75;
}

body#artists #table-toggle p#artists-button,
body#events #table-toggle p#events-button {
  opacity: 1;
  background: #ece;
}

#table-toggle p:hover {
  background: #ece;
}

#filter-menu-container, #all-emails-result-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: #222a;
}

#all-emails-result-container {
  z-index: 2;
}

menu {
  padding: 20px;
  width: 90%;
  max-width: 650px;
  color: #fff;
  font-weight: bold;
  background: #cac;
}

#all-emails-result-container menu {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
  padding: 16px;
}

#filter-menu > p:not(:first-child) {
  margin: 20px 0 10px 0;
}

#filter-menu select {
  width: 100%;
  padding: 5px;
  font-weight: bold;
  color: #222;
}

#phase-selection {
  display: flex;
  flex-flow: wrap;
  text-align: center;
}

#phase-selection button {
  padding: 10px;
  margin: 2% 10px;
  cursor: pointer;
  color: #222;
  font-size: 1rem;
  border: 2px solid #aaa;
  background: #ccc;
  opacity: 0.75;
}

#phase-selection button.toggled {
  font-weight: bold;
  background: #fff;
  border: 2px solid #fff;
  opacity: 1;
}

#active-filter-toggle {
  display: flex;
  vertical-align: middle;
  align-items: center;
}

#active-filter-toggle > div {
  display: inline-block;
  padding: 5px;
  width: 100px;
  height: 25px;
  background: #ccc;
}

#active-filter-toggle > div div {
  width: 50%;
  height: 100%;
  background: #fff;
}

body.hideInactiveItems #active-filter-toggle > div div {
  margin-left: 50%;
  background: #6af;
}

#active-filter-toggle span {
  margin: 0 25px;
}

#date-filter-input {
  color: #222;
}

header textarea {
  flex: 1;
  color: #222;
  background-color: #ddd;
  width: 100%;
}

header button {
  margin-top: 16px;
  padding: 8px 16px;
  background-color: #fff;
  color: #222;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.main-table {
  max-width: 1080px;
  margin: 100px auto;
}

thead,
.main-table tbody > tr > td:not(:first-child) {
  display: none;
}

.main-table tbody a {
  display: block;
}

.main-table tbody > tr {
  cursor: pointer;
}

.main-table tbody > tr {
  background-color: #eeec;
}

.main-table tbody > tr:nth-child(even) {
  background-color: #cccc;
}

.main-table tbody > tr:hover {
  background-color: #fff;
}

.main-table tbody > tr .subtext {
  font-size: 12px;
  color: #aaa;
  font-weight: bold;
}

td.mobile-only {
  display: block;
}

td.mobile-only tbody tr:first-child {
  display: flex;
  width: 90vw;
}

td.mobile-only tbody tr:first-child td:first-child {
  flex: 1;
}

th,
td,
.event-expanded-details {
  padding: 5px 10px;
  text-align: left;
}

td.mobile-only tbody tr.subtext {
  display: flex;
  width: 90vw;
}

td.mobile-only tbody tr.subtext td {
  flex: 1;
}

td.mobile-only tbody tr.subtext td {
  height: 15px;
  overflow: hidden;
  position: relative;
}

td.mobile-only tbody tr.subtext td p {
  position: absolute;
  width: auto;
  height: 100%;
  white-space: nowrap;
  line-height: 15px;
  animation: marquee-tings linear alternate infinite 4s;
}

td.mobile-only tbody tr.subtext td.right-align-me p {
  left: unset;
  right: 0;
  text-align: right;
}

@keyframes marquee-tings {
  0%,
  45% {
    transform: translateY(0);
  }

  55%,
  100% {
    transform: translateY(-100%);
  }
}

th {
  padding: 20px 10px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  background: #cac;
}

th:not(.sorting) {
  opacity: 0.75;
}

th:hover,
th.sorting {
  background: #ece;
}

caption {
  caption-side: bottom;
}

.snapshot-table {
  table-layout: fixed;
}

.edit-record-button {
  display: block;
  padding: 15px;
  text-align: center;
  color: #cac;
}

.edit-record-button:hover {
  text-decoration: underline;
}

body.hideInactiveItems .inactive {
  display: none !important;
}

.hide-bc-search,
.hide-bc-phase,
.hide-bc-date {
  display: none !important;
}

body:not(#events) #filter-button {
  display: none;
}

body:not(#events) #event-table,
body:not(#artists) #artist-table {
  display: none;
}

#artist-table {
  box-sizing: content-box !important;
}

#artist-table td.mobile-only div {
  display: flex;
}
#artist-table td.mobile-only div p {
  flex: 1;
}

@media only screen and (min-width: 600px) {
  thead {
    display: table-header-group;
  }

  #logout-button {
    position: absolute;
    top: 10px;
    right: 5vw;
    left: auto;
  }

  #filter-menu {
    width: 50%;
  }

  .main-table tbody > tr > td:not(:first-child) {
    display: table-cell;
  }
}
