#iframedialog .modal-header {
  border-bottom: none !important;
}

body {
  padding-right: 0px !important;
}

#contentWrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 0px; /*no footer*/
  overflow-x: hidden;
}

.btn-laji {
  color: #fff;
  background-color: #3498DB;
  border-color: #2980B9;
}

.centered-parent {
  display: table;
  width: 100%;
  position: absolute;
}
.centered {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}

#birdlist {
  border: none;
  outline: none;
}

#birds {
  padding: 3px 5px 3px 0px;
  width: 100%;
}

#chooseBird {
  width: 80%;
  text-align: left;
}

#mapContainer {
  height: 100%;
  position: relative;
}

/* show loading modal backdrop only inside the map container */
#mapContainer .modal-backdrop {
  position: absolute !important;
  z-index: 1000;
}

#mapContainer #map {
  /*width: 100%;*/
  height: calc(100% - 200px);
  box-sizing: border-box;
}

#timeline {
  /*border-top: 1px solid #ccc;*/
  z-index: 10000;
  width: 100%;
  /*height: 100%;*/
  padding: 3px 5px;
}

#timeline table {
  width: 100%;
  box-sizing: border-box;
}

.scrollable-menu {
  height: auto;
  max-height: 400px;
  overflow-x: hidden;
}

#birdlistContainer {
  padding: 0px;
  margin-top: 10px;
  display:inline-block;
  width: 100%;
  max-height: 250px;
  overflow-x: hidden;
  overflow-y: auto;
  border:solid #ccc 1px;
  border-radius: 2px;
}

#birdlist {
  width: 110%;
  overflow: hidden;
  padding: 10px calc(5px + 10%) 10px 10px;
  border: none;
}

#birdlist option, #birdlist optgroup {
  cursor: pointer;
}

#play {
  width: 40px;
  vertical-align: middle;
  float: left;
  margin-right: 5px;
}

#iframeOpen {
  margin-left: 5px;
}

#playSlider, #playSlider .ui-slider-handle {
  cursor: pointer;
}

#speedLabel {
  padding-top: 1px;
  display: block;
  float: left;
}

#speedSlider, #speedSlider .ui-slider-handle {
  cursor: pointer;
}

#url {
  float: left;
}

.publishDate, .eventDate {
  text-align: left;
}

#birds {
  float: left;
  margin-right: 20px;
}

.relatedBirds {
  display: inline;
  float: left;
  text-align: left;"
}

#birdies {
  display: block;
  padding: 1px 1px 1px 5px;
  box-sizing: border-box;
  font-weight: bold;
  z-index: 4;
}

.remove {
  max-width: 38px;
}

.showDescription {
  max-width: 120px;
}

#newsContainer {
  padding: 0px;
  height:100%;
  /*max-height: 100%;*/
  overflow-y: auto;
  flex: 1;
  background-color: rgb(236, 240, 241);
}

#news {
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0px;
}

#newsTitle {
  margin-left: 15px;
  margin-top: 0px;
  padding-top: 15px
}

#newslist > div {
  margin: 0px;
}

#news > .text-muted {
  padding: 6px 15px;
}

[id^=newsitem] {
  padding: 6px 15px;
  cursor: pointer;
}

.activeNews {
  background-color: rgb(209, 220, 231);
}

[id^=individual] {
  height: 30px;
}

[id^=individual] .btn {
  margin-top: 4px;
  margin-bottom: 8px;
}

[id^=individual] .remove {
  height: 24px;
  margin: 3px 5px 6px 0;
}

#autoTracking {
  width: 40px;
}

.lcs_switch {
  width: 60px;
  margin-left: 2px;
}

.lcs_on {
  background: #5bc0de !important;
  box-shadow: 0 0 2px #46b8da inset !important;
}

.lcs_on .lcs_cursor {
  left: 35px !important;
}

.lcs_label_on {
  left: 5px !important;
}

.lcs_label_off {
  right: 5px !important;
}

.lcs_label .glyphicon {
  line-height: inherit;
}

.lcs_switch {
  position: relative;
}

.tooltip {
  position: fixed !important;
  top: 100px !important;
  left: 100px !important;
}

#iframedialog .modal-title, #iframedialog #downloadButtons {
  margin-bottom: 20px;
}

#iframedialog input {
  margin-bottom: 10px;
}

#iframedialog #licences {
  margin-bottom: 5px;
}

#licences td {
  border: none;
  vertical-align: middle;
}

#openInTabContainer {
  position: absolute;
  text-align: center;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}

#openInTab {
  position: relative;
  top: 10px;
  border: none;
  box-shadow: 0 1px 5px rgba(0,0,0,0.4);
  background-color: white;
  color: #333;
  z-index: 999;
}

