/**
 * 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 {
  background-size: 50px 50px;
  background-color: #ffe761;
  color: #000;
  background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
  background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
  background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent);
}

.hijacked-warning-default {
  z-index: 1000000;
  font-weight: 600;
  text-align: center;
  position:fixed;
  min-height: 50px;
  height: auto;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 5px 7px;
  border-bottom: 2px solid #ae9e49;
  font-size: 12px;
  font-family: sans-serif;
}
#hijacked-warning-wrapper::after {
    height: 50px;
    content: "";
    display: block;
}

.hijacked-warning-bootstrap {
  margin-bottom:0;
}

.django-hijack-button-default {
	-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
	-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
	box-shadow:inset 0px 1px 0px 0px #ffffff;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6));
	background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
	background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
	background:-o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
	background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%);
	background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0);
	background-color:#ffffff;
	-moz-border-radius:6px;
	-webkit-border-radius:6px;
	border-radius:6px;
	border:1px solid #dcdcdc;
	display:inline-block;
	cursor:pointer;
	color:#666666;
	font-family:Arial;
	font-size:11px;
	font-weight:bold;
	padding:3px 12px;
	text-decoration:none;
	text-shadow:0px 1px 0px #ffffff;
}
.django-hijack-button-default:hover {
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff));
	background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
	background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
	background:-o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
	background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%);
	background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0);
	background-color:#f6f6f6;
}
.django-hijack-button-default:active {
	position:relative;
	top:1px;
}

.hijacked-warning-controls-pull-right {
	float: right;
	margin-right: 15px;
}

.hijacked-warning-controls,
.hijacked-warning-controls form {
	display: inline;
}

.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;
      }
    }
  }
}
