/***********************
 Projectroles custom CSS
 ***********************/


/* Flexbox page setup ------------------------------------------------------- */


/*
 This is recommended container setup for a projectroles-based site. It makes
 sure the title, sidebar and content containers are where they're needed.
 */

body {
  margin: 0;
  overflow-x: hidden; /* Fix for DAL select bug (issue #365) */
}

body,
html,
.sodar-base-container {
  height: 100%;
}

.sodar-base-container,
.sodar-content-container {
  display: flex;
}

.sodar-base-container {
  flex-direction: column;
}

.sodar-content-container
{
  height: 100%;
  overflow-y: hidden;
}

.onics-top-container {
  flex-direction: column;
}

.sodar-titlebar-container {
  width: 100%;
  min-height: 20px;
  flex: 1;
}

.sodar-content-left {
  height: 100%;
  flex: 0 0 auto;
}

.sodar-content-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

.sodar-sub-navbar-container {
  width: 100%;
  min-height: 20px;
  flex: 0 0 auto;
}

.sodar-app-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: scroll;
  flex: auto;
}

.sodar-app-content {
  padding: 28px;
  padding-top: 14px;
  flex: auto;
}

.sodar-app-content-project {
  padding: 28px;
  flex: auto;
}


/* Content containers ------------------------------------------------------- */


.row {
  margin-left: 0;
  margin-right: 0;
}

.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

nav.sodar-base-navbar {
  padding-left: 28px;
  padding-right: 38px;
}

nav.sodar-base-navbar ul li.nav-item {
  white-space: nowrap;
}

.sodar-navbar-user-dropdown {
  z-index: 1100;
}

div.sodar-alert-container {
  margin-bottom: 0;
}

div.sodar-subtitle-container {
  padding-top: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dfdfdf;
}

div.sodar-subtitle-shadow {
  box-shadow: 0 6px 6px -6px #909090;
}

.sodar-pr-navbar {
  padding-left: 28px;
  padding-right: 38px;
  border-radius: 0;
  margin-bottom: 0;
  vertical-align: middle;
  min-height: 50px;
}

.sodar-pr-navbar i {
  min-width: 15px;
  display: inline-block;
}

.sodar-pr-sidebar {
  width: 90px;
  padding-top: 2px;
  padding-left: 0;
  padding-right: 0;
  word-break: break-all;
}

div.sodar-pr-content-title {
  vertical-align: bottom;
  margin-bottom: 6px;
  border-bottom: 1px solid #dfdfdf;
}

div.sodar-page-container {
  padding-top: 24px;
}

