// This file defines styles that conform to the Vendasta style guide.
@import "blueprint/interaction";
@import "blueprint/grid";
@import "compass/css3";
@import "compass/css3/user-interface";
@import "partials/base";
@import "blueprint";
@import "partials/utils";
@import "partials/firefox";
@import "partials/colors";
@import "partials/fonts";
@import "partials/radialprogress";
@import "partials/horizontalprogress";
@import "partials/daterangepicker";
@import "partials/summary-stats";

$DEFAULT_BORDER_RADIUS: 2px;

$HEADER_HEIGHT: 68px;
$LOGO_HEIGHT: 58px;

$Z_INDEX_ICON: 1;
$Z_INDEX_ELEMENT: 9001;


// ********************* Blueprint ***********************
$blueprint-table-header-color: $PRIMARY_BACKGROUND_COLOR;
$blueprint-table-stripe-color : $SECONDARY_BACKGROUND_COLOR;
$font-color : $PRIMARY_FONT_COLOR;

@import "partials/icons";
@import "partials/tooltip";
@import "partials/sidebar";

// ********************* HTML *********************
html {
    -webkit-text-size-adjust: 100%;
}

body {
    @media screen {
      background-color: $SECONDARY_BACKGROUND_COLOR;
    }
    font-family: $DEFAULT_FONT_FAMILY;
    line-height: 1.3;
    font-size: $DEFAULT_FONT_SIZE;
    margin: 0;
    padding: 0;
}

a, a:visited, a:active {
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  color: $LINK_COLOR;
  text-decoration: none;
  @include transition-property();
  @include transition-duration(.3s);
}

a:hover {
  color: $LINK_HOVER_COLOR;
  text-decoration: underline;
}

@media print {
  a, a:visited, a:active, a:hover {
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    color: $PRIMARY_FONT_COLOR;
    text-decoration: none;
  }
}

h1 {
    color: $PRIMARY_FONT_COLOR;
    font-size: 24px;
    font-weight: bold;
    line-height: 24px;
    margin: 0 0 0.5em 0;
    clear:both;
}

h2 {
    color: $PRIMARY_FONT_COLOR;
    font-size: 18px;
    font-weight: bold;
    line-height: 18px;
    clear:both;
}

h3 {
    color: $PRIMARY_FONT_COLOR;
    font-weight: bold;
    font-size: 16px;
    line-height: 16px;
    clear:both;
}

h4 {
    font-size: 12px;
    font-weight: bold;
    line-height: 12px;
    margin-bottom: 0;
    clear:both;
}

// ********************* Forms *********************

input[type=button], .button, button, input[type=submit], .upload-progress, .progress-indicator {
  font-size: 14px;
  font-weight: normal;
  background: none;
  border: 1px solid $LINK_COLOR;
  color: $LINK_COLOR;
  height: 30px;
  min-width: 110px;
  padding: 6px 25px;
  @include border-radius($DEFAULT_BORDER_RADIUS);
  cursor: pointer;
  position: relative;
}

input[type=button]:hover, button:hover, input[type=submit]:hover, .button:hover {
  background-color: $SECONDARY_BACKGROUND_COLOR;
  color: $LINK_HOVER_COLOR;
  border-color: $LINK_HOVER_COLOR;
}

input[type=button].processing, input[type=submit].processing, button.processing, .button.processing {
  background-color: $SECONDARY_BACKGROUND_COLOR;
  color: transparent;
}

