
@import url('https://fonts.googleapis.com/css?family=Roboto');

/* Base framework */

*[ng-app="fmi.halaus"], *[data-ng-app="fmi.halaus"], [ng-app="fmi.halaus"], [data-ng-app="fmi.halaus"] , .moment-picker {
  font-family: "Roboto";
  letter-spacing: 0.1px;
}

.halaus-wrapper {
  position: relative;
  max-width: 750px;
  background-color: #f8f8f8;
  margin-bottom: 20px;
  clear: both;
}

.halaus-wrapper * {
  box-sizing: border-box;
}

.halaus-license::after {
  content: "";
  background-image: url('../png/FMI0DATA_280.jpeg');
  width: 100px;
  height: 25px;
  background-size: 100px auto;
  background-repeat: no-repeat;
  display: block;
}

.halaus-container {
  padding: 20px;
}

.halaus-container::after {
  content: "";
  display: table;
  clear: both;
  margin-bottom: -20px;
}

.halaus-container>* {
  margin-top: 0;
  margin-bottom: 20px;
}

.halaus-wrapper .mobile-stretch, .halaus-wrapper .stretch {
  width: 100%;
  display: block;
}

.halaus-wrapper table.mobile-stretch {
  display: table; /* tables ain't blocks */
}


/* Generic typography etc. */

.halaus-wrapper h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0.5rem 0;
}

.halaus-wrapper>h3 {
  padding: 15px;
  color: #fff;
  background-color: #60b3e1;
  margin: 0;
}

.halaus-wrapper>h3>span {
  background-color: #42a3d7;
  height: 50px;
  display: inline-block;
  margin: -15px 20px -15px -15px;
  padding: 15px 20px;
}

.halaus-wrapper h4 {
  font-size: 14px;
  margin: 5px 10px;
}

.halaus-wrapper p, .halaus-wrapper ul {
  font-size: 14px;
  margin-bottom: 1em;
}

.halaus-wrapper ul {
  padding: 0 0 0 2rem;
}

.halaus-wrapper ul li {
  padding: 0;
  margin: 0;
}

.halaus-wrapper input[type=text], select, .input {
  font-size: 14px;
  border: 1px solid black;
  padding: 17px 20px;
  border-radius: 3px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  border-color: #d8d9d9;
  display: inline-block;
  background-color: #fff;
}

.halaus-wrapper button {
  cursor: pointer;
  padding: 17px 20px;
  background-color: #fff;
  border-radius: 3px;
  font-size: 14px;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.15);
  border: 0;
}

.halaus-wrapper .selected, .halaus-wrapper .highlight {
  font-weight: 700;
}
.halaus-wrapper .disabled label {
  pointer-events: none;
  color: #e3e3e3;
}
.halaus-wrapper *:disabled, .disabled input {
  pointer-events: none;
  background-color: #ddd !important;
}

.halaus-wrapper label {
  margin: 7px 10px;
  display: block;
  font-size: 14px;
}

.halaus-wrapper *.inline {
  display: inline-block;
}

.halaus-wrapper table {
  border-collapse: collapse;
}

.halaus-wrapper td {
  border: 1px solid #e3e3e3;
  padding: 10px;
}

/* Tab navigation */

.halaus-wrapper nav.tabs {
  display: flex;
  border: 1px solid #d8d9d9;
}
.halaus-wrapper nav.tabs button {
  flex: 1;
  box-shadow: none;
  border-right: 1px solid #d8d9d9;
  border-bottom: 3px solid white;
  border-radius: 0;
  padding: 12px 20px;
}
.halaus-wrapper nav.tabs button:hover:not(.active) {
  border-bottom: 3px solid #979797;
}
.halaus-wrapper nav.tabs button.active {
  border-bottom: 3px solid #60b3e1;
}
.halaus-wrapper nav.tabs button:last-child {
  border-right: none;
}

/* Checkbox table navigation */

.wfs-selections tr {
  display: block;
}
.wfs-selections td {
  vertical-align: top;
  background-color: #fff;
  display: block;
}


/* Auto-complete */

.halaus-wrapper .angucomplete-dropdown {
  position: absolute;
  z-index: 10;
  background-color: #fff;
  padding: 7px 0;
  line-height: 20px;
  font-size: 14px;
  padding: 12px 20px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.15);
}

.halaus-wrapper #stationAutoComplete {
  width: 100%;
}

.halaus-wrapper #stationAutoComplete input {
  width: 100%;
  background-image: url('../png/icon-search@2x.png');
  background-size: auto 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 100% 50%;
}

.angucomplete-row {
  padding: 10px 20px;
}
.angucomplete-selected-row {
  background: #60b3e1;
  color: #fff;
}

/* Map toggler & map itself */

