/* Bootstrap fixes */
@media (min-width: 768px) {
  .form-inline .form-control {
    width: auto;
    vertical-align: middle;
  }
}
/* deform fixes */
.select2 {
  width: 100% !important;
}

body {
  font-family: 'Lato', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 .h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: 'Lato', sans-serif;
  font-style: normal;
  font-weight: 700;
  text-rendering: optimizeLegibility;
}

h3 {
  border-bottom: 1px solid #ddd;
  font-size: 20pt;
  color: #80b43b;
}

.loading {
  background-image: url('../images/loading.gif');
  width: 16px;
  height: 16px;
}

.h3 {
  margin-top: 20px;
}

p.premiere-phrase {
  margin-top: 20px;
}

h4 {
  color: #008eae;
  font-size: 16pt;
}
.panel-primary > .panel-heading > .panel-title {
  color: white;
}

/* mobile adjustements */
@media (min-width: 768px) {
  .tab-pane {
    padding-left: 15px;
  }
  h3,
  .h3 {
    margin-left: -15px;
  }
}
@media (max-width: 767px) {
  .btn {
    padding: 6px 6px;
  }
}

/* fixes nav menu on mobile */
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
  z-index: 0;
}
/* Layout */

#useraccount {
  float: right;
}
#menu {
  margin-bottom: 20px;
}

.list-actions {
  margin-bottom: 20px;
}

.footer {
  min-height: 20px;
}

.top-bar {
  background: #008eae none repeat scroll 0% 0%;
  color: #fff;
  margin-bottom: 15px;
}
.top-bar h4 {
  font-size: 14pt;
  color: #fff;
}
.top-bar #change-form {
  margin-top: 15px;
}
.top-bar .tt-dropdown-menu {
  color: black;
}

.links {
  float: right;
  padding: 2px;
  color: white;
}

.links a:visited,
.links a:hover,
.links a:link,
.links a:active {
  color: white;
}

/* MagicSuggest */
span.ms-helper {
  display: None !important;
}

.nav-tabs > li > a {
  font-size: 16px;
}

/* http://stackoverflow.com/questions/8696140/svg-getbbox-fails-in-a-jqueryui-tab */
.tab-content {
  position: relative;
}
.tab-content > .tab-pane {
  display: block;
  position: absolute;
  left: -10000px;
  width: 100%;
}
.tab-content > .active {
  position: relative;
  left: auto;
}

/* Standard table styles */
th.string,
td.string {
  text-align: left;
}
th.date,
td.date {
  text-align: center;
}
th.float,
td.float,
th.integer,
td.integer {
  text-align: right;
}

.ind1-profondeur-btn {
  margin-bottom: 10px;
}
.graph,
.graph-inline,
.graph-container,
.legend {
  position: relative;
}
.legend-ind1 {
  padding-left: 44px;
}
.legend-ind14 {
  padding-left: 30px;
}
.legend-ind18 {
  padding-left: 30px;
}
.legend-ind19 {
  padding-left: 60px;
}
@media (min-width: 768px) {
  .ind1-profondeur-btn {
    padding-left: 20px;
  }
  #ind1 .options {
    padding-left: 20px;
  }
  .graph-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding-left: 20px;
    gap: 20px;
  }
  .graph-inline {
    flex-grow: 1;
  }
  .legend {
    text-align: center;
    padding-left: 0px;
  }
}

.graph-buttons {
  float: right;
  padding: 0px 5px 5px 0px;
}
.graph-buttons button,
.graph-buttons a {
  padding: 6px 12px;
}

/* Search results */
#search_results .region-header {
  background-color: #eee;
  font-weight: bolder;
}
#search_results .card {
  padding: 0 9px;
}
#search_results .card-row {
  margin: 9px 0;
}
#search_results .card-block {
  display: inline-block;
  margin-right: 5px;
}

#analyses-form-filter-region {
  float: right;
  margin-bottom: 5px;
}
#analyses-form-filter-region-item .form-control {
  width: 20em;
}

#ind1 .options {
  margin-top: 10px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  #ind1 .options {
    display: flex;
    gap: 20px;
  }
}

#ind1 .options h5 {
  color: #80b43b;
}
#ind1 .options hr {
  border-color: #80b43b;
}

#ind1 .options label {
  font-weight: inherit;
}

#ind2 table th,
#ind2 table td {
  padding: 5px 15px;
  border: 1px solid rgba(86, 61, 124, 0.2);
}
#ind2 table th {
  background-color: #f7f7f9;
}
#ind2 table tr.header th,
#ind2 table td {
  text-align: center;
}

#ind6 table th,
#ind6 table td {
  padding: 5px 15px;
  border: 1px solid rgba(86, 61, 124, 0.2);
}
#ind6 table th {
  background-color: #f7f7f9;
}
#ind6 table tr.header th,
#ind6 table tr th.header,
#ind6 table td {
  text-align: center;
}

#ind8 table th,
#ind8 table td {
  text-align: right;
  padding: 5px;
}

#ind15 td.red {
  color: red;
}

#ind18 .graph-buttons {
  float: none;
  text-align: right;
}
@media (min-width: 768px) {
  #ind18 .legend-button {
    display: none;
  }
}