.v-selectors {
  label {
    @include user-select(none);
  }

  input[type="radio"],
  input[type="checkbox"] {
    display: none;
  }

  input[type="radio"] + label,
  input[type="checkbox"] + label {
    cursor: pointer;
  }

  input[type="radio"] + label:before,
  input[type="checkbox"] + label:before {
    font-family: 'Platform Icons';
    display: inline;
    font-size: $MEDIUM_FONT_SIZE;
    padding-right: 3px;
    vertical-align: middle;
  }

  input[type="radio"] + label:before {
    // e067 is an empty radio button
    content: "\e067";
    color: $LINK_COLOR;
  }

  input[type="radio"] + label:hover:before {
    color: $LINK_HOVER_COLOR;
  }

  input[type="radio"]:checked + label:before {
    // e068 is a selected radio button
    content: "\e068";
    color: $LINK_COLOR;
  }

  input[type="radio"]:checked + label:hover:before {
    color: $LINK_HOVER_COLOR;
  }

  input[type="checkbox"] + label:before {
    // e165 is an empty checkbox
    content: "\e165";
    color: $LINK_COLOR;
  }

  input[type="checkbox"] + label:hover:before {
    color: $LINK_HOVER_COLOR;
  }

  input[type="checkbox"].tristate + label:before,
  input[type="checkbox"].tristate + label:hover:before,
  input[type="checkbox"]:checked.tristate + label:before,
  input[type="checkbox"]:checked.tristate + label:hover:before {
    content: "\e605";
  }

  input[type="checkbox"]:checked + label:before {
    // e164 is a checked checkbox
    content: "\e164";
    color: $LINK_COLOR;
  }

  input[type="checkbox"]:checked + label:hover:before {
    color: $LINK_HOVER_COLOR;
  }

  input[type="checkbox"]:disabled + label:before,
  input[type="checkbox"]:disabled + label:hover:before,
  input[type="checkbox"]:disabled + label,
  input[type="radio"]:disabled + label:before,
  input[type="radio"]:disabled + label:hover:before,
  input[type="radio"]:disabled + label {
    cursor: default;
    color: $DISABLED_SELECTOR_COLOR;
  }

  // Alternate checkbox styling ("toggle switch")
  input[type="checkbox"].toggle + label:after,
  input[type="checkbox"].toggle:checked + label:after {
    font-weight: bold;
    vertical-align: middle;
  }

  input[type="checkbox"].toggle + label {
    @include common-font-icon('\e139');
    width: 60px;
    &:before {
      color: $ERROR_COLOR;
      font-size: $MEDIUM_ICON_SIZE;
    }
    &:after {
      color: $ERROR_COLOR;
      content: " OFF";
    }
  }

  input[type="checkbox"].toggle:checked + label {
    @include common-font-icon('\e138');
    &:before {
      color: $SUCCESS_COLOR;
      font-size: $MEDIUM_ICON_SIZE;
    }
    &:after {
      color: $SUCCESS_COLOR;
      content: " ON";
    }
  }

  input[type="checkbox"].toggle:disabled + label:before,
  input[type="checkbox"].toggle:disabled + label:hover:before,
  input[type="checkbox"].toggle:disabled + label:after,
  input[type="checkbox"].toggle:disabled + label:hover:after,
  input[type="checkbox"].toggle:disabled + label,
  input[type="radio"].toggle:disabled + label:before,
  input[type="radio"].toggle:disabled + label:hover:before,
  input[type="radio"].toggle:disabled + label:after,
  input[type="radio"].toggle:disabled + label:hover:after,
  input[type="radio"].toggle:disabled + label {
    cursor: default;
    color: $DISABLED_SELECTOR_COLOR;
  }
}

/* alternative to v-selectors with checkboxes right aligned */
.v-selectors-right {
  @extend .v-selectors;
  input[type="radio"] + label:before,
  input[type="checkbox"] + label:before {
    float: right;
    padding-right: 0px;
    padding-left: 3px;
  }

  input[type="checkbox"].toggle + label:after {
    position: relative;
    top: 3px;
  }
}

.v-icon-control, form.v-form .v-icon-control {
  &.v-selectors-right {
    position:relative;
    top: 10px;
    width: 460px;
    min-height: 1px;
  }

  label {
    color: $TERTIARY_FONT_COLOR;
    font-size: $LARGE_FONT_SIZE;
    font-weight: bold;
    margin-left: 50px;
    position:relative;
    top: -37px;
    width: 420px;

    &:before {
      position: absolute;
      margin-left: 391px;
    }
  }

  .icon {
    border-radius: 50%;
    color: $TERTIARY_BACKGROUND_COLOR;
    float: left;
    font-size: 30px;
    margin: 0;
    padding: 0;
    height: 40px;
    width: 40px;

    &.custom {
      background-color: $LINK_COLOR;
      color: #FFFFFF;
      font-size: 30px;
      text-align: center;
    }
  }
}

.v-select-wrap {
  color: $SECONDARY_FONT_COLOR;
  background-color: transparent;
  border: 1px $PRIMARY_BORDER_COLOR;
  cursor: pointer;
  display: inline-block;
  height: 23px;
  position: relative;
  padding: 0 5px;
  font-size: 16px;

  &.selected {
    ul {
      display: block;
    }
  }

  select {
    // we cannot hide the select element or certain events will fail in IE so just hide it off page
    position: absolute;
    left: -5000px;
  }

  ul {
    @include box-shadow(0px 0px 2px);
    background-color: $PRIMARY_BACKGROUND_COLOR;
    display: none;
    list-style: none;
    left: 1px;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 23px;
    width: 100%;
    z-index: $Z_INDEX_ELEMENT;

    li {
      color: $SECONDARY_FONT_COLOR;
      font-weight: normal;
      padding: 5px;
      padding-right: 18px;
      text-shadow: none;
      background-color: transparent;

      &:hover {
        background-color: $LIGHT-GREY;
      }
    }
  }

  .v-select-data {
    text-shadow: 1px 1px $WHITE_FONT_COLOR;
    font-weight: bold;
    position: relative;
    top: 4px;

    &:hover{
      color: $LINK_COLOR;
    }
  }

  .collapse-icon {
    float: right;
    position: relative;
    top: 2px;
  }
  .hover {
      &:hover {
        color: $LINK-HOVER-COLOR;
        .collapse-icon{
          color: $LINK-HOVER-COLOR;
        }
      }
   }
}

.processing {
  @include common-font-icon('\e072');
}

.processing:before {
  font-size: $LARGE_FONT_SIZE;
  display: inline-block;
  position: absolute;
  left: 1px;
  right: 1px;
  top: 7px;
  color: $LINK_COLOR;
  width: 20px;
  margin: 0 auto;
  @include spin-animation(0.7s, 8);
}
.static:before{
  position: static;
}
.primary-action.processing:before, .add-button.processing:before, .remove-button.processing:before {
  color: $WHITE_FONT_COLOR;
}

.primary-action-disabled.processing:before {
  color: $TERTIARY_BACKGROUND_COLOR;
}

