/* "No Footer" mode */
body.embedded > footer,
body.nofooter > footer { display: none; }
body.nofooter:not(.embedded) > main { margin-bottom: 15px !important; }

/* "No Header" mode */

body.noheader > nav { display: none; }
body.noheader:not(.embedded) > main { margin-top: 15px !important; }

/* "Embedded" mode */
body.embedded > footer { display: none; }
body.embedded > nav { display: none; }
body.embedded > main {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

/* In view view-iframe */
iframe.in-view-view {
  width: 100%;
  height: 70vh;
  margin-top: 15px;
  border: 0px;
}

/* Override bootstrap styles to format view headers */
main > header > .view-header > .header-icon {
  float: left;
  margin-left: 15px;
  margin-right: 1em;
}
main > header > .view-header > .header-icon::after { clear: both; }
main > header > .view-header > .header-title > h3 { margin: 0px; }
main > header > .view-header > .header-title > small { font-style: italic; }

/* Prevent header and footer from overlapping main content */
main {
  display: grid;
  margin-top: 75px;
  margin-bottom: 50px;
}

/* Force Pointer cursor on user menu items and view links */
[view-link] { cursor: pointer; }
#user_menu li > a { cursor: pointer; }
#app_hotkey_bar li > a { cursor: pointer; }

/* Custom style for hotbar buttons */
#app_hotkey_bar li > .btn {
  margin: 0.5em;
  padding: 0.5em;
}

/* Custom subclass for buttons to make them translucent */
.btn-transparent {
  color: inherit !important;
  background-color: transparent !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Custom subclass for buttons to make them into status indicators */
.btn-status {
  cursor: initial;
  border-radius: 50%;
}

/* Empty elements that should display "---" */
.empty-placeholder:empty::before { content: "---"; }

/* Hide empty elements completely */
.hide-empty:empty { display: none; }

/* Highlighted Navbar items */
[view-link].highlighted { font-weight: bold; }

/* Cut off text that's too long with "..." */
.ellipsized {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* No bottom margin for certain last elements in a container */
p:last-child,
ul:last-child,
blockquote:last-child,
.well:last-child,
.table:last-child,
.form-group:last-child,
.panel-body .panel:last-child {
  margin-bottom: 0px;
}

/* Transparent border color for consecutive tbody elements */
.table > tbody + tbody {
  border-top: 2px solid transparent !important;
}

.table th:empty,
.table td:empty {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
}

/* No border-variant for tables */
table.no-border > tbody:not(.bordered) > tr > td,
table.no-border > tbody:not(.bordered) > tr > th,
table.no-border > thead:not(.bordered) > tr > td,
table.no-border > thead:not(.bordered) > tr > th,
table.no-border > tfoot:not(.bordered) > tr > td,
table.no-border > tfoot:not(.bordered) > tr > th {
  border: 0px solid transparent;
}

/* Disabled input fields that should not look like they're disabled */
.form-control[readonly].readonly { background-color: initial !important; }

/* Prettify wells a little bit */
.well {
  padding: 0.5em 0.8em !important;
  background-color: initial !important;
}

/* Make the padding in blockquotes less ridiculous */
blockquote {
  font-size: 1em !important;
  padding: 0.33em 0.6em !important;
  border-left-width: 3px;
}

/* Prevent user input for elements that are busy */
.busy { cursor: wait; }
.busy > * { pointer-events: none; }

/* Hidden backface visibility for forcing a new draw layer */
.new-draw-layer {
  backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}