.sodar-footer {
  width: 100%;
  min-height: 36px;
  line-height: 36px;
  margin: 0;
  padding-left: 6px;
  padding-right: 6px;
  background-color: #f5f5f5;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}


/* Titles ------------------------------------------------------------------- */


h2.sodar-pr-content-title {
  font-weight: bold;
  line-height: 30px;
  margin-right: 12px;
}

.sodar-pr-content-title-secondary {
  margin-top: 6px;
  margin-bottom: 12px;
}

.sodar-pr-content-title-secondary:first-line {
  line-height: 30px;
}

.sodar-subtitle-container h3 {
  margin-top: 3px;
}

.card-header h4 {
  height: 30px;
  margin-top: 3px;
  margin-bottom: 0;
}


/* Cards -------------------------------------------------------------------- */


div.card {
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 24px;
}

div.card-header {
  padding: 12px;
}

div.card-body {
  padding: 12px 12px 0;
}

div.sodar-card-body-info {
  padding: 8px 12px;
  color: #000000;
  background-color: #FFFFE0;
}

div.sodar-pr-app-search-container {
  max-height: 400px;
}

div.sodar-dashboard-card {
  background-color: #d1ecf1;
}


/* Tables within cards ------------------------------------------------------ */


table {
  margin: 0 !important;
}

/* Standard card table */

table.sodar-card-table thead tr th {
  border-top: 0 !important;
  border-bottom: 1px solid #dfdfdf;
}

table.sodar-card-table thead tr th {
  border-top: 0 !important;
}

/* Borderless table */

table.sodar-card-table-borderless tbody tr:hover {
  background-color: #f2f2f2;
}

table.sodar-card-table-borderless tbody td {
  border: 0;
}

/* Bordered table */

table.sodar-card-table-bordered thead tr th {
  border-top: 0;
  border-bottom: 0;
}

table.sodar-card-table-bordered thead tr th:first-child {
  border-left: 0;
}

table.sodar-card-table-bordered thead tr th:last-child {
  border-right: 0;
}

table.sodar-card-table-bordered tbody tr td {
  border: 1px solid #dfdfdf;
}

table.sodar-card-table-bordered tbody tr td:first-child {
  border-left: 0;
}

table.sodar-card-table-bordered tbody tr td:last-child {
  border-right: 0;
}

table.sodar-card-table-bordered tbody tr:first-child td {
  border-top: 0;
}

table.sodar-card-table-bordered tbody tr:last-child td {
  border-bottom: 0;
}

/* Container for overflowing table data */
.sodar-overflow-container {
  display: inline-block;
  position: relative;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 3px;
  margin-bottom: -5px;  /* HACK for expanding table cell */
}

.sodar-overflow-hover:hover {
  z-index: 1100;
  width: auto;
  background-color: #ffffe0;
  box-shadow: 0 0 0 1px #dfdfdf inset, 0 3px 3px -3px #909090;
}


/* Project list ------------------------------------------------------------- */


.sodar-pr-project-list-input-group {
  max-width: 450px !important;
}

button#sodar-pr-project-list-link-star {
  padding-top: 2px;
}

select#sodar-pr-project-list-page-length {
  max-width: 100px !important;
  height: 30px;
  padding-top: 4px;
}

table.sodar-pr-project-list-table tbody tr {
  height: 53px !important;
}

table.sodar-pr-project-list-table tbody tr td {
  vertical-align: top;
  padding-top: 15px;
}

table.sodar-pr-project-list-table tr th:first-child,
table.sodar-pr-project-list-table tr td:first-child {
  width: 100%;
}

table.sodar-pr-project-list-table thead tr th#sodar-pr-project-list-header-role,
table.sodar-pr-project-list-table tbody tr td.sodar-pr-project-list-role {
  min-width: 110px;
}

td.sodar-pr-project-list-load-td {
  vertical-align: middle !important;
  height: 106px !important;
}

div.sodar-pr-project-title-container {
  margin-left: 20px;
  text-indent: -20px;
}

@media screen and (max-width: 1000px) {
  table.sodar-pr-project-list-table thead tr th#sodar-pr-project-list-header-role,
  table.sodar-pr-project-list-table tbody tr td.sodar-pr-project-list-role {
    display: none;
  }
}

@media screen and (max-width: 700px) {
  table.sodar-pr-project-list-table tr th:nth-child(n+2),
  table.sodar-pr-project-list-table tr td:nth-child(n+2) {
    display: none;
  }
}

.dataTables_paginate {
  width: 100%;
  padding: 12px;
  border-top: 1px solid #dfdfdf;
}

.dataTables_paginate .pagination .active .page-link {
  background-color: #007bff;
  color: #ffffff;
}

.pagination {
  justify-content: center !important;
  margin-bottom: 12px !important;
}

li.sodar-paginate-button {
  border: 0;
  margin: 0 !important;
  padding: 0;
}

li.sodar-paginate-button a {
  min-width: 45px;
}


/* Popups ------------------------------------------------------------------- */


.popover {
  max-width: 600px;
}

.sodar-popup-overlay {
  background: transparent;
  min-width: 50%;
  max-width: 85%;
  margin-top: 25px;
  margin-bottom: 25px;
  text-align: center;
}


/* Lists -------------------------------------------------------------------- */


dl {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 8px;
}

dl dt {
  padding-left: 0;
}

dl dd {
  padding-left: 0;
}


/* Buttons, links and forms ------------------------------------------------- */


/* HACK for autocomplete widget to look similar to the rest of the form */