.primary-action, .add-button, .remove-button {
  display: inline-block;
  color: $WHITE_FONT_COLOR;
  text-decoration: none;
  background-color: $LINK_COLOR;
  border-color: transparent;
  @include border-radius($DEFAULT_BORDER_RADIUS);
}

.primary-action:hover, .add-button:hover, .remove-button:hover {
  background-color: $LINK_HOVER_COLOR;
  cursor:pointer;
  color: $WHITE_FONT_COLOR;
}

.primary-action.processing {
  background-color: $LINK_HOVER_COLOR;
  color: $LINK_HOVER_COLOR;
}

.primary-action-disabled, .primary-action-disabled:hover {
  cursor: default;
  display: inline-block;
  color: $TERTIARY_BACKGROUND_COLOR;
  text-decoration: none;
  background-color: $DISABLED_BUTTON_COLOR;
  border-color: transparent;
  @include border-radius($DEFAULT_BORDER_RADIUS);
}

.secondary-action-disabled, .secondary-action-disabled:hover {
  cursor: default;
  display: inline-block;
  color: $DISABLED_BUTTON_COLOR;
  background: none;
  text-decoration: none;
  border: 1px solid $DISABLED_BUTTON_COLOR;
  @include border-radius($DEFAULT_BORDER_RADIUS);
}

.primary-action-disabled.processing {
  background-color: $DISABLED_BUTTON_COLOR;
  color: $DISABLED_BUTTON_COLOR;
}

.add-button {
  background-color: $SUCCESS_COLOR;
}

.add-button:hover {
  background-color: $SUCCESS_HOVER_COLOR;
  border-color: transparent;
}

.add-button.processing {
  background-color: $SUCCESS_HOVER_COLOR;
  color: $SUCCESS_HOVER_COLOR;
}

.remove-button {
  background-color: $ERROR_COLOR;
}

.remove-button:hover {
  background-color: $ERROR_HOVER_COLOR;
  border-color: transparent;
}

.remove-button.processing {
  background-color: $ERROR_HOVER_COLOR;
  color: $ERROR_HOVER_COLOR;
}

.remove-button-disabled, .remove-button-disabled:hover {
  cursor: default;
  display: inline-block;
  color: $TERTIARY_BACKGROUND_COLOR;
  background-color: $DISABLED_REMOVE_BUTTON_COLOR;
  text-decoration: none;
  border: 1px solid $DISABLED_REMOVE_BUTTON_COLOR;
  @include border-radius($DEFAULT_BORDER_RADIUS);
}

.back-to-top-button {
  display: block;
  position: fixed;
  right: 25px;
  bottom: 25px;
  background-color: $LINK_HOVER_COLOR;
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0px;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.5s,opacity 0.5s linear;

  &.back-to-top-show {
    opacity: 0.7;
    visibility: visible;
    transition: opacity 0.5s linear, visibility 0s linear;
    &:hover {
      background-color: $LINK_HOVER_COLOR;
      opacity: 1.0;
    }
  }
}

.large-button {
  height: 40px;
  min-width: 110px;
}

.large-button.processing:before {
  top: 12px;
}

.v-button-group, form.v-form .v-button-group {
  display: table;
  table-layout: fixed;
  @include box-sizing(border-box);

  input {
    display: none;
    &:checked + label {
      color: $WHITE_FONT_COLOR;
      background-color: $LINK_COLOR;
      border-top-color: $LINK_COLOR;
      border-bottom-color: $LINK_COLOR;
      &:hover {
        background-color: $LINK_HOVER_COLOR;
        border-top-color: $LINK_HOVER_COLOR;
        border-bottom-color: $LINK_HOVER_COLOR;
      }
      .check-icon {
        display: inline-block;
      }
      &:first-of-type {
        border-left-color: $LINK_COLOR;
        &:hover {
          border-left-color: $LINK_HOVER_COLOR;
        }
      }
      &:last-of-type {
        border-right-color: $LINK_COLOR;
        &:hover {
          border-right-color: $LINK_HOVER_COLOR;
        }
      }
    }
  }

  input[type="radio"]:checked:hover + label {
    cursor: default;
    background-color: $LINK_COLOR;
    border-top-color: $LINK_COLOR;
    border-bottom-color: $LINK_COLOR;
    &:first-of-type {
      border-left-color: $LINK_COLOR;
      &:hover {
        border-left-color: $LINK_COLOR;
      }
    }
    &:last-of-type {
      border-right-color: $LINK_COLOR;
      &:hover {
        border-right-color: $LINK_COLOR;
      }
    }
  }

  label, button, a {
    cursor: pointer;
    display: table-cell;
    border: 1px solid $TERTIARY_BACKGROUND_COLOR;
    border-right: none;
    padding: 0 10px;
    margin: 0;
    vertical-align: middle;
    height: 40px;
    width: auto;
    min-width: inherit;
    background-color: $WHITE_BACKGROUND_COLOR;
    @include box-sizing(border-box);
    @include border-radius(0);
    text-align: center;
    font-size: $LARGE_FONT_SIZE;
    @include user-select(none);
    outline: none;
    &:hover {
      background-color: $TERTIARY_BACKGROUND_COLOR;
    }
    &:first-of-type {
      @include border-radius($DEFAULT_BORDER_RADIUS 0 0 $DEFAULT_BORDER_RADIUS);
    }
    &:last-of-type {
      border-right: 1px solid $PRIMARY_BORDER_COLOR;
      @include border-radius(0 $DEFAULT_BORDER_RADIUS $DEFAULT_BORDER_RADIUS 0);
    }
  }

  &.v-button-group-small {
    label, button, a {
      font-size: $DEFAULT_FONT_SIZE;
      height: 30px;
    }
  }

  &.v-button-group-with-check-icons {
    label {
      text-align: left;
    }
    input:checked + label {
      &::after {
        float: right;
        @include common-font-icon-base('\e070');
      }
    }
  }

 &.v-button-group-disabled {
  label, label:hover {
    cursor: default;
    color: $DISABLED_BUTTON_COLOR;
    background-color: $WHITE_BACKGROUND_COLOR;
  }
  input:checked + label, input:checked + label:hover {
    color: $TERTIARY_BACKGROUND_COLOR;
    background-color: $DISABLED_BUTTON_COLOR;
    border: 1px solid $WHITE_FONT_COLOR;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-right: none;
    &:first-of-type {
      border-left-color: transparent;
    }
    &:last-of-type {
      border-right-color: transparent;
    }
  }
 }
}


