body {
  font-size: .875rem;
}

/* Hide the up/down spinner buttons on number inputs everywhere. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.feather {
  display: inline-flex;
  align-self: center;
  position: relative;
  width: 1.125em;
  height: 1.125em;
  bottom: .1em;
}

.feather-no-bottom {
  bottom: 0em;
}

.sidebar {
  width: 100%;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  padding-top: 48px;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: .5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

@supports ((position: -webkit-sticky) or (position: sticky)) {
  .sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
  }
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
}

h3 .feather {
  margin-right: 6px;
  color: #555;
}

.dropdown-item {
  font-size: .875rem;
}

.navbar-nav .nav-item .feather {
  margin-right: 4px;
}

.sidebar .nav-link .feather {
  margin-right: 4px;
  color: #999;
}

.sidebar .nav-link.active {
  color: #007bff;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar-heading {
  font-size: .75rem;
  text-transform: uppercase;
}

.main {
  margin-left: 0px; /* Same as the width of the sidenav */
  padding: 0px 10px;
  padding-top: 48px;
}

.navbar-brand-container {
  background-color: rgba(0, 0, 0, .25);
  width: 100%;
  padding-left: 15px;
}

.navbar-brand {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
}

.navbar-nav {
  display: none;
}

.search-input {
  background-color: rgb(73, 80, 87);
  border-color: rgb(73, 80, 87);
  color: white;
}

.search-input:focus {
  background-color: rgb(73, 80, 87);
  border-color: rgb(73, 80, 87);
  color: white;
  box-shadow: none;
  -webkit-box-shadow: none;
}

.search-actions {
  align-items: center;
}

.search-action {
  background-color: rgb(73, 80, 87);
  border-color: rgb(73, 80, 87);
  color: white;
  margin-left: 4px;
}

.search-action:hover {
  cursor: pointer;
}

.search-action:disabled>svg {
  opacity: .2;
}

.btn-circle {
  width: 30px;
  height: 30px;
  padding: 6px 0px;
  border-radius: 15px;
  text-align: center;
  font-size: 12px;
  line-height: 1.42857;
}

.btn-circle:focus {
  outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
}

.linked-data-row {
  cursor: pointer;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

tfoot {
  font-weight: bold;
}

fieldset {
  border: 1px solid #ced4da;
  padding: 0 1.4em 1.4em 1.4em !important;
  margin: 0 0 1.5em 0 !important;
  -webkit-box-shadow:  0px 0px 0px 0px #000;
  box-shadow:  0px 0px 0px 0px #000;
}

legend {
  width: inherit;
  padding: 0 10px;
  border-bottom: none;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1.25rem;
}

.datepicker-panel>ul>li.highlighted {
  background-color: white;
}

.datepicker-panel>ul>li.picked {
  font-weight: bolder;
  background-color: #e5f2ff;
}

.alert {
  max-width: 600px; /* 450px wide plus 15x2 padding on left/right */
  margin-top: 16px;
  margin-bottom: 16px;
}

.alert-full {
  max-width: 100%;
}

/* <p> and <ul> tags have a bottom margin by default. remove the margin on the
   last <p> or <ul> in alerts so the text remains vertically centered */
.alert p:last-child {
  margin-bottom: 0px;
}

.alert ul:last-child {
  margin-bottom: 0px;
}


.form-col {
  background-color: #e5f2ff;
  max-width: 600px; /* 450px wide plus 15x2 padding on left/right */
  margin-top: 16px;
  margin-bottom: 16px;
}

.form-error {
  color: #dc3545;
}

.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
  background-color: #e5f2ff;
}

.table-formset {
  margin-bottom: 0rem;
}

.table-formset>thead>tr>th {
  border-top: 0px;
  border-bottom: 0px;
}

.table-formset>tbody>tr>td {
  border-top: 0px;
}

.table-formset>tbody>tr.formset-first-row>td {
  border-top: 1px solid #dee2e6;
  padding-top: 15px;
}

.delete-row {
  margin-top: 3px;
}

.audit-field {
  margin-left:2em;
  margin-bottom:0em;
  text-indent:-2em;
}

@media (min-width: 768px) {
  .sidebar {
    display: block!important;
    width: 220px;
  }

  .main {
    margin-left: 220px;
  }

  .navbar-brand-container {
    width: 220px;
  }

  .navbar-nav {
    display: flex;
    padding-right: 15px;
  }
}

/*
 * Utilities
 */

