/**
 * Common stylesheet for Orchestra.
 *
 * This partial provides common variables and mixins useful for various view and
 * component styles.
 */

$main-blue: rgb(0, 121, 191);
$light-gray: rgb(204, 204, 204);
$dark-gray: rgb(60, 60, 60);
$light-green: rgb(46, 204, 113);
$dark-green: rgb(39, 174, 96);
$bold-yellow: rgb(230, 198, 55);
$black: rgb(0, 0, 0);

$sqrt-2: 1.4142;

$base-font-size: 10px;
$panel-margin: 3rem;
$panel-padding: 1.5rem;
$panel-button-margin: 1.5rem;

$main-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

@mixin vendor-prefix($name, $argument) {
  -webkit-#{$name}: #{$argument};
  -ms-#{$name}: #{$argument};
  -moz-#{$name}: #{$argument};
  -o-#{$name}: #{$argument};
  #{$name}: #{$argument};
}

.disable-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

%no-padding {
  padding-left: 0;
  padding-right: 0;
}

.row.no-padding {
  @extend %no-padding;
  > [class *= "col-"] {
    @extend %no-padding;
  }
}

%loading-spinner {
  &::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-bottom: 1px solid $black;
    border-right: 1px solid $black;
    border-radius: 50%;
    content: "";
    animation: spin .75s linear infinite;
  }
}

@keyframes spin {
  from {
    transform:rotate(0deg);
  }
  to {
     transform:rotate(360deg);
  }
}

// styles related to the hijack banner
.hijacked-warning {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 5px 10px;
  position: fixed;

  &__message {
    font-size: 14px;
    line-height: 16px;
    text-align: left;
    font-weight: normal;

    @media (max-width: 825px) {
      font-size: 12px;
      .hidden-mobile {
        display: none;
      }
    }

  }

  &__actions {
    display: flex;
    justify-content: flex-end;
  }

  &__show {
    display: none;
    align-items: center;
    background: #ae9e49;
    position: absolute;
    right: 10px;
    top: 100%;
    border-radius: 0 0 6px 6px;
    padding: 3px 9px;
    cursor: pointer;

    path {
      fill: #000;
    }

    span {
      font-size: 11px;
      line-height: 11px;
      text-transform: uppercase;
      font-weight: bold;
      margin-left: 5px;
      color: #000;
      letter-spacing: 1px;
    }
  }

  &__button {
    margin: 0 0 0 10px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 20px;
    position: relative;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    transition: all 0.1s ease-in-out;
    text-decoration: none;
    background: #ffffff;
    border-radius: 3px;
    color: #4d4d4d;
    padding: 4px 16px;
    cursor: pointer;
    border: 1px solid #ae9e49;

    @media (max-width: 825px) {
      padding: 0 4px;
      margin-left: 4px;
      font-size: 12px;
    }

    &:hover {
      background: #fcfcfc;
    }

    &:focus,
    &:active {
      border-color: #ae9e49;
      box-shadow: inset 0px 0px 0px 1px #ae9e49;
      outline: none;
      text-decoration: none;
      position: relative;
      z-index: 10;
    }
  }

  ~ #container {
    padding-top: 50px;

    .header {
      top: 50px;
    }

    .timecard-view {
      top: 150px;
    }
  }
}

.hijack-message-hidden {
  .hijacked-warning {
    top: -44px;

    &__show {
      display: flex;
    }

    ~ #container {
      padding-top: 6px;

      .header {
        top: 6px;
      }

      .timecard-view {
        top: 106px;
      }
    }
  }
}