.badge {
  display: inline-block;
  border-radius: 10px;
  padding: 0 8px;
  line-height: 20px;
  color: $WHITE_FONT_COLOR;
  font-size: 11px;
  text-transform: uppercase;
}

.badge-yellow, .badge-orange, .badge-red, .badge-green, .badge-light-blue, .badge-medium-blue, .badge-dark-blue,
.badge-grey, .badge-black {
  @extend .badge;
}

.badge-yellow { background-color: $BADGE_COLOR_ONE; }
.badge-orange { background-color: $BADGE_COLOR_TWO; }
.badge-red { background-color: $BADGE_COLOR_THREE; }
.badge-green { background-color: $BADGE_COLOR_FOUR; }
.badge-light-blue { background-color: $BADGE_COLOR_FIVE; }
.badge-medium-blue { background-color: $BADGE_COLOR_SIX; }
.badge-dark-blue { background-color: $BADGE_COLOR_SEVEN; }
.badge-grey { background-color: $BADGE_COLOR_EIGHT; }
.badge-black { background-color: $BADGE_COLOR_NINE; }

// ***** Old form stuff *****
form {
    @include column(12);
    clear: both;
    label {
        clear: both;
        @include column(2);
        margin-top: 5px;
        margin-bottom: 5px;
    }
    input[type="text"], input[type="password"], input[type="email"] {
        @include column(3);
    }
    .read-only {
        @include column(3);
        margin-top: 5px;
        margin-bottom: 5px;
    }
    textarea {
        font-family: "andale mono", "lucida console", monospace;
        font-size: $DEFAULT_FONT_SIZE;
    }
    label {
        font-weight: bold;
    }
    input[type="submit"] {
      margin-left: 160px;
      margin-top: 5px;
      margin-bottom: 5px;
    }
    #form-link {
      margin-left: 160px;
      margin-top: 5px;
      margin-bottom: 10px;
    }
    .required:after {
      content: " *";
      color: #ff0000;
    }
}

.error {
    font-size: 1.167em;
    font-weight: bold;
    color: $ERROR_COLOR;
    border-color: $ERROR_COLOR;
    border-width: 1px;
    @include box-shadow(0px 0px 2px);
}


