@charset "UTF-8";

// contains critical css that needs to load immediately
@import "bootstrap-custom";
@import "fa-svg-with-js";

.site-header > .navbar {
  //border-top: 5px solid $dark;
  border-bottom: 2px solid $light;
}

// nav tabs
.nav-tabs {
  margin-bottom: 1rem;
}

// table sticky header
.table-responsive {
  height: 80vh;
  position: relative;
}

.table {
  .header {
    th {
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      left: 0;
      background-color: $body-bg;
      background-clip: padding-box;

      &:first-child {
        z-index: 3;
      }
    }
  }

  th {
    &:first-child {
      position: -webkit-sticky;
      position: sticky;
      left: 0;
      z-index: 2;
    }
  }

  tbody {
    background-clip: padding-box;
    tr:nth-child(odd) th {
      background-color: rgb(240, 240, 240);
    }
    tr:nth-child(even) th {
      background-color: $body-bg;
    }
  }

  tr {
    text-align: left;
  }
}

.euro {
  text-align: right;
}

// back-to-top button
#back-to-top {
  cursor: pointer;
  position: -webkit-sticky;
  position: sticky;
  bottom: 40px;
  display:none;
}

@include media-breakpoint-down(sm) {
  #back-to-top {
    position: fixed;
    right: 20px;
  }
}

@include media-breakpoint-only(md) {
  #back-to-top {
    margin-left: 95%;
  }
}

@include media-breakpoint-only(lg) {
  #back-to-top {
    margin-left: 65%;
  }
}

@include media-breakpoint-only(xl) {
  #back-to-top {
    margin-left: 60%;
  }
}

@media (max-width: 1300px - .02) {
  #back-to-top.no-sidebar {
    position: fixed;
    right: 20px;
  }
}

@media (min-width: 1300px) {
  #back-to-top.no-sidebar {
    margin-left: 102%;
  }
}

$navbarHeight: 58px;

// sticky sidebar
@include media-breakpoint-up(lg) {
  #sidebar {
    position: sticky;
    top: $navbarHeight + 15px;
  }
  #main.submenu #sidebar {
    top: 2*$navbarHeight + 15px;
  }
}

.large {
  font-size: $font-size-lg;
}

#submenuNavbar {
  top: $navbarHeight;
}

#main {
  margin-top: $navbarHeight + 15px;
  margin-bottom: $navbarHeight + 15px;
}

#main.submenu {
  margin-top: 2*$navbarHeight + 15px;
}

#countdown:before {
  display: inline;
}

.site-header > .navbar {
  background-color: $body-bg;
}

.site-footer {
  border-top: 2px solid $light;
  background-color: $body-bg;
}

.post-title {
  font-weight: $font-weight-normal;
}

blockquote {
  padding: 0 1em;
  color: $gray-600;
  border-left: 0.25em solid $gray-300;
}

@include media-breakpoint-up(md) {
  #main {
    margin-bottom: 295px;
  }
}

@include media-breakpoint-down(sm) {
  .md-up {
    display: none;
  }
}

// increase distance between clickable elements in footer
.md-up {
  margin-top: 10px;
}

ul.nav li {
  margin-left: 4px;
  margin-right: 4px;
}

ul.list-unstyled li {
  margin-top: 4px;
  margin-bottom: 4px;
}

// limit width of article to optimise reading experience
.reading-optimised > p {
  text-align: justify;
}
@include media-breakpoint-up(md) {
  .reading-optimised {
    width: 550px;
    margin-left: auto;
    margin-right: auto;
  }
}

// map of election district feature

#election_map svg {
  height: auto;
  width: 100%;
  margin: 0 auto;
  display: block;
}

#election_map g {
  fill: #ccc;
}

#election_map g:visited {
  /*fill: #fc0 !important;*/
  fill: #fc0;
}
#election_map g:hover, #election_map g.active {
  fill: #228B22;
  cursor: pointer;
}

#election_map g:active {
  fill: #fc0;
}

.info_panel {
  background-color: rgba(255,255,255, .8);
  /*background-color: rgba(255,204,0, .8);*/
  padding: 5px;
  font-size: 10px;
  position: absolute;
  border: 1px solid #333;
  color: #333;
  white-space: nowrap;
}

.anchor {
  position: relative;
  display: block;
  top: -$navbarHeight;
  visibility: hidden;
}