.halaus-wrapper .map-toggle {
  background-image: url('../png/icon-map-blue@2x.png');
  background-repeat: no-repeat;
  background-position: calc(50% - 50px) 50%;
  background-size: auto 100%;
  background-size: contain;
  color: #60b3e1;
  float: left;
  width: 100%;
  padding-left: 50px;
}
.halaus-wrapper .map-toggle.toggled {
  background-image: url('../png/icon-map-white@2x.png');
  background-color: #60b3e1;
  color: #fff;
}
.halaus-wrapper #map {
  position: relative;
}
.halaus-wrapper .ol-zoom {
  border-radius: 3px;
  font-size: 14px;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.15);
  position: absolute;
  top: 20px;
  left: 20px;
  overflow: hidden;
}
.halaus-wrapper .ol-zoom button {
  border-radius: 0;
  box-shadow: none;
  display: block;
  padding: 10px;
}
.halaus-wrapper .ol-zoom-in {
  border-bottom: 2px solid #e3e3e3;
}

/* Time range selection */

.moment-picker * {
  box-sizing: border-box;
}
.moment-picker {
  position: absolute;
  z-index: 1000;
  position: absolute;
  background-color: #fff;
  line-height: 20px;
  font-size: 14px;
  border-radius:3px;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.15);
  width: auto !important;
  overflow: hidden;
}
.moment-picker td {
  padding: 10px;
  cursor: pointer;
  border: 0;
}
.moment-picker .header-view {
  background-color: #f8f8f8;
  width: 100%;
}
.moment-picker .header-view th {
  width: calc(100% - 40px);
  padding: 10px;
  text-align: center;
}
.moment-picker .header-view th:first-child, .moment-picker .header-view th:last-child {
  width: 40px;
  position: relative;
}
.moment-picker .header-view th:first-child::after,
.moment-picker .header-view th:last-child::after {
  content: "";
  width: 40px;
  height: 40px;
  background-size: 100%;
  background-size: contain;
  display: block;
  position: absolute;
  background-color: #f8f8f8;
  top: 0;
  left: 0;
}
.moment-picker .header-view th:first-child::after {
  background-image: url("../png/icon-arrow-left@2x.png");
}
.moment-picker .header-view th:last-child::after {
  background-image: url("../png/icon-arrow-right@2x.png");
}
.moment-picker-specific-views {
  padding: 17px 20px;
}
.moment-picker-specific-views td {
  text-align: center;
  cursor: pointer;
}
.moment-picker-specific-views .selected {
  color: #fff;
  background-image: url('../png/icon-circle.png');
  background-size: contain;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}
.year-view .moment-picker-specific-views .selected {
  background-image: none;
  background-color: #60b3e1;
}
.moment-picker .disabled {
  opacity: 0.2;
}
.moment-picker-specific-views th {
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
}

/* The grand download button */

.halaus-wrapper .fetch-observations {
  width: 100%;
  color: #fff;
  background-color: #4a4a4a;
  font-weight: 600;
}
.halaus-wrapper .fetch-observations:hover {
  background-color: #979797;
}

/* Loader */

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
.halaus-wrapper .loader {
  position: absolute;
  display: block;
  left: 46%;
  left: calc(50% - 35px);
  width: 70px;
  height: 70px;
  background-color: white;
  border-radius: 3px;
  padding: 13px;
  box-sizing: border-box;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.15);
  z-index: 1000;
}
.halaus-wrapper .loader::before {
  content: "";
  width: 44px;
  height: 44px;
  background-image: url('../png/spinner@2x.png');
  background-size: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  display: block;
  -webkit-animation: spin 4s linear infinite;
  -moz-animation: spin 4s linear infinite;
  animation: spin 4s linear infinite;
  width: 44px;
  height: 44px;
}
.halaus-wrapper #map .loader {
  top: 45%;
  top: calc(50% - 35px);
}
.halaus-wrapper .fetch-observations .loader {
  top: -80px;
}
.halaus-wrapper .fetch-observations .loader::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #fff;
  position: absolute;
  bottom: -10px;
  left: 45%;
  left: calc(50% - 10px);
}
.halaus-wrapper .loading-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: rgba(0,0,0,0.2);
  color: #fff;
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

/* Results table */

.results {
  clear: both;
  margin-top: 20px;
}
.results td {
  padding: 5px;
}

/* Unordered media queries */

.halaus-wrapper .mobile-hide {
  display: none !important;
}
.halaus-wrapper .desktop-hide {
  display: block !important;
}

@media (min-width: 768px) {

  .halaus-wrapper .mobile-hide {
    display: block !important;
  }
  .halaus-wrapper .desktop-hide {
    display: none !important;
  }

  .halaus-wrapper .mobile-stretch {
    width: auto;
    display: initial;
  }

  .halaus-wrapper span.mobile-stretch {
    display: inline;
  }

  .halaus-wrapper #stationAutoComplete {
    float: left;
    width: calc(100% - 220px);
    margin-right: 20px;
  }

  .halaus-wrapper .date-range::before {
    content: "";
    background-image: url('../png/icon-calendar@2x.png');
    width: 50px;
    height: 50px;
    background-size: 100%;
    background-size: contain;
    display: inline-block;
    vertical-align: bottom;
    margin-right: 15px;
  }

  .halaus-wrapper .map-toggle {
    background-position: 20px 50%;
    width: 200px;
  }

  .halaus-wrapper table.wfs-selections {
    display: flex;
  }

  .halaus-wrapper table.wfs-selections tbody {
    display: block;
    flex-basis: auto;
    flex-grow: 1;
    flex-shrink: 1;
  }
}