// ********************* Tables *********************
.base-table {
  .dataTables_empty {
    @include no-items;
    vertical-align: middle;
  }
  .dataTables_filter, .table-search {
    @include search-box;
    float: left;
    margin-bottom: 10px;
    width: 300px;
    position: absolute;

    input {
      width: 260px;
      padding: 0px 10px;
      &:focus, &::first-line {
        outline: none;
        background-color: $WHITE_BACKGROUND_COLOR;
      }
    }

    label {
      color: $TERTIARY_FONT_COLOR;
      display: block;
      font-size: $MEDIUM_FONT_SIZE;
      padding-top: 7px;
      position: absolute;
      text-indent: 10px;
      width: 300px;
      text-align: left;
      height: 20px;
    }
  }

  .dataTables_length {
    display: none;
  }

  .dataTables_info, .table-info {
    color: $TERTIARY_FONT_COLOR;
    text-align:right;
    padding-top: 10px;
    width: span(12);
    height: 27px;
    position: relative;
  }

  .dataTables_paginate {
    width: span(12);
    text-align: center;
    font-size: $MEDIUM_FONT_SIZE;
    font-weight: bold;
    margin-bottom: 5px;
    .first {
      display: none;
    }
    .last {
      display: none;
    }
    a.paginate_active, a.paginate_button {
      color: $SECONDARY_FONT_COLOR;
      background-color: $WHITE_BACKGROUND_COLOR;
      border: 0px;
      font-weight: bold;
      padding: 2px 5px;
      margin: 0 3px;
      cursor: pointer;
    }
    .paginate_disabled_previous:hover,
    .paginate_enabled_previous:hover,
    .paginate_disabled_next:hover,
    .paginate_enabled_next:hover {
      text-decoration: none;
    }
    a:hover {
      text-decoration: none;
    }

    a.paginate_button:hover {
      background-color: $WHITE_BACKGROUND_COLOR;
      border: 0px;
    }
    a.previous {
      margin-right: 20px;
    }
    a.next {
      margin-left: 20px;
    }
    a.paginate_button {
      background-color: $WHITE_BACKGROUND_COLOR;
      border: 0px;
      color: $LINK_COLOR;
      font-weight: bold;
    }
    .paginate_button_disabled {
      .left-icon, .right-icon {
        color: $TERTIARY_BACKGROUND_COLOR;
        &:hover {
          color: $TERTIARY_BACKGROUND_COLOR;
        }
      }
    }
  }
  .table-load-more {
    @extend button;
    width: span(6);
    height: 22px;
    display: block;
    text-align: center;
    padding-top: 6px;
    margin-left: span(3);
    text-decoration: none;
    &:hover {
      @extend button:hover;
    }
  }

  table{
    margin-bottom: 10px;
    border-collapse: collapse;
    font-size: $DEFAULT_FONT_SIZE;
    position: relative;
    table-layout: fixed;
    width: span(12);

    @for $i from 1 through 12{
      .table-#{$i}-col {
        width: span($i) - 1px;
        border-right: 0px;
      }
      .table-#{$i}-col-last {
        width: span($i) - 22px;

      }
    }
    thead, tbody {
      td {
        padding: 0px 10px;
        height: 30px;
        color: $SECONDARY_FONT_COLOR;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        a.delete-icon {
          float: right;
          color: $SECONDARY_FONT_COLOR;
        }
      }
      .icon-and-text {
        color: $LINK_COLOR;
        span {
          margin-right: 5px;
        }
        a {
          font-size: $DEFAULT_FONT_SIZE;
        }
      }
      .main-attribute {
        font-weight: bold;
      }
      .icon {
        font-size: $DEFAULT_FONT_SIZE;
      }
      th {
        height: 23px;
        background-color: $GREEN_BACKGROUND_COLOR;
        padding: 5px 10px;
        color: $SECONDARY_FONT_COLOR;
        font-weight: bold;
        border: 1px solid $PRIMARY_BORDER_COLOR;
        text-align: left;
      }
    }
    tbody {
      tr.even {
        background-color: $PRIMARY_BACKGROUND_COLOR;
        td.sorting_1 {
          background-color: $PRIMARY_BACKGROUND_COLOR;
        }
      }
      tr.odd {
        background-color: $WHITE_BACKGROUND_COLOR;
        td.sorting_1 {
        background-color: $WHITE_BACKGROUND_COLOR;
        }
      }
    }
    .sorting:after {
      @include table-sort-icon("\e148", $LINK_COLOR);
    }
    .sorting_asc:after {
      @include table-sort-icon("\e150", $LINK_COLOR);
    }
    .sorting_desc:after {
      @include table-sort-icon("\e149", $LINK_COLOR);
    }
    .sorting_disabled:after {
      color: $UNCHECKED_SELECTOR_COLOR;
    }
    .sorting, .sorting_asc, .sorting_desc {
      cursor: pointer;
    }
  }
  .striped {
    tr:nth-child(2n) {
      background-color: $WHITE_BACKGROUND_COLOR;
    }
    tr:nth-child(2n-1) {
      background-color: $PRIMARY_BACKGROUND_COLOR;
    }
  }
}

#knockoutTable {
  .table-search {
    position: relative;
    width: 400px;
    input {
      width: 350px;
    }
  }

  .table-info {
    float: right;
    width: auto;
  }

  #searchBusinesses {
    float: left;
    margin-left: 10px;
  }

  table {
    clear: left;

    td {
      padding: 10px;
    }

    .table-choice {
      &.sorting:after, &.sorting_asc:after, &.sorting_desc:after {
        line-height: 23px;
      }
    }
  }

  .loading {
    text-align: center;
  }
}

table {
  .center {
    text-align: middle;
  }
  .right {
    text-align: right;
  }
}

// ********************* Header/Menu *********************
// The styles below are intended for the following html:
// <body>
//    <div id="shared-header">
//        <div class="inner-wrap">
//            <div class="title">
//                <div class="logo-box">
//                    <img src="white-label-logo.png"/>
//                </div>
//                <span class="reputation-icon-colored prod-icon"></span>
//                <span class="prod-name">Product Name</span>
//            </div>
//            <div class="controls">
//                <div class="account-name">
//                    Account Name
//                </div>
//                <div class="back-to-bc">
//                    <a class="back-icon" href="#">Back to Business Center</a>
//                </div>
//            </div>
//        </div>
//    </div>
//
//    <div id="shared-header-menu">
//        <ul class="inner-wrap">
//            <li><a href="#">Dashboard</a></li>
//            <li class="current"><a href="#">Page One</a></li>
//            <li><a href="#">Page Two</a></li>
//        </ul>
//    </div>
// </body>

