html {
  position: relative;
  min-height: 100%;
}

body {
  font-family: "Open Sans", sans-serif;
  margin-bottom: 100px;
}

.container-fluid {
  padding-left: 30px;
  padding-right: 30px;
}

.container-fluid-no-padding {
  padding-left: 0;
  padding-right: 0;
}

nav .container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

h1 {
  margin-top: 10px;
  margin-bottom: 20px;
}

h2 {
  margin-top: 0;
  margin-bottom: 30px;
}

h3 {
  margin-top: 0px;
  margin-bottom: 15px;
}

.navbar-right {
  float: right;
  padding-right: 15px;
}

.navbar-header {
  float: left;
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  padding: 10px;
}

.author {
  color: #CCCCCC;
}

nav a.dropdown-toggle {
  font-size: 15px;
}

nav .navbar-brand {
  margin-right: 20px;
}

nav .toolbar-group {
  margin-left: 20px;
  display: inline-block;
}

nav .toolbar-group .divider {
  display: inline-block;
  width: 10px;
}

div#content ul.nav {
  margin-top: 15px;
  margin-bottom: 20px;
}

div#content ul.nav.sub-nav {
  margin-top: 0;
  margin-bottom: 20px;
}

.form-horizontal .control-label {
  text-align: left !important;
}

ul.space-after-element li {
  margin-bottom: 10px;
}

.container .jumbotron {
  padding-left: 35px;
  padding-right: 35px;
  padding-top: 35px;
  padding-bottom: 35px;
  margin-top: 20px;
}

.container .jumbotron p:last-child {
  margin-bottom: 0
}

img#brand {
  display: inline-block;
  padding-right: 15px;
}

.navbar-brand {
  font-weight: bold;
  font-size: 20px;
}

nav {
  font-size: 13px;
}

h2+p, h2+div {
  margin-top: 30px;
}

p+form, div+form {
  margin-top: 30px;
}

.link-action {
  margin-left: 20px;
}

nav form {
  margin-top: 10px;
  margin-bottom: 10px;
}

nav form input.form-control#nav-search {
  display: inline-block;
  width: 140px;
}

nav form input {
  margin-right: 10px;
}

nav form button {
  margin-right: 5px;
}

h3 small {
  margin-left: 10px;
}

button#toggle {
  position: absolute;
  bottom: 10px;
  left: 15px;
}