.border-top { border-top: 1px solid #e5e5e5; }
.border-bottom { border-bottom: 1px solid #e5e5e5; }


span.twitter-typeahead .tt-menu {
  cursor: pointer;
}

span.twitter-typeahead .tt-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0;
  font-size: 1rem;
  color: #373a3c;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.25rem;
}


/* twitter typeahead search */
span.twitter-typeahead .tt-suggestion {
  display: block;
  width: 100%;
  padding: 3px 20px;
  clear: both;
  font-weight: normal;
  line-height: 1.5;
  color: #373a3c;
  text-align: inherit;
  white-space: nowrap;
  background: none;
  border: 0;
}

span.twitter-typeahead .tt-suggestion:focus, .dropdown-item:hover, span.twitter-typeahead .tt-suggestion:hover {
    color: #2b2d2f;
    text-decoration: none;
    background-color: #f5f5f5;
}

span.twitter-typeahead .active.tt-suggestion, span.twitter-typeahead .tt-suggestion.tt-cursor, span.twitter-typeahead .active.tt-suggestion:focus, span.twitter-typeahead .tt-suggestion.tt-cursor:focus, span.twitter-typeahead .active.tt-suggestion:hover, span.twitter-typeahead .tt-suggestion.tt-cursor:hover {
    color: #fff;
    text-decoration: none;
    background-color: #0275d8;
    outline: 0;
}

span.twitter-typeahead .disabled.tt-suggestion, span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover {
    color: #818a91;
}

span.twitter-typeahead .disabled.tt-suggestion:focus, span.twitter-typeahead .disabled.tt-suggestion:hover {
    text-decoration: none;
    cursor: not-allowed;
    background-color: transparent;
    background-image: none;
    filter: "progid:DXImageTransform.Microsoft.gradient(enabled = false)";
}

span.twitter-typeahead {
  /* this might need to change if we add more search actions */
  width: 255px;
}

.input-group span.twitter-typeahead {
  display: block !important;
}

.input-group span.twitter-typeahead .tt-menu {
  top: 2.375rem !important;
}

.trade-upload-box {
  border-color: #ccc;
  border-style: dashed;
  border-width: 2px;
  color: #ccc;
  height: 100px;
  line-height: 100px;
  text-align: center;
}

.trade-upload-box.dragging {
  border-color: #222;
  color: #222;
}

.trade-upload-box > label > strong:hover {
  text-decoration: underline;
  border-color: #222;
  color: #222;
}

#trade-file {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

#trade-ticket {
  display: none;
}

.col > .card {
  margin-top: 1.5rem!important;
}

.col > .card:first-child {
  margin-top: 1rem!important;
}

.col > .card:last-child {
  margin-bottom: 1.5rem!important;
}

.card h3,
.card h4,
.card h5,
.card h6 {
  margin-bottom: 0;
}

.data-table-container {
  overflow: auto;
}

.data-table {
  border-right: 0;
  border-left: 0;
  margin-bottom: 0;
}

.data-table:last-child {
  border-bottom: 0;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1.25rem;
}

.data-table.table-sm th,
.data-table.table-sm td {
  padding: 0.3rem 1.25rem;
}

.data-table td:first-child,
.data-table th:first-child {
  border-left: 0;
}

.data-table td:last-child,
.data-table th:last-child {
  border-right: 0;
}

.data-table > thead > tr:first-child td,
.data-table > thead > tr:first-child th,
.data-table > tbody > tr:first-child td,
.data-table > tbody > tr:first-child th {
  border-top: 0;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.card.card-data-table > .card-header {
  background-color: rgba(0, 0, 0, .1);
  min-height: 56px;
}

.data-table-container > .table {
  border-top: 0;
}

.data-table-container > .table a {
  color: #000;
}

.card > .card {
  margin-top: .5rem!important;
  margin-left: .5rem!important;
  margin-right: .5rem!important;
}

.card > .card:last-child {
  margin-bottom: .5rem!important;
}

.card > .card > .card-header {
  padding: .5rem 1.25rem;
  min-height: inherit;
}

.card > .card > .card-header > h4,
.card > .card > .card-header > h5 {
  font-size: 1rem;
}

/* column sorting */
th.column-sort {
  padding-right: 18px;
  position: relative;
  cursor: pointer;
}

th.column-sort:before,
th.column-sort:after {
  border: 4px solid transparent;
  content: "";
  display: block;
  height: 0;
  right: 5px;
  top: 50%;
  position: absolute;
  width: 0;
}

th.desc.column-sort:before {
  border-bottom-color: #666;
  margin-top: -9px;
}

th.asc.column-sort:after {
  border-top-color: #666;
  margin-top: 1px;
}

th.desc.sorted.column-sort:before {
  border-bottom-color: #007bff;
}

th.asc.sorted.column-sort:after {
  border-top-color: #007bff;
}