@mixin header-abstract() {
  background-color: $WHITE_BACKGROUND_COLOR;
  height: $HEADER_HEIGHT;
  overflow: hidden;

  .inner-wrap {
    display: table;
    height: 100%;
    .title {
      display: table-cell;
      vertical-align: middle;
      .logo-box {
        display: table-cell;
        vertical-align: middle;
        height: $LOGO_HEIGHT;
        img {
          max-width: 360px;
          max-height: $LOGO_HEIGHT;
          vertical-align: middle;
        }
        .line {
          display: inline-block;
          width: 0px;
          height: $LOGO_HEIGHT;
          vertical-align: middle;
          margin: 0px 16px 0px 15px;
          border-right: 1px solid $PRIMARY_BORDER_COLOR;
        }
      }
      .prod-icon {
        display: table-cell;
        height: $LOGO_HEIGHT;
        font-size: $LARGE_FONT_SIZE;
        padding: 0px 6px 0px 20px;
        cursor: default;
        vertical-align: middle;
      }
      .prod-name {
        display: table-cell;
        color: $TERTIARY_FONT_COLOR;
        font-size: $DEFAULT_FONT_SIZE;
        letter-spacing: 2px;
        text-transform: uppercase;
        vertical-align: middle;
      }
    }
    .controls {
      display: table-cell;
      max-width: 270px;
      min-width: 200px;
      padding-left: 20px;
      text-align: right;
      font-weight: bold;
      vertical-align: middle;

      div {
        margin-bottom: 5px;
      }

      .account-name {
        font-size: $MEDIUM_FONT_SIZE;
        color: $SECONDARY_FONT_COLOR;
      }

      .back-to-bc {
        a {
          font-size: $DEFAULT_FONT_SIZE;
          &:hover {
            text-decoration: none;
          }
          &:before {
            font-size: $DEFAULT_ICON_SIZE;
          }
        }
      }
    }
  }
}

#shared-header {
  @include header-abstract();
}

.inner-wrap {
  margin: 0 auto;
  @media screen {
    width: $blueprint-container-outer-width
  };
  @media print {
    width: $blueprint-container-size;
  }
}

@mixin header-menu-abstract() {
  height: 40px;
  background-color: $WHITELABEL_COLOR;

  &.no-items {
    height: 10px;
  }

  ul {
    height: 40px;
    overflow: hidden;
    padding: 0;
    display: block;

    li {
      float: left;
      list-style: none;
      height: 30px;
      border-top: 4px solid $WHITELABEL_COLOR;
      padding: 3px 5px;

      a, a[class *= 'icon'] {
        &:before {
          vertical-align: inherit;
        }
        display: block;
        font-size: 14px;
        @media screen {
          text-shadow: 1px 1px 0 $SECONDARY_FONT_COLOR;
        }
        margin: 5px 0;
        padding: 0px 12px;
        color: $WHITE_FONT_COLOR;
        text-decoration: none;
      }
      &:hover {
        background: rgba(0, 0, 0, 0.1);
      }
      &.current {
        background: $WHITE_BACKGROUND_COLOR;
        a {
          color: $PRIMARY_FONT_COLOR;
          font-weight: bold;
          text-shadow: none;
        }
      }
    }
  }

  .action {
    float: right;
    a:hover {
      text-decoration: underline;
    }

    span {
      vertical-align: middle;
      margin-right: 3px;
    }
  }

  .company, .address {
    float: left;
    font-size: 14px;
    @media screen {
      text-shadow: 1px 1px 0 $TERTIARY_BACKGROUND_COLOR;
    }
    margin: 5px 0;
    color: $WHITE_FONT_COLOR;
  }
  .address {
    float: right;
  }
}

#shared-header-menu {
  @include header-menu-abstract();
}

// ********************* Global Classes *********************

.super-container {
  @media screen {
    @include border-radius(0 0 $DEFAULT_BORDER_RADIUS $DEFAULT_BORDER_RADIUS);
    border: 1px solid $PRIMARY_BORDER_COLOR;
    border-top: 0;
    background-color: $WHITE_BACKGROUND_COLOR;
  }
  margin: 0 auto 10px;
  width: $blueprint-container-size;
  padding: 10px;
}

.container {
  width: $blueprint-container-size;
  @include pie-clearfix(); // This clearfix doesn't use overflow: hidden
}

.content-header {
    @include column(12);
}

.breadcrumbs {
    @include column(12);
    margin-bottom: 10px;
}

ol.breadcrumb {
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 10px;

    li {
      display: inline;
    }

    li:before {
      content: "\00BB";
      padding-right: 3px;
    }

    li:first-child:before {
      content: "";
      padding: 0px;
    }
}

.positive-text {
   color: $SUCCESS_COLOR;
}

.negative-text {
   color: $ERROR_COLOR;
}

h1.page-header {
    @include column(6);
    span.header-info {
        margin-left: 10px;
        font-size: 0.5em;
        font-weight: normal;
    }
}

h2.sub-header {
    @include column(6);
    margin: 0 20px 10px 0;
}

.actions {
    font-size: 1.5em;
    @include column(6, last);
    text-align: right;

    .plus {
      color: $LINK_COLOR;
      cursor: pointer;
      @include common-font-icon('\e056\00a0'); // Note: \e056 is the plus icon \00a0 is a non-breaking space.
    }

    a {
        margin-left: 25px;
    }

    [class *= '-icon']:before {
      margin-right: 5px;
      font-size: 18px;
    }
}

