
$route-item-font-weight-bold: 800;
$route-item-font-weight-small: 400;
$route-item-triangle-height: 50px !default;

/* ----- General styling for route information listings ----- */
route-item {
  display: block;

  &.lite {

    &:before {
      color: $hint-color; // Fix safari border color bug
      display: block;
      position: absolute;
      width: $route-item-triangle-height;
      height: $route-item-triangle-height;
      top: 0;
      right: 0;
      content: "";
      border-top: solid $route-item-triangle-height/2 $hint-color;
      border-right: solid $route-item-triangle-height/2 $hint-color;
      background-size: 18px 18px;
    }

    &:after {
      display: block;
      position: absolute;
      width: $route-item-triangle-height;
      height: $route-item-triangle-height;
      top: 0;
      right: 0;
      content: "";
      background: url('../img/icon_tracking_route.svg') 80% 20% no-repeat;
      background-size: 18px 18px;
    }

    &.lite-tracked {
      &:before {
        color: $royal; // Fix safari border color bug
        border-top: solid $route-item-triangle-height/2 $royal;
        border-right: solid $route-item-triangle-height/2 $royal;
      }
    }

    &:before {
      border-left: solid $route-item-triangle-height/2 rgba(0,255,0,0);
      border-bottom: solid $route-item-triangle-height/2 rgba(0,255,0,0);
    }
  }

  .bus-number {
    margin-right: $padding-small-horizontal;
    display: inline;
    font-weight: $route-item-font-weight-bold;
    text-align: center;
    font-size: $font-size-large;
    border-radius: $border-radius-large;
  }

  .stops {
    display: block;
    /* Determines the amount of vertical spacing
       between the .bus-number and the stops */
    margin-top: $font-size-base * 0.8;
    position: relative;
    flex: 1 1 auto;

    .stop-icon {
      /* this value depends on the width of the image -- leaving as a constant */
      flex: 0 0 auto;
      width: 8px;
      height: 8px;
      border-radius: 4px;
      margin-top: $font-size-base / 2;
    }

    .start .stop-icon {
      background: #00C4A5;
      /*
        we want line to be:
            - the height of .start (=> height: 100%),
            - displace the left of the line to the middle of the circle
               the image is 10x10 hence left: 4px (to account for width=2px)
            - .start is inline, so it's height = $line-height-computed.
              Image is centered vertically => top = $line-height-computed / 2
              N.B. overflow must be "visible" on .start for this to work
            - positioned relative to the stop icon => .start { position: relative }
      */
    }
    .end .stop-icon {
      background: #FF6C6A;
    }

    .start, .end {
      line-height: $line-height-base;
      position: relative;
      white-space: normal;
      display: flex;

      .time {
        text-transform: lowercase;
        flex: 0 0 5em;
        font-weight: $route-item-font-weight-bold;
      }

      .road {
        text-transform: capitalize;
        flex: 1 1 auto;
        white-space: initial;
        font-weight: $route-item-font-weight-small;
        color: $normal-grey;
      }
    }

    .end {
      margin-top: 10px;
      margin-bottom: 10px;
    }
  }
  .tracking-icon {
    position: absolute;
    top: 7px;
    right: 7px;
  }

  h4{
    color: $hint-color;
    margin: 5px 0 4px 0 !important;
  }

}

  .icon-and-schedule {
    margin-top: 0.5em;
    font-weight: $route-item-font-weight-small;

    & + .icon-and-schedule {
      margin-top: 0em;
    }
  }

  .icon-span {
    height: 20px;
    width: 20px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
    margin-right: 0.5em;

    &.company-logo {
      border: 1px solid $light-grey;
    }
  }

  .mini-icon {
    max-width: 20px;
    max-height: 20px;
  }

  .mini-info {
    font-size: $font-size-small;
    font-weight: $route-item-font-weight-small;
    color: $normal-grey;
    &.important{
      color: $balanced;
      font-weight: bold;
    }
  }

  .hide-route-overview {
    display: none
  }