.track-status1 {
  background: url(../images/1.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status2 {
  background: url(../images/2.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status3 {
  background: url(../images/3.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status4 {
  background: url(../images/4.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status5 {
  background: url(../images/5.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status6 {
  background: url(../images/6.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status7 {
  background: url(../images/7.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status8 {
  background: url(../images/1.gif) center left no-repeat;
  padding-left: 25px;
}

.track-status {
  margin-top: 2px;
}

h3.track-status {
  margin-top: 0px;
  background-position: 0px 6px;
}

.track-status-recent {
  margin-bottom: 15px;
}

.train-item-narrow {
  margin-top: 10px;
  min-width: 225px;
  display: inline-block;
}

.train-item-narrow .train-item {
  min-width: 0;
}

td.trainspot-flag {
  width: 20px;
}

div.train-status-flag {
  width: 12px;
  display: inline-block;
}

img.trainspot-flag {
  margin-right: 5px;
}

.wide-bottom-margin {
  margin-bottom: 40px;
}

form input#minutesLate {
  width: 70px;
  display: inline-block;
}

.form-group {
  min-height: 34px;
}

.fixed-left {
  padding: 10px;
  width: 300px;
  float: left;
  margin-right: 30px;
}

.fluid-right {
  padding: 10px;
  padding-left: 330px;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width : 767px) {
  .fixed-left {
    width: 100%;
    float: none;
  }

  .fluid-right {
    padding-left: 10px;
    width: 100%;
    float: none;
  }
}

ul.nav-pills.main-tabs li ul {
  margin-left: 30px;
  margin-bottom: 0;
}

ul.nav-pills.main-tabs {
  margin-bottom: 0;
  margin-top: 0;
}

ul.nav-pills.main-tabs li a {
  padding-left: 0;
  padding-bottom: 10px;
  padding-top: 5px;
}

ul.nav-pills.main-tabs li.active a {
  padding: 10px;
}

.train-item {
  display: inline-block;
  margin-top: 5px;
  margin-bottom: 5px;
}

.difference-label {
  display: inline-block;
}

.train-separator {
  border-top: 1px solid #999;
  padding-top: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: bold;
}

.cancelled {
  text-decoration: line-through;
}

.train-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.train-color-item {
  display: inline-block;
  height: 16px;
  padding-right: 10px;
}

.alert-icon-list {
  margin-top: 5px;
  margin-bottom: 10px;
}

.alert-settings-list {
  max-width: 600px;
}

#alert-log {
  max-height: 200px;
  overflow: auto;
  margin-bottom: 10px;
}

a.fb-login, a.google-login, a.password-login {
  padding: 5px;
  margin-bottom: 15px;
}

a.fb-login img, a.google-login img, a.password-login img {
  height: 25px;
}

a.fb-login, a.fb-login:hover, a.fb-login:active, a.fb-login:focus, a.fb-login:focus:active {
  background-color: #1A77F2;
  border-color: #1A77F2;
  color: white;
}

a.google-login, a.google-login:hover, a.google-login:active, a.google-login:focus, a.google-login:focus:active {
  background-color: white;
  color: #337AB7;
  border-color: #1A77F2;
}

.live-train-item {
  display: inline-block;
  min-width: 215px;
  margin-bottom: 10px;
  margin-right: 10px;
  padding: 2px;
  padding-left: 5px;
  padding-right: 5px;
  border-radius: 5px;
}

.live-train-item .station {
  display: inline-block;
  font-size: 10px;
}

.live-train-item .number {
  display: inline-block;
  min-width: 75px;
}

.live-train-item .status {
  display: inline-block;
  min-width: 35px;
}

.live.changed {
  background-color: #dff0d8;
}

.live.normal {
  background-color: white;
  -webkit-transition: background 20s;
  -moz-transition: background 20s;
  -o-transition: background 20s;
  transition: background 20s
}

.profile-picture {
  margin-right: 10px;
  max-width: 50px;
}

span.label {
  border-radius: 10px;
  padding: 1px 5px;
}

.filter-button, #clear-filter {
  margin-bottom: 10px;
}

.line-letter {
  display: inline-block;
}

span.label.line-letter {
  background-color: #337ab7;
  border-radius: 2px;
  padding: 0px 3px;
  font-size: 12px;
  min-width: 18px;
  padding: 2px 0px;
}

span.label.label-black {
  background-color: #444;
}

span.label.label-gray {
  background-color: #999;
}

span.label.line-letter.small {
  font-size: 9px;
  min-width: 14px;
}

span.label.black {
  background-color: #333;
}

table tr td.cause-row, table tbody tr td.cause-row {
  border-top: 0;
  font-size: 90%;
  padding-left: 10px;
  padding-top: 0;
}

#live-log {
  float: right;
  margin-right: 10px;
  position: absolute;
  right: 0;
  width: 170px;
  font-size: 14px;
  font-weight: bold;
  border-left: 1px solid #ddd;
  overflow: hidden;
  padding-left: 10px;
}

#live-log-left-side {
  float: left;
  width: 100%;
}

.live-log-item {
  font-size: 11px;
  font-weight: normal;
  margin-top: 15px;
}

.timetable-metadata {
  font-size: 11px;
  margin-top: 30px;
}

.interesting-train-item {
  padding: 2px 5px;
  background-color: rgba(255, 0, 0, 0.4);
  display: inline-block;
  border-radius: 6px;
  white-space: nowrap;
}

#telegram-alerts {
  border: 1px solid #aaa;
  padding: 10px;
  border-radius: 5px;
}

.table-train-history tbody td, .table-train-history thead th {
  font-size: 12px;
}

.panel-train-history {
  display: inline-block;
  min-width: 920px;
}

#tooltip {
  background-color: rgb(255, 252, 239);
  padding: 5px;
  border-radius: 6px;
  border: 1px solid black;
  box-shadow: 3px 3px 5px #888888;
  display: inline-block;
  position: absolute;
  max-width: 300px;
}

.table-condensed>tbody>tr>td.history-day, .table-condensed>thead>tr>th.history-day {
  width: 27px;
  padding: 0;
  text-align: center;
}

span.partially-cancelled {
  color: black;
}

img.bordered {
  border: 1px solid #aaa;
  padding: 3px;
}

.btn.toggle-button {
  margin-right: 5px;
}

.margin-box {
  margin-top: 10px;
  margin-bottom: 10px;
}

.inline-panel {
  display: inline-block;
  margin-right: 20px;
  margin-bottom: 20px;
  vertical-align: top;
}

table tbody tr td.spot-details-row {
  padding-top: 0;
  border-top: none;
  padding-left: 35px;
  font-size: 80%;
  color: #888;
  margin-top: 0;
}

.mini-gravatar {
  opacity: 0.5;
  width: 16px;
  margin-right: 5px;
}

.label-purple {
  background-color: purple;
}

span.label-train-ready {
  background-color: transparent;
  border: 1px solid green;
  color: green;
  display: inline-block;
  font-weight: normal;
  padding: 4px;
}

#running-pinned-trains {
  margin: 10px 0;
  vertical-align: top;
}

.running-pinned-train {
  padding: 6px;
  display: inline-block;
  margin: 3px;
  background-color: #E2ECFF;
  border-radius: 6px;
  font-size: 90%;
  vertical-align: top;
}

#section-speed-container {
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  display: none;
}

#section-speed-content {
  background-color: #F2F9FF;
  padding: 6px;
  box-shadow: 5px 5px 5px #ccc;
  border: 1px solid #aaa;
  border-radius: 5px;
  display: inline-block;
}

.vek-ei {
  background-color: #white;
}

.ei-vek-ei {
  background-color: #eee;
}

.map-right-text {
  font-size: 14px;
  text-align: center;
  padding-top: 10px;
  color: #007;
}

.avoin-logo {
  display: inline-block;
  background-image: url("/images/avoin.png");
  width: 178px;
  height: 40px;
  background-size: 178px 40px;
}

.graph-line {
  stroke: #007;
}

.vehicle-number {
  display: inline-block;
  font-size: 90%;
  padding: 2px 4px;
  border-radius: 6px;
  background-color: #E0ECFF;
}

@media (max-width : 591px) {
  .background-light-green-xxs {
    display: inline-block;
    border-radius: 6px;
    background-color: #dff0d8;
  }

  .background-light-yellow-xxs {
    display: inline-block;
    border-radius: 6px;
    background-color: #f9f2cc;
  }

  .background-light-red-xxs {
    display: inline-block;
    border-radius: 6px;
    background-color: #f2dede;
  }

  .visible-xxs {
    display: block;
  }

  .visible-xxs-block {
    display: inline-block;
  }

  .hidden-xxs {
    display: none !important;
  }

  .hidden-xxs-inline {
    display: none !important;
  }

  .hidden-xxs-block {
    display: none !important;
  }

  nav div.container {
    min-height: 90px;
  }

  .difference-label {
    min-width: 0px;
  }

  .train-item {
    min-width: 0px;
    margin-right: 10px;
  }

  div.train-status-flag {
    width: auto;
  }
}

@media (min-width : 592px) {
  .hidden-xxs {
    display: block;
  }

  .hidden-xxs-inline {
    display: inline;
  }

  .hidden-xxs-block {
    display: inline-block;
  }

  .visible-xxs, .visible-xxs-block {
    display: none;
  }

  .difference-label {
    min-width: 50px;
  }

  .train-item {
    min-width: 290px;
  }
}

@media (max-width : 767px) {
  #live-log {
    display: none;
  }

  #live-log-left-side {
    padding-right: 0;
    width: 100%;
  }

  .nav>li>a {
    padding: 10px 12px;
  }
}

@media (min-width : 768px) {
  #live-log-left-side {
    padding-right: 170px;
  }
}

@media (min-width : 992px) {
  .time-block {
    display: inline-block;
    min-width: 110px;
  }

  .cancelled .time-block {
    text-decoration: line-through;
  }
}

@media print {
  a[href]::after, a[href]:after {
    content: "";
  }

  nav.navbar, nav.navbar div.container {
    display: inline-block;
  }

  nav.navbar div.container form, nav.navbar div.container div {
    display: none;
  }

  nav.navbar div.container div.navbar-header {
    display: inline-block;
  }

  nav.navbar .navbar-header {
    display: inline-block;
  }

  .btn, .nav-tabs, .sub-nav, footer, nav .nav-toolbar {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: #333;
    color: #ccc;
  }

  .navbar-default {
    background-color: #222;
    border-color: #777;
  }

  .navbar-default .navbar-brand {
    color: white;
  }

  .form-control {
    background-color: black;
    border-color: #777;
    color: white;
  }

  h1, h2, h3, h4, h5, p.lead {
    color: white;
  }

  .panel {
    background-color: #333;
  }

  .author {
    color: #666;
  }

  .nav-tabs>li.active>a {
    background-color: #555;
    color: #ccc
  }

  .nav>li>a:hover {
    background-color: #666;
    color: #ccc;
  }

  .avoin-logo {
    background-image: url("/images/avoin-dark.png");
  }

  div.white-content {
    background-color: white;
    color: black;
  }

  .navbar-default .navbar-nav>li>a {
    color: #aaa;
  }

  .navbar-default .navbar-nav>li>a:hover {
    color: #ddd;
  }

  .live.changed {
    background-color: #050;
  }

  .live.normal {
    background-color: #333;
    -webkit-transition: background 10s;
    -moz-transition: background 10s;
    -o-transition: background 10s;
    transition: background 10s
  }

  #tooltip {
    color: black;
  }

  .mapboxgl-ctrl-icon {
    color: black;
  }

  .mapboxgl-popup {
    color: black;
  }

  .map-right-text {
    color: #aaa;
  }

  g.tick text {
    fill: white;
  }

  g.tick line {
    stroke: white;
  }

  .table>tbody>tr.success>td {
    background-color: #030;
  }

  .table>tbody>tr.active>td {
    background-color: #404040;
  }

  #section-speed-container {
    color: black;
  }

  .vek-ei {
    background-color: #111;
  }

  .ei-vek-ei {
    background-color: #555;
  }

  .jumbotron {
    background-color: #555;
  }

  @media (max-width : 591px) {
    .background-light-green-xxs, .background-light-yellow-xxs, .background-light-red-xxs {
      color: black;
    }
  }

  .table>tbody>tr>td {
    border-color: #777;
  }

  .table>thead>tr>th {
    border-color: #777;
  }

  .nav-tabs>li.active>a, .nav-tabs {
    border-color: #888;
  }

  .mini-gravatar {
    opacity: 0.75;
  }

  a {
    color: #4998D8;
  }

  #tooltip {
    box-shadow: none;
  }

  #section-speed-content {
    box-shadow: none;
  }

  .bootstrap-datetimepicker-widget {
    color: white;
    background-color: #555;
  }

  .graph-line {
    stroke: #75BFFF;
  }

  .vehicle-number {
    background-color: #004;
    color: white;
  }
}