.sub-actions {
    @extend .actions;
    font-size: 16px;
    margin-bottom: 10px;

    a {
        margin-left: 10px;
    }

    [class *= '-icon']:before {
      font-size: 16px;
    }
}

// override the font color of the jquery ui daterangepicker plugin
.ui-daterangepicker .ui-widget-content a {
  color: $PRIMARY_FONT_COLOR;
}

// ensure the color picker appears above other elements on the page
.colpick_rgbhex {
  width: 292px;
  z-index: $Z_INDEX_ELEMENT;

  .colpick_hex_field, .colpick_field, .colpick_new_color {
    width: 78px;
  }
}

// ********************* Pure CSS Sub-tabs *********************

// The following styles can be used to render page sub-tabs with no additional js/knockout/etc.
// The following call and macro illustrate their use (this example is taken from SM 'Build Fans' page):
//
// {{ sub_tabs([('account-fans-articles', 'Interesting Content'), ('account-fans-people', 'Influential People'), ('account-fans-offers', 'Coupons and Offers')]) }}
//
//{% macro sub_tabs(page_id, urls) %}
//  <ul id="sub-tabs">
//      {% for url_name, label in urls %}
//          <li {% if url_name == page_id %}class='selected-sub-tab'{% endif %}>
//              <a href='{{ uri_for(url_name) }}')>{{ label }}</a>
//          </li>
//      {% endfor %}
//  </ul>
//{% endmacro %}

// Sub-tab styles are based on the following example code: http://unraveled.com/publications/css_tabs/
// cc Attribution 3.0 Unported: http://creativecommons.org/licenses/by/3.0/
// Joshua Kaufman, unraveled
// 28 January, 2007

#sub-tabs {
  border-bottom: 1px solid $PRIMARY_BORDER_COLOR;
  clear: both;
  font-size: 14px;
  margin: 10px 0 10px 0;
  padding: 4px 0 4px 0;
  text-align: left;
  line-height: 16px;

  ul, li {
    display: inline;
    padding: 0px;


    a {
      border: 1px solid $PRIMARY_BORDER_COLOR;
      border-bottom: 0;
      padding: 4px 15px;
      color: $LINK_COLOR;
      outline: none;
      background-color: $SECONDARY_BACKGROUND_COLOR;
    }

    a:hover {
      color: $LINK_HOVER_COLOR;
      background-color: $TERTIARY_BACKGROUND_COLOR;
      text-decoration: none;
    }
  }

  /* Settings for currently-selected tab */
  li.selected-sub-tab {
    border-bottom: 1px solid $WHITE_BACKGROUND_COLOR;
    font-weight: bold;

    a {
      background-color: $WHITE_BACKGROUND_COLOR;
      color: $SECONDARY_FONT_COLOR;
      padding-top: 4px;
      position: relative;
      top: 1px;
      background-image: none;
    }
  }
}

// ********************* Content Header *********************
#content-header {
  margin-bottom: 20px;
  border-bottom: 1px solid $PRIMARY_BORDER_COLOR;
  box-sizing: border-box;
  .ch-breadcrumbs {
    padding: 10px 0;
    ul {
      padding: 0;
      margin: 0;
    }
    li {
      display: inline-block;
      a, a:visited {
        color: $LINK_COLOR;
        text-decoration: none;
      }
    }
    li.parent:after {
      content: "\00BB";
      padding: 0 3px;
    }
  }
  .header-container {
    min-height: 42px;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    align-items: flex-end;

    .ch-page-title {
      line-height: 32px;
      font-size: $EXTRA_LARGE_FONT_SIZE;
      font-weight: 300;
      padding: 10px 0 0 0;
      margin: 0;
      -webkit-flex: 1;
      -ms-flex: 1;
      flex: 1;

      .tooltip-icon {
        line-height: 16px;
        vertical-align: middle;
      }
    }

    .title-container {
      display: flex;
      align-items: flex-end;
      justify-content: flex-start;

      .title-video-play-button {
        margin: 5px 0 0 5px;
        cursor: pointer;
        color: $BLUE;
        display: inline-block;

        &:hover {
          color: $DARK_BLUE;
        }
      }
    }
    .ch-actions {
      margin: auto 0;
      text-align: right;
      -webkit-flex: 1;
      -ms-flex: 1;
      flex: 1;
      padding-top: 12px;
      a {
        background-color: $BLUE;
        color: $WHITE_FONT_COLOR;
        font-size: $MEDIUM_FONT_SIZE;
        padding: 6px 25px;
        display: inline-block;
        text-decoration: none;
        border: 0;
        @include border-radius($DEFAULT_BORDER_RADIUS);
        &:hover {
          background-color: $DARK_BLUE;
        }
      }
    }
  }
  .ch-page-subtitle {
    margin-top: 5px;
    margin-bottom: 20px;
    font-size: $LARGE_FONT_SIZE;
    font-weight: 300;
  }
}

