/* Base structure */
html, body {
  height: 100%;
  margin: 0;
}

.pre-wrap {
  white-space: pre-wrap;
}

/* Header */
.navbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  height: 56px;
}

.navbar .title {
  white-space: nowrap;
}

.navbar .container-fluid .controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

.navbar .container-fluid .controls > * {
  margin-left: 1em;
}

.navbar .container-fluid .controls #locales {
  max-width: 10em;
}

/* Layout */

.main {
  display: flex;
  min-height: calc(100vh - 56px); /* Total height - navbar height */
  align-items: stretch;
}

.main-content {
  flex: 1;
  max-width: 100vw;
  overflow-x: auto;
  padding-bottom: 4em;
}

.container {
  padding-left: 2em;
  padding-right: 2em;
}

/* Sidebar */
.sidebar {
  background-color: var(--bs-dark);
  padding-top: 1em;

  transition: width .5s ease-in-out;
  width: 0;
}

.sidebar .nav-link {
  color: var(--bs-light);
  transition: opacity .5s;
  overflow: hidden;
  font-size: 1.1em;
  opacity: 0;
}

.sidebar .nav-link:hover {
  background: var(--bs-gray);
}

.sidebar-open {
  width: 260px;
}

.sidebar-open .nav-link {
  opacity: 100%;
}


/* Breadcrumbs */
.breadcrumb {
  flex-wrap: nowrap;
}

nav.breadcrumb {
  height: 70px;
  padding: 1em 2em;
  justify-content: space-between;
  align-items: center;
  overflow-x: auto;
}

ol.breadcrumb {
  margin: 0;
  white-space: nowrap;
}

nav.breadcrumb .btn {
  white-space: nowrap;
  margin-left: 1em;
}

/* Footer */
footer {
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Forms */
.form {
  display: flex;
  margin: 0 auto;
  padding-bottom: 7em;
  flex-direction: column;
}

.form .btn {
  align-self: flex-start;
}

.form-group {
  border: 1px solid #dee2e6;
  border-radius: .25rem;
  padding: 1rem;
  margin-bottom: 1rem;
  margin-top: 0;
  --bs-gutter-y: 1rem;
  --bs-gutter-x: 1rem;
}

.form-control-plaintext {
  -moz-appearance: none;
  text-indent: 0.01px;
  text-overflow: '';

  font-weight: bold;
}

.text-prewrap {
  white-space: pre-wrap;
}

.input-group select.small {
  flex-grow: 0;
  width: 20%;
}

/* Table */

/* Buttons on a table*/
.table td .button-group {
  display: flex;
  flex-direction: row;
}

.table td .button-group .btn {
  margin-left: .1em;
}

/* If is the last column in the table, align to the right */
.table td:last-child .button-group {
  justify-content: flex-end;
}

/* Prefer to shrink column without overflowing it's text*/
.shrink {
  width: 1px;
  white-space: nowrap;
}

/* Wrap text */
.table {
  table-layout: auto;
}

td {
  white-space: normal !important;
  word-wrap: break-word;
}


/** Charts */
.infography {
  margin-bottom: 10em;
}

.chart-height {
  height: 500px;
}

.chart-fullscreen {
  background-color: white;
}

.barchart, .piechart {
  width: 100%;
  min-height: 400px;
  font-family: var(--bs-font-sans-serif);
}

.barchart .title {
  font-size: 1.2rem;
}

.barchart .axis path {
  stroke: black;
}

.barchart .axis.title {
  font-size: .8rem;
}

.barchart .bar {
  fill-opacity: 80%;
}

.barchart .labels.text, .piechart .text {
  font-size: .8rem;
  text-anchor: middle;
}

.piechart .text {
  fill: white;
  font-weight: bold;
  text-shadow: 2px 2px black;
}

.legend {
  font-size: .8rem;
}