@import "colors";

@-webkit-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#settings-dashboard {
  max-height: 100vh;
  color: $main_black;

  #settings-container {
    margin-top: 1rem;
    text-align: center;
  }

  .card {
    min-height: 230px;
    background-color: white;
    margin: 1rem .75rem;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    padding: 10px;
    z-index: 2;
    width: 25rem;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;

    @media (min-width: 992px) { width: 44%; }
    @media (min-width: 1200px) { width: 21%; }

    hr {
      border: 0;
      height: 1px;
      border-top: 1px solid rgba(0, 0, 0, 0.1);
      border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .card-body-container {
      display: table;
      width: 100%;
    }

    .card-body {
      height: 80px;
      width: 100%;
      display: table-cell;
      vertical-align: bottom;
    }

    .tag {
      font-weight: bold;
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      padding: 10px;
      color: $main_black;
      font-size: 14px;
      margin-left: 5px;
      text-decoration: none;

      &.type-label {
        background-color: $light_yellow;
      }

      &.group-label {
        background-color: $cerulean;
      }

      &.stale-label {
        background-color: $bright_red;
      }
    }

    .label-container {
      float: right;
      margin-top: 5px;
    }

    .setting-description {
      clear: both;
      padding: 25px 15px 15px 15px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      color: darken($aluminium, 45%);
    }

    .value-input {
      width: 98%;
      margin-bottom: 10px;
      height: 20px;
      font-size: 18px;
      outline: none;
      border: none;
      border-bottom: 2px solid $aluminium;
      -webkit-transition : border .25s ease-in;
      -moz-transition : border .25s ease-in;
      -o-transition : border .25s ease-in;
      transition : border .25s ease-in;

      &:focus {
        border-color: $tangerine;
        outline: none;
      }
    }

    .date-picker {
      position: relative;
      bottom: 10px;
      border: none;
      border-bottom: 2px solid $aluminium;
      width: 100%;
      text-align: center;
      font-size: 18px;

      &:focus {
        border-color: $tangerine;
        outline: none;
      }
    }

    .value-slider {
      -webkit-appearance: none;
      width: 100%;
      height: 15px;
      border-radius: 5px;
      background: #d3d3d3;
      outline: none;
      opacity: 0.7;
      -webkit-transition: .2s;
      transition: opacity .2s;
      margin: 0 0 10px 0;

      &::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background: $tangerine;
        cursor: pointer;
      }

      &::-moz-range-thumb {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background: $tangerine;
        cursor: pointer;
      }
    }

    .btn-value-submit {
      width: 100%;
      height: 35px;
      text-align: center;
      font-size: 18px;
      border-radius: .25rem;
      background-color: $tangerine;
      border: none;
      outline: none;
      -webkit-transition: background-color 0.5s;
      -moz-transition: background-color 0.5s;
      -ms-transition: background-color 0.5s;
      -o-transition: background-color 0.5s;
      transition: background-color 0.5s;

      &:active {
        color: $main_black;
        opacity: .8;
      }

      &:hover {
        background-color: darken($tangerine, 20%);
      }
    }

    .switch {
      position: relative;
      display: inline-block;
      width: 60px;
      height: 34px;
      margin-bottom: 10px;
      float: right;
    }

    .switch input {display:none;}

    .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ccc;
      -webkit-transition: .4s;
      transition: .4s;

      &:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
      }
    }

    input:checked + .slider {
      background-color: $tangerine;
    }

    input:focus + .slider {
      box-shadow: 0 0 1px $tangerine;
    }

    input:checked + .slider:before {
      -webkit-transform: translateX(26px);
      -ms-transform: translateX(26px);
      transform: translateX(26px);
    }

    .slider.round {
      border-radius: 34px;
    }

    .slider.round:before {
      border-radius: 50%;
    }

    .refresh-button {
      border: none;
      outline: none;
      float: left;
      background: transparent;

      img {
        height: 30px;
      }

      &:hover {
        cursor: pointer;
      }

      &.active {
        img {
          -webkit-animation:spin 1s linear infinite;
          -moz-animation:spin 1s linear infinite;
          animation:spin 1s linear infinite;
        }
      }

      @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
      @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
      @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
    }
  }

  #search-container {
    #search-form {
      text-align: center;
      padding-top: 25px;

      #query {
        height: 50px;
        width: 100%;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        border: 3px solid transparent;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
        font-size: 18px;
        text-align: center;
        -webkit-transition : border .25s ease-in;
        -moz-transition : border .25s ease-in;
        -o-transition : border .25s ease-in;
        transition : border .25s ease-in;

        &:focus {
          border: 3px solid $tangerine;
        }
      }
    }

    .offset-container {
      float: left;
      width: 25%;
      height: 50px;
    }

    .inner-container {
      width: 50%;
      float: left;
    }

    #btn-order {
      float: left;
      margin: 25px 0 0 15px;
      outline: none;
      border: 3px solid transparent;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      -webkit-transition : border .25s ease-in;
      -moz-transition : border .25s ease-in;
      -o-transition : border .25s ease-in;
      transition : border .25s ease-in;
      height: 58px;
      background: white;

      img {
        height: 100%;
      }

      &:hover {
        border: 3px solid $tangerine;
      }
    }

    #sort-menu {
      background: white;
      position: absolute;
      left: 50%;
      top: 25%;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      -webkit-animation: fadeIn 0.5s;
      animation: fadeIn 0.5s;
      padding: 10px;

      @media (min-width: 767px) { top: 16%; left: 60%; }
      @media (min-width: 992px) { top: 12%; left: 65%; }
      @media (min-width: 1200px) { top: 18%; left: 70%; }

      button {
        outline: none;
        border: none;
        width: 100%;
        font-size: 20px;
        font-family: 'Raleway', sans-serif;
        background: transparent;
        padding: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;

        &:hover {
          background-color: $tangerine;
        }
      }
    }

    #main-app-link {
      float: left;
      margin: 25px 0 0 8px;
      height: 53px;
      border: 3px solid transparent;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
      -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
      -webkit-transition : border .25s ease-in;
      -moz-transition : border .25s ease-in;
      -o-transition : border .25s ease-in;
      transition : border .25s ease-in;
      background: white;

      img {
        height: 100%;
      }

      &:hover {
        border: 3px solid $tangerine;
      }
    }
  }

  .notice {
    background-color: white;
    font-size: 24px;
    position: fixed;
    left: 50px;
    top: 85px;
    padding: 25px;
    width: 150px;
    -webkit-border-radius: 0.5rem;
    -moz-border-radius: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    display: none;
    -webkit-animation: fadeIn 0.5s;
    animation: fadeIn 0.5s;

    &.success {
      color: $dark_green;
    }

    &.alert {
      color: $bright_red;
    }
  }

  #progress-container {
    text-align: center;

    #search-submit-progress {
      display: none;
      width: 100%;
      -webkit-appearance: none;
      height: 3px;
      position: relative;
      bottom: 22px;
      left: 3px;

      &::-webkit-progress-bar {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
        background-color: white;
      }

      &::-webkit-progress-value {
        background-color: $cerulean;
      }
    }
  }
}