.nodata-simplified {
  margin-top: 10px;
}
/* ind20 */
.simplified-quality {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.sq-item {
  margin: 0 5px;
}
.sq-quality {
  width: 100%;
  background: #dc3545;
  border-radius: 5px;
  position: relative;
  height: 1.5em;
}
.sq-none {
  background: darkgrey;
}
.sq-inf-sa,
.sq-sup-sa,
.sq-label,
.sq-value {
  position: absolute;
}
.sq-value {
  width: 4px;
  background: black;
  margin-left: -2px;
  border-radius: 2px;
  top: -2px;
  bottom: -2px;
  box-shadow: 0 0 2px white;
}
.sq-inf-sa {
  background: #28a745;
  width: 40%;
  height: 100%;
  border-radius: 5px 0 0 5px;
}
.sq-sup-sa {
  background: #e68a00;
  width: 10%;
  left: 40%;
  height: 100%;
  border-radius: 0 0 0 0;
}
.sq-label {
  top: 0.25em;
  color: white;
  text-shadow: 0 0 2px black;
  font-size: 80%;
  height: 1.5em;
  font-weight: bold;
  white-space: nowrap;
}
.sq-red {
  color: #dc3545;
}
.sq-orange {
  color: #e68a00;
}
.sq-green {
  color: #28a745;
}
.sq-invalid {
  color: darkgrey;
}
.sq-count {
  display: block;
  text-align: right;
  color: #777;
  font-size: 85%;
}

#histo table td {
  padding: 5px 15px;
  border: 1px solid rgba(86, 61, 124, 0.2);
}
#histo .piezo_full_form {
  margin-bottom: 10px;
}
#histo .piezo_full_form label {
  width: 130px;
}
#histo .piezo_annee_form {
  margin-bottom: 10px;
}
#histo .piezo_annee_form label {
  width: 130px;
}

#info #images .col {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
  float: left;
  width: auto;
}

#info #images img {
  margin-top: 15px;
  margin-bottom: 15px;
  width: auto;
  height: auto;
}

#info #images .modal-dialog {
  max-width: 80%;
  width: auto;
}
#info #images .modal-dialog img {
  max-width: 100%;
}

#info table th,
#info table td {
  padding: 5px 15px;
  border: 1px solid rgba(86, 61, 124, 0.2);
}
#info table th {
  background-color: #f7f7f9;
}

#info .external_link {
  margin-bottom: 15px;
}

#info .external_link .logo_bss_eau {
  display: inline-block;
  border: 2px solid #008eae;
  padding: 10px;
  width: 100px;
  font-size: 20px;
  color: #008eae;
  text-decoration: none !important;
}

#actions table th.nom {
  width: 30%;
}
#actions table th.date_debut {
  width: 10%;
}
#actions table th.date_fin {
  width: 10%;
}
#actions table th.description {
  width: 30%;
}
#actions table th.lien {
  width: 20%;
}

#captage table th,
#captage table td {
  padding: 5px 15px;
  border: 1px solid rgba(86, 61, 124, 0.2);
}
#captage table th {
  background-color: #f7f7f9;
}

div.tooltip {
  position: absolute;
  text-align: center;
  padding: 3px;
  font: 12px sans-serif;
  background: black;
  border: 0px;
  border-radius: 3px;
  pointer-events: none;
  color: #efefef;
  z-index: 99999;
  opacity: 0;
}
.situation_hebdo div.tooltip {
  pointer-events: initial;
}

div#info > #map {
  height: 500px;
}

#bulletinhydro td.legend {
  width: 31px;
}

.dot {
  height: 25px;
  width: 25px;
  /* background-color: #bbb; */
  border-radius: 50%;
  display: inline-block;
}
.dot.red {
  background-color: red;
}
.dot.orange {
  background-color: orange;
}
.dot.blue {
  background-color: #6495ed;
}

/* Responsive header & tabs */
.display-search:hover,
.display-search:focus,
.display-search {
  color: white;
}
.nav-tabs > li > a .glyphicon {
  display: none;
}
@media (max-width: 768px) {
  #search_form #parametres_tree {
    overflow-x: auto;
  }
  #search_form .deform-form-buttons {
    margin-bottom: 0;
  }
  #search_form button {
    margin-bottom: 15px;
  }
  #search_results button {
    margin-bottom: 15px;
  }
  #search_results table {
    display: block;
    overflow-x: auto;
  }

  /* analyses-form-filter-region submit button on same line as input */
  #analyses-form-filter-region-item {
    display: inline-block;
  }
  #analyses-form-filter-region-item .ms-ctn {
    width: 15em;
  }
  #analyses-form-filter-region .btn-primary {
    display: inline-block;
    margin-bottom: 15px;
  }

  .nav-tabs {
    margin: 0 -15px;
    display: flex;
  }
  .nav-tabs > li {
    flex: 1;
    float: none;
  }
  .nav-tabs > li > a {
    padding: 5px 14px 11px;
    position: relative;
    text-align: center;
  }
  .nav-tabs > li.active > a,
  .nav-tabs > li.active > a:focus,
  .nav-tabs > li.active > a:hover,
  .nav-tabs > li > a:hover,
  .nav-tabs > li > a:focus {
    border-color: #fff #fff #80b43b;
  }
  .nav-tabs > li > a > span {
    font-size: 11px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: center;
  }
  .nav-tabs > li > a .glyphicon {
    font-size: 20px;
    display: inline;
  }
  #change-form,
  #change-form > form-group {
    margin: 0;
  }
  .display-search {
    top: -5px;
    position: absolute;
    padding: 6px 0;
  }
  .top-bar h4 {
    font-size: 1.7rem;
  }

  h3,
  .h3 label {
    font-size: 1.7rem;
  }
  .tab-content {
    margin: 0 -7px;
  }

  /* Prevent IOS input zooming */
  input[type='text'] {
    font-size: 16px;
  }
}