// ********************* Content Header Sub Tabs *********************
#ch-sub-tabs {
  position: relative;
  clear: both;
  font-size: $MEDIUM_FONT_SIZE;
  margin: 0;
  padding: 4px 0;
  text-align: left;
  ul {
    display: inline;
    padding: 0;
    li { display: inline; }
    a {
      line-height: 30px;
      padding: 8px 15px 10px 15px;
      border-bottom: 0;
      box-sizing: border-box;
      color: $LINK_COLOR;
      outline: 0;
      text-decoration: none;
      position: relative;
      bottom: -2px;
      &:hover {
        color: $LINK_HOVER_COLOR;
        background-color: $PRIMARY_BACKGROUND_COLOR;
      }
    }
  }
  li.selected-sub-tab {
    a {
      line-height: 32px;
      border: 1px solid $PRIMARY_BORDER_COLOR;
      border-top: 2px solid $LINK_COLOR;
      border-bottom: 1px solid $WHITE_BACKGROUND_COLOR;
      background-color: $WHITE_BACKGROUND_COLOR;
      color: $PRIMARY_FONT_COLOR;
      &:hover {
        background-color: $WHITE_BACKGROUND_COLOR;
        color: $PRIMARY_FONT_COLOR;
      }
    }
    .settings-icon {
      line-height: 12px;
    }
  }
}

// ********************* Container w/ shaded heading *********************
.v-box-heading {
    border: 1px solid $PRIMARY_BORDER_COLOR;
    margin-bottom: 15px;
    @include box-sizing(border-box);

    >h1, >h2, >h3, >h4 {
        padding: 10px;
        background-color: $SECONDARY_BACKGROUND_COLOR;
        margin: 0px;
        border-bottom: 1px solid $PRIMARY_BORDER_COLOR;
    }

  &.expandable {
    border-bottom: none;
    >h1, >h2, >h3, >h4 {
      @include user-select(none);
      @include common-clickable-font-icon('\e039');
      &:before {
        font-size: inherit;
        line-height: inherit;
        padding-right: 5px;
      }
      display: block;
    }
    &>div {
      display: none;
    }
    &.open {
      border-bottom: 1px solid $PRIMARY_BORDER_COLOR;
      >h1, >h2, >h3, >h4 {
        &:before {
          content: '\e041';
        }
      }
      &>div {
        display: block
      }
    }
  }
}

// ********************* Action Tabs *********************
.action-tabs {
    display: table;
    table-layout: fixed;
    width: 100%;
    padding: 0px;
    margin: 0px;

    .action-tab {
        display: table-cell;
        padding: 7px;

        a {
            padding: 9px;
            display: block;
            width: 100%;
            outline: none;
            font-size: 14px;
            font-family: arial;
            text-decoration: none;
            text-align: center;
            @include box-sizing(border-box);

            span {
                display: block;
                font-size: 50px;
            }
        }

        &.selected a {
            @include border-radius($DEFAULT_BORDER_RADIUS);
            background-color: $PRIMARY_BACKGROUND_COLOR;
        }

        &:active, &.selected a {
            color: $LINK_HOVER_COLOR;
        }
    }
}

// ********************* Filter Menu *********************
.v-filter {
    @extend .v-box-heading;
    @include column(4);
    @include box-sizing(border-box);

    .filter-options {
        float: right;
        font-size: $DEFAULT_FONT_SIZE;
        font-weight: normal;
        margin: 5px 0px;
        color: $TERTIARY_FONT_COLOR;

        a {
            margin-left: 6px;
            text-decoration: none;
        }

        a:first-child {
            margin-left: 0px;
            margin-right: 6px;
        }
    }

    h3 {
        margin: 0px;
        padding: 7px;
        font-size: $MEDIUM_FONT_SIZE;
        background-color: $PRIMARY_BACKGROUND_COLOR;
        line-height: 16px;

        span {
            margin-right: 6px;
        }
    }

    ul {
        margin: 0px;
        padding: 5px 10px;
        li {
            color: $SECONDARY_FONT_COLOR;
            list-style: none;
            padding: 5px 0px;

            input, .filter-item-right {
                float: right;
            }
        }
    }
}

// ********************* Social Connect Buttons *********************
@import "social-connect/*.png";
@include all-social-connect-sprites;

.social-connect-facebook, .social-connect-twitter, .social-connect-googleplus, .social-connect-linkedin {
  display: inline-block;
  // just use facebook height/width since these buttons are all the same size
  height: social-connect-sprite-height(facebook);
  width: social-connect-sprite-width(facebook);
}

.v-label {
  min-width: 85px;
  @include box-sizing(border-box);
  height: 20px;
  display: inline-block;
  float: left;
  margin: 0 5px 5px 0;
  border-radius: $DEFAULT_BORDER_RADIUS;
  border: 1px solid $PRIMARY_BORDER_COLOR;
  background-color: $PRIMARY_BACKGROUND_COLOR;
  font-size: 11px;
  font-weight: bold;
  color: $SECONDARY_FONT_COLOR;
  padding: 1px;
  span {
    line-height: 16px;
    float: left;
    margin: 0 5px;
  }
  .source-icon {
    margin: 0;
  }
  .delete-icon {
    line-height: 16px;
    height: 16px;
    float: right;
  }
}

@import "partials/forms";
@import "partials/dialogs";
@import "partials/gritter";
@import "partials/alert";
@import "partials/404";
@import "partials/reports";
@import "partials/hopscotch";
@import "partials/floating-dropdown";
@import "partials/feed";
@import "partials/fixed-footer";
@import "partials/googleplacessearch";

@import "overrides/_sweetalerts.scss";