/* for other than phones */
@media screen and (min-width: 769px) {
  .firstCol {
    float: left;
    width: 180px;
    /*padding: 3px 0px;*/
  }

  .secondCol {
    float: left;
    width: calc(100% - 180px);
    padding-bottom: 1px;
  }

  .secondCol label {
    font-weight: normal;
    /*margin: 5px 0 0 0;*/
  }

  .birdrow {
    clear: both;
    width: 100%;
    float: left;
    position: relative;
  }

  #birdiesContainer {
    float: left;
    height: 100px;
    /*flex: 1;*/
    padding: 0;
    padding-bottom: 10px;
    margin: 0;
    width: 100%;
    overflow-y: auto; /* Trigger vertical scroll    */
    overflow-x: hidden; /* Hide the horizontal scroll */
  }

  #playSlider {
    top: 5px;
    left: 1px;
    margin-right: 5px;
  }

  #playSlider[class^=ui-slider] {
    background: none;
    border: none;
  }

  #playSlider [class^=ui-slider]:not(.ui-slider-handle) {
    background: none;
    border: none;
  }

  #playSlider .ui-slider-handle {
    display: block;
    z-index: 4;
    border: none !important;
    height: 20px !important;
    width: 20px !important;
    margin-left: -18px !important;
    margin-top: 1px !important;
  }

  #playSlider.ui-slider-horizontal .ui-state-default {
    background: url("../images/sliderhandle.png") no-repeat scroll 50% 50%;
  }

  #canvasslider {
    float: left;
    width: 100%;
    /*min-height: 90px;*/
    box-sizing: border-box;
    position: relative;
  }

  #canvasslider canvas {
    position: absolute;
    top: 0;
    left: 180px;
  }

  #lines-layer {
    z-index: 2;
    border: 1px solid #aaa;
    border-left: none;
    left: 0px !important;
  }

  #background-layer {
    z-index: 1;
    border: 1px solid #aaa;
    background-color: #eee;
    border-right: none;
  }

  #canvas-line {
    z-index: 5;
    border-bottom: 1px solid #aaa;
    position: absolute;
    top: 20px;
    height: 0px;
  }

  #ui-layer {
    z-index: 3;
    border: 1px solid #aaa;
    border-right: none;
    cursor: pointer;
  }

  #birdies {
    position: absolute;
    top: 0;
    left: 0;
    width: 180px;
  }

  #playLabel {
    float: left;
  }

  #playLabel_end {
    padding-right: 15px;
    float: right;
  }

  #speedSlider {
    margin: 8px 12px 0 0;
    padding: 0;
    float: left;
    width: 150px;
    top: -5px;
  }

  #speedLabel {
    margin-left: 7px;
    margin-right: 7px;
  }

  #openNews {
    display: none;
  }
}

/* for tablets */
@media screen and (max-width: 991px) {
  body {
    position: absolute;
  }
  #mapContainer {
    position: relative;
  }
  #newsContainer {
    position: absolute;
    top: 0;
    right: 0;
    height: calc(100% - 200px);
    width: 248px;
    box-sizing: border-box;
  }
  #mapContainer #map {
    width: calc(100% - 248px);
  }
}

/* for phones */
@media screen and (max-width: 768px) {
  .xs-hidden {
    display: none;
  }
  .m-button {
    height: 35px !important;
    margin-bottom: 10px;
  }
  body {
    position: absolute;
  }
  #mapContainer {
    position: relative;
  }
  #openNews {
    position: absolute;
    top: 10px;
    right: 0;
    border: none;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    background-color: white;
    z-index: 1000;
  }
  .mobile #openNews {
    border: 2px solid rgba(0,0,0,0.2);
    border-right: none;
    background-clip: padding-box;
    box-shadow: none;
  }
  #openNews.open {
    width: 300px;
    max-width: 90%;
    border-bottom: 1px solid #ccc;
    border-bottom-left-radius: 0px;
  }
  .leaflet-control-layers, .leaflet-control-zoom {
    top: 44px;
  }
  #newsContainer.open {
    display: inline-block;
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    max-width: 90%;
    height: calc(100% - 45px);
    z-index: 1000;
    /*background-color: white;*/
    box-shadow: 0 4px 5px rgba(0,0,0,0.4);
  }
  .mobile #newsContainer.open {
    border-left: 2px solid rgba(0,0,0,0.2);
    background-clip: padding-box;
  }
  #mapContainer #map {
    width: 100%;
    height: calc(100% - 150px);
    min-height: 200px;
  }
  #timeline {
    position: relative;
    z-index: auto;
    padding: 0;
  }
  #birds {
    position: absolute;
    top: 55px;
    left: 5px;
    padding: 0;
    margin: 0;
    width: calc(100% - 10px);
  }
  #chooseBird {
    width: calc(50% - 2px);
    font-size: 100%;
  }
  #iframeOpen {
    position: absolute;
    top: 55px;
    left: calc(50% + 2px);
    text-align: left;
    width: calc(50% - 7px);
    font-size: 100%;
  }
  #birdies {
    position: absolute;
    top: 105px;
    left: 5px;
    padding: 0;
    max-width: calc(100% - 10px);
    display: inline-block;
  }
  #birdies button.remove {
    margin-right: 2px;
  }
  [id^="individual"] {
    float: left;
    margin-right: 10px;
  }
  #play {
    position: absolute;
    top: 15px;
    left: 5px;
  }
  #speed {
    position: absolute;
    top: 13px;
    left: 50px;
  }
  #speedSlider {
    position: absolute;
    top: -7px;
    left: 0px;
    width: 100px;
    z-index: 1000;
  }
  #playSlider {
    position: absolute;
    top: 30px;
    left: 100px;
    width: calc(100% - 110px);
  }

  #playSlider .ui-slider-handle {
    height: 20px !important;
    width: 20px !important;
  }

  #playLabel {
    display: block;
    text-align: center;
    line-height: 150%;
    font-weight: normal;
    padding-top: 6px;
    margin-left: 80px;
  }

  #desc * {
    max-width: 100%;
  }

  #desc h1, #desc h2 {
    font-size: 180%;
  }

  #desc img {
    height: auto !important;
  }
}
