/* compileDest = ./src/launch-timeline-app/launch-timeline-app.css */

// Basics Patterns and colors
@import "_patterns";

//normalization CSS
@import "_norms";

:host {
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin: 0 auto;
  max-height: 100vh;
  overflow-y: hidden;
  padding: 0 16px;
  width: auto;
  white-space:nowrap;
}

#elon{
    box-sizing: border-box;
    border-radius: 16px;
    color: #444;
    display: block;
    height: 100vh;
    min-width: 150px;
    max-width: 150px;
    padding: 16px;
    position: relative;
    text-align: center;

    img{
      bottom: 18vh;
      max-height: 15px;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    p{
      bottom: 11vh;
      height: 4vh;
      position: absolute;
      width: 100%;
      left: 50%;
      transform: translateX(-50%);
    }
}

#timeline{
  bottom: 3vh;
  @include thin-border(bottom, solid, $spacex-blue);
  position: absolute;
  width: 100%;
  z-index: 10;

  &:before{
    content: "Timeline";
    left: 0;
    position: absolute;
    top: -20px;
  }
}

header{
  input, select{
    display: none;
  }
}

.scroll-area {
  align-items: flex-end;
  display: flex;
  flex-wrap: nowrap;
  height: 100vh;
  margin-top: -40px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  -webkit-overflow-scrolling: touch; //iOS Momentum Scrolling

  .altitude-line{
    @include thin-border(bottom, solid, $spacex-blue);
    position: absolute;
    width: 150px;
    z-index: 10;

    &:before, &:after{
      color: white;
      background: rgba(26, 24, 99, 0.25);
      padding: 3px 5px;
      border-radius: 2px;
    }

    &:before{
      left: 0;
      position: absolute;
      top: -25px;
    }

    &:after{
      left: 0;
      position: absolute;
      top: 4px;
    }

    &#gto{
      top: 10%;

      &:before{
        content: "Geostationary Transfer Orbit";
      }

      &:after{
        content: "37,500 km";
      }
    }

    &#leo{
      top: 18%;

      &:before{
        content: "Low Earth Orbit";
      }

      &:after{
        content: "160 - 2,000 km";
      }
    }

    &#karman{
      top:26%;

      &:before{
        content: "K\e1rm\e1n Line";
      }

      &:after{
        content: "100 km";
      }
    }
  }
}

header {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  select, input {
    font-family: inherit;
  }
}

header h2 {
  flex-grow: 1;
  color: #fff;
}

.scrim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.scrim.visible {
  display: block;
  opacity: 1;
}



@mixin launchyear($years){

  @each $year in $years{
    spacex-launch[year="#{$year}"]{
      &::after{
        bottom: 25px;
        content:"#{$year}";
        display: block;
        left: 50%;
        position: absolute;
        transform: translateX(-50%);
      }

      ~ spacex-launch[year="#{$year}"]::after{
        content:"";
      }
    }

    spacex-launch[year="#{$year}"]{
      &::before{
        background: $spacex-blue;
        content:"";
        display: block;
        bottom: 10px;
        height: 15px;
        left: 50%;
        position: absolute;
        transform: translateX(-50%);
        width: 1px;
      }

      ~ spacex-launch[year="#{$year}"]::before{
        background: transparent;
      }
    }
  }
}

$year-list: '2006','2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016', '2017', '2018', '2019';

@include launchyear($year-list);

//Loader Styling
@import "_loader";