.select2-container--default .select2-selection--single {
  width: 100%;
  border: 1px solid #ced4da;
  height: calc(2.25rem + 2px);
  padding: .3rem .5rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  background-color: #ffffff;
  background-clip: padding-box;
  border-radius: .25rem;
}

/* Fix for incorrect highlight color after DAL upgrade (#1412) */
.select2-results__option--highlighted {
  color: #ffffff !important;
}

/* HACK for Bootstrap v4 button group alignment with dropdown enabled */
.btn {
  height: 2.35em;
}

.dropdown-toggle {
  height: inherit;
}

.btn-group {
  height: 2.35em;
}

/* Enable disabling button-style anchors */
a.btn[disabled='disabled'] {
  pointer-events: none;
  opacity: 75%;
}

.badge-light {
  border: 1px solid #dfdfdf;
}

.sodar-list-btn-group {
  height: 1.65em;
}

.sodar-list-btn {
  white-space: nowrap !important;
  padding-top: 1px;
  padding-left: 5px;
  padding-right: 5px;
  height: 1.65em;
}

a.sodar-pr-btn-title {
  line-height: 30px;
  padding: 0;
}

a#sodar-pr-btn-copy-uuid i {
  padding-top: 3px;
  font-size: 24px;
}

a.sodar-pr-btn-copy-secret i {
  padding-top: 3px;
  font-size: 24px;
}

.sodar-pr-sidebar-nav-item a {
  padding-bottom: 2px !important;
  word-break: break-word;
}

.sodar-pr-sidebar-alt-btn {
  height: 100%;
  margin-right: 12px;
  font-size: 100%;
  z-index: 1100;
}

.sodar-pr-sidebar-alt-btn a {
  line-height: 24px;
}

.sodar-list-dropdown {
  white-space: nowrap !important;
  height: 26px;
  width: 50px !important;
  padding: 1px !important;
}

.sodar-details-app-button {
  padding-top: 4px;
  padding-right: 0;
}

.sodar-pr-sidebar-nav {
  width: 100%;
}

.sodar-pr-sidebar-nav-ul {
  width: 100%;
}

.sodar-pr-sidebar-nav-ul li {
  width: 100%;
  font-size: 75%;
  line-height: normal;
  padding-bottom: 8px;
  position: relative;
}


/* App alert badge */
#sodar-app-alert-badge {
  line-height: 36px !important;
  font-size: 125%;
}

#sodar-app-alert-badge-dismiss {
  padding-top: 1px !important;
}

#sodar-app-alert-badge a:link,
#sodar-app-alert-badge a:visited {
  color: #fff !important;
}

#sodar-app-alert-icon {
  animation: blink 1.5s ease-in infinite;
}

@keyframes blink {
  from, to { opacity: 1 }
  50% { opacity: 0 }
}

/* Badge group */
.badge-group {
  padding: 2px;
  display: inline-flex;
}

.badge-group > .badge:not(:first-child):not(:last-child) {
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
}

.badge-group > .badge:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  margin-right: 0;
}

.badge-group > .badge:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: 0;
}

