/**
 * scrum-board
 *
 * @category   scrum-board
 * @author     Vaibhav Mehta <vaibhav@decodingweb.com>
 * @copyright  Copyright (c) 2016 Vaibhav Mehta <https://github.com/i-break-codes>
 * @license    http://www.opensource.org/licenses/mit-license.html  MIT License
 * @version    1.0 Beta
 */


@import 'https://fonts.googleapis.com/css?family=Hind+Vadodara:300,400';

//Colors

$base-color: rgba(0,0,0,.4);
$primary-color: #fff;
$secondary-color: rgba(255,255,255,.1);

$grad-start: #000428;
$grad-end: #004e92;

* {
  margin: 0;
  padding: 0;
  outline: 0;
  box-sizing: border-box;
}

html, body, .wrapper {
  height: 100%;
}

body {
  font-weight: 300;
  font-family: Hind Vadodara;
  background-image: linear-gradient(to left, $grad-start, $grad-end);
  color: $primary-color;
  font-size: 14px;
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
  color: inherit;
}

.clear {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

.hide {
  display: none !important;
}

header {
  background-color: $base-color;

  li {
    padding: 15px;
    float: left;
    width: 20%;
    text-align: center;
    position: relative;
    text-transform: uppercase;

    &:after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
    }

    &:nth-child(1) {
      &:after {
        background: linear-gradient(to left, #cb2d3e , #ef473a);
      }
    }

    &:nth-child(2) {
      &:after {
        background: linear-gradient(to left, #ffb347 , #ffcc33);
      }
    }

    &:nth-child(3) {
      &:after {
        background: linear-gradient(to left, #56ab2f , #a8e063);
      }
    }

    &:nth-child(4) {
      &:after {
        background: linear-gradient(to left, #00d2ff , #3a7bd5);
      }
    }

    &:nth-child(5) {
      &:after {
        background: linear-gradient(to left, #4CB8C4 , #3CD3AD);
      }
    }
  }
}

.wrapper {
  overflow: hidden;
}


//dashboard
.dashboard {
  height: calc(100% - 101px);

  > div {
    float: left;
    height: 100%;
    border-right: 1px solid $base-color;
    width: 20%;
  }
}


//Cards
.card {
  background-color: $base-color;
  min-height: 50px;
  margin: 10px;
  position: relative;
  overflow: hidden;
  height: 40px;
  box-shadow: 3px 3px 3px rgba(0,0,0,.1);
  z-index: 2;

  &:before {
    content: "";
    position: absolute;
    height: 100%;
    width: 1px;
  }

  p:before,
  h5:after {
    .rejected & {
      color: #ef473a;
    }

    .pending & {
      color: #ffcc33;
    }

    .development & {
      color: #a8e063;
    }

    .testing & {
      color: #3a7bd5;
    }

    .production & {
      color: #3CD3AD;
    }
  }

  h5 {
    font-size: 13px;
    line-height: 50px;
    padding-left: 10px;
    font-weight: 300;
    cursor: move;
  }

  &.edit-mode {
    h5 {
      position: relative;

      &:after {
        top: 50%;
        margin-left: 5px;
        margin-top: 1px;
        transform: translateY(-50%);
        position: absolute;
        font-size: 9px;
        content: "(Edit Mode Enabled)";
      }
    }
  }

  .rejected & {
    &:before {
      background: linear-gradient(to left, #cb2d3e , #ef473a);
    }
  }

  .pending & {
    &:before {
      background: linear-gradient(to left, #ffb347 , #ffcc33);
    }
  }

  .development & {
    &:before {
      background: linear-gradient(to left, #56ab2f , #a8e063);
    }
  }

  .testing & {
    &:before {
      background: linear-gradient(to left, #00d2ff , #3a7bd5);
    }
  }

  .production & {
    &:before {
      background: linear-gradient(to left, #4CB8C4 , #3CD3AD);
    }
  }

  &.expanded {
    overflow: auto !important;
    height: auto !important;
  }
}

.card-details {
  padding: 10px;
  font-size: 12px;
  word-wrap: break-word;
  padding-top: 0;

  p {
    margin-bottom: 10px;
    position: relative;

    &:before {
      position: absolute;
      left: 0;
    }

    &:nth-child(1) {
      padding-left: 67px;

      &:before {
        content: "Description : ";
      }
    }

    &:nth-child(2) {
      padding-left: 72px;

      &:before {
        content: "Remote URL : ";
      }
    }

    &:nth-child(3) {
      padding-left: 70px;

      &:before {
        content: "Assigned To : ";
      }
    }
  }

  a {
    border-bottom: 1px dotted #fff;

    &:hover {
      border-bottom-style: solid;
    }
  }
}

.dragged-over {
  background-color: rgba(0,0,0,.1);
}

@keyframes rotate180 {
  to {
    transform: rotate(180deg);
  }
}


.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: linear-gradient(to left, $grad-start, $grad-end);
  z-index: 2;
}

.modal-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 400px;
  margin: auto;
  width: 100%;
  transform: translateX(-50%) translateY(-50%);

  .close-modal {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    position: absolute;
    top: -90px;
    font-family: Open Sans;
    line-height: 52px;
    font-size: 20px;
    left: 50%;
    transform: translateX(-50%);
    vertical-align: middle;
    cursor: pointer;

    &:hover {
      border-color: #fff;
    }
  }

  h3 {
    font-weight: 100;
    font-size: 30px;
    position: relative;
  }
}

.add-task-form {
  text-align: center;

  li {
    margin-top: 30px;
  }

  [type=text],
  [type=submit],
  textarea {
    color: #fff;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    width: 100%;
    line-height: 24px;
    padding: 15px 10px;
    appearance: none;
    border: 1px solid rgba(255,255,255,.07);
    background-color: transparent;
    transition: border-color .25s linear;

    &::-webkit-input-placeholder {
      color: rgba(255,255,255,.3);
    }

    &:focus {
      border-color: #fff;
    }
  }

  [type=submit] {
    cursor: pointer;
    border-color: transparent;
  }

  textarea {
    resize: none;
    min-height: 100px;
  }
}

.expand-card {
  height: 19px;
  width: 19px;
  background-size: auto 100%;
  display: inline-block;
  position: absolute;
  top: 25px;
  cursor: pointer;
  transform: translateY(-50%);
  right: 15px;
  padding: 3px;

  .rejected & {
    background-image: url('../img/rejected-expand.svg');
  }

  .pending & {
    background-image: url('../img/pending-expand.svg');
  }

  .development & {
    background-image: url('../img/development-expand.svg');
  }

  .testing & {
    background-image: url('../img/testing-expand.svg');
  }

  .production & {
    background-image: url('../img/production-expand.svg');
  }

  svg {
    fill: #fff;
  }
}

.removed-task-notification {
  position: absolute;
  bottom: 1%;
  left: 50%;
  font-size: large;
  transform: translateX(-50%);
  padding: 5px 20px;
  color: #515151;
  border-radius: 3px;
  background-color: rgba(255,255,255,.8);
  box-sizing: 0 0 3px rgba(0,0,0,.6);
}

.offline-notification {
  position: absolute;
  bottom:1%;
  left:15%;
  transform: translateX(50%);
  padding: 5px 20px;
  color: #fff;
  font-size:larger;
  border-radius: 3px;
  background-color: #cb2d3e;
  box-sizing: border-box;
}


footer {
  height: 50px;
  position: relative;
  border-top: 1px solid $base-color;
}

.remove {
  display: block;
  background-color: #ef473a;
  border-radius: 50%;
  height: 30px;
  width: 30px;
  text-align: center;
  padding-top: 7px;
  transition: all 300ms ease-out;
  cursor: default;

  img {
    width: 16px;
  }

  &.dragged-over {
    width: 250px;
    border-radius: 3px;
  }
}

.add-task {
  z-index: 1;
  border-radius: 50%;

  img {
    width: 30px;
    display: block;
    box-shadow: 3px 3px 3px rgba(0,0,0,.1);
  }

  &:hover {
    img {
      animation: rotate180 .2s linear;
    }
  }
}

[data-tooltip] {
  position: relative;

  &:before {
    display: none;
    content: attr(data-tooltip);
    background-color: rgba(0,0,0,.6);
    padding: 10px 20px;
    position: absolute;
    text-align: center;
    white-space: nowrap;
    left: 50%;
    transform: translateY(-130%) translateX(-50%);
  }

  &:hover {
    &:before {
      display: block;
    }
  }
}

.controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

  li {
    float: left;
    margin-right: 20px;
  }
}

.branding,
.create-task-branding {
  text-transform: uppercase;
  font-size: 18px;
  padding: 10px;

  sup {
    position: absolute;
    font-size: 9px;
    margin-top: -6px;
    margin-left: -3px;
  }

  span {
    color: rgba(255,255,255,.6);
  }
}

.create-task-branding {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 300px;
}

.github-ref {
  height: 30px;
  width: 30px;

  img {
    height: 29px;
    width: 29px;
  }
}

.onboard {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, .7);
  z-index: 2;
}

.onboard-modal {
  height: 300px;
  width: 450px;
  background-color: #fff;
  border-radius: 3px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tips {
  position: absolute;
  bottom: 90px;
  right: -280px;
  font-size: 13px;
  background-color: rgba(0,0,0,.3);
  padding: 10px;
  border-radius: 3px;
  padding-left: 25px;
  opacity: 0;
  animation: showTips 500ms ease-in forwards;
  cursor: pointer;
  background: {
    image: url('../img/info.svg');
    position: 4px 12px;
    size: 16px;
    repeat: no-repeat;
  }

  span {
    font-size: 10px;
    font-style: italic;
  }
}

@keyframes showTips {
  to {
    right: 20px;
    opacity: 1;
  }
}