/* Generic object badge used for projects, users etc */
span.sodar-obj-badge {
  vertical-align: top;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
span.sodar-obj-badge a {
  color: inherit;
}

/* NOTE: Notch visualizaton for sidebar moved into base.html */

.sodar-pr-sidebar-nav-ul li i {
  padding-bottom: 4px;
  font-size: 32px;
}

a.sodar-nav-link-last {
  padding-right: 0 !important;
}

.sodar-input-group {
  white-space: nowrap;
}

.sodar-header-input-group {
  white-space: nowrap;
  padding-right: 0;
  max-width: 300px;
}

.sodar-header-button,
.sodar-header-input-group button,
.sodar-header-input-group a {
  height: 30px;
  padding-top: 3px;
}

.sodar-header-input-group input.form-control {
  height: 30px;
}

.sodar-form-control-table {
  height: 28px !important;
  font-size: 85% !important;
}

.sodar-horizontal-radio {
  padding-right: 18px;
}

/* HACK for Bootstrap4 not properly supporting <select> with input-group */
.sodar-select-append {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Select2 autocomplete field tweaks */
span.select2-container {
  width: 100% !important;
}

span.select2-selection {
  padding-left: 0 !important;
  height: 38px !important;
  border: 1px solid #ced4da !important;
}

span.select2-selection__arrow {
  height: 38px !important;
}

span.select2-selection__rendered {
  padding-left: 12px !important;
  color: #495057 !important;
}

/* Fix browser-specific submit button spinner alignment (#1291) */
.sodar-btn-spinner {
    margin-bottom: 1px;
  }
@supports (-moz-appearance:none) {
  .sodar-btn-spinner {
    margin-bottom: 2px;
  }
}


/* Text --------------------------------------------------------------------- */


.text-strikethrough {
  text-decoration: line-through;
}

.text-monospace {
  font-size: 85%;
  padding-top: 1.15em !important;
}

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

/* Misc --------------------------------------------------------------------- */

hr {
  border-color: #dfdfdf;
}

img#sodar-navbar-logo {
  height: 36px;
  padding-bottom: 8px;
  padding-right: 3px;
}

.sodar-alert-top {
  padding-left: 28px;
  padding-right: 28px;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 50px;
}

/* Link to be used if entire text of an alert is a link */
a.sodar-alert-full-text-link {
  text-decoration: none;
  color: inherit;
}

a.sodar-alert-full-text-link:hover {
  text-decoration: underline;
}

.sodar-alert-top-content {
  width: 100%;
  display: inline-block;
}

.sodar-alert-close-link {
  padding-left: 16px;
}

div#sodar-modal div.modal-dialog {
  min-width: 600px;
  max-width: 75%;
}

div#sodar-modal span.modal-header-extra {
  line-height: 30px;
}

.sodar-breadcrumb-table {
  padding: 12px;
  margin: 0;
  background: none;
  border-bottom: 1px solid #dfdfdf;
  border-radius: 0;
}

.sodar-pr-breadcrumb {
  padding: 12px 0;
  margin: 0;
  background: none;
  border-radius: 0;
  color: #ffffff;
}

.sodar-pr-breadcrumb a {
  color: #ffffff;
}

.sodar-pr-navbar-right a {
  color: #ffffff;
}

.sodar-pr-breadcrumb li.breadcrumb-item.active {
  color: #dfdfdf;
}

.sodar-pr-breadcrumb li.breadcrumb-item:before {
  color: #dfdfdf;
}

span.sodar-pr-header-icon {
  display: inline-block;
}

a#sodar-pr-link-project-star {
  outline: 0;
  border: none;
  width: 26px;
}

a#sodar-pr-link-project-star:focus,
a#sodar-pr-link-project-star:active {
  box-shadow: none;
}

span.sodar-user-html {
  white-space: nowrap;
}

.sodar-search-highlight {
  font-weight: bold;
}

.sodar-checkbox {
  vertical-align: middle;
}

pre {
  font-size: 85%;
}

pre#sodar-email-body {
  overflow-x: auto;
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  word-wrap: break-word;
}

.sodar-code-input {
  font-family: monospace;
  font-size: 85%;
  line-height: 36px; /* Fix for Chrome rendering issue (#904) */
}

.spin {
  animation-name: spin-anim;
  animation-duration: 2500ms;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes spin-anim {
  from {
    transform:rotate(0deg);
  }
  to {
    transform:rotate(360deg);
  }
}

/* Tables within markdown elements */

.sodar-markdown-content table {
  margin-bottom: 12px !important;
}

.sodar-markdown-content table,
.sodar-markdown-content table thead th,
.sodar-markdown-content table tbody td {
  border: 1px solid #ced4da;
  padding-left: 5px;
  padding-right: 5px;
}

/* Responsive modifications ------------------------------------------------- */

/* Used to hide/show extra content based on browser window width. */

.sodar-navbar-alt-item {
  display: none;
}

/* Navbar (width) */

@media screen and (max-width: 990px) {
  .sodar-navbar-user-dropdown {
    display: none;
  }
  .sodar-navbar-alt-item {
    display: inherit;
  }
  .sodar-navbar-search {
    width: 250px;
    padding-top: 10px;
    padding-bottom: 5px;
  }
}
