.kcf-app-mount {
  min-height: 700px;

  * {
    box-sizing: border-box;
  }
}

.kcf__logo {
  display: block;
  text-align: center;

  .kcf__logo-inner {
    display: inline-block;
    margin: 0 auto 2em;
    text-align: left;

    .kcf-logo-chili {
      margin-bottom: 0.2em;
    }
  }
}

.kcf-app-header__logo {
  width: 116px;
  height: 30px;
  background-image: url(../../img/logo-chili-header.png);
  background-repeat: no-repeat;
  display: inline-block;
  background-size: contain;
  margin: 2px 0 0 10px;
}

.kcf-app-loader__logo {
  width: 160px;
  height: 41px;
  background-image: url(../../img/logo-chili-loader.png);
  background-repeat: no-repeat;
  display: inline-block;
  background-size: contain;
}

.kcf-app-header__logo-link {
  display: inline-block;
}

.kcf-app-header {
  display: block;
  width: calc(100% + 20px);
  background: white;
  height: 78px;
  padding: 20px 0 18px;
  position: relative;
  top: 0;
  right: 0;
  margin: 0;
  left: -20px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.12);
}

.app-main-content {
  position: relative;
  min-height: 500px;
  padding-right: 20px;
  padding-top: 80px;

  a {
    text-decoration: none;
  }
}

.styled-link,
.kcf-styled-link {
  text-decoration: none;
  outline: none;
  color: inherit;

  &:visited,
  &:active,
  &:hover,
  &:focus {
    text-decoration: none;
    outline: none;
  }

  &:focus {
    box-shadow: none;
  }
}

.kcf-button-danger,
.wp-core-ui .button-primary.kcf-button-danger,
.kcf-btn.kcf-button-danger {
  background: #d9534f;
  color: white;
}

.kcf-button-success,
.wp-core-ui .button-primary.kcf-button-success,
.kcf-btn.kcf-button-success {
  background: #5cb85c;
  color: #fff;
}

.kcf-button-primary,
.wp-core-ui .button-primary.kcf-button-primary,
.kcf-btn.kcf-button-primary {
  background: #337ab7;
  color: #fff;
}

/**
 * Popup
 */

.kcf-popup__inner {
  padding: 1em;
}

.kcf_popup__footer {
  padding: 0.5em;
  text-align: right;

  .kcf-btn {
    margin-left: 0.5em;
  }
}

.kcf_popup__header {
  position: relative;
}

.kcf-popup__close-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
}

/**
 * Loader
 */

.loader-fullwidth {
  min-width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
}

.loader-fullwidth__inner {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  font-size: 1.3em;
  font-style: italic;
  color: #aaa;
}

/**
 * App header
 */

.kcf-app-header__name {
  display: inline-block;
  font-size: 2em;
  letter-spacing: -2px;
  font-weight: 600;
}

.kcf-app-header__version {
  font-size: 0.8em;
  color: #777;
  margin: 0 1em 0 0.3em;
  position: relative;
  vertical-align: baseline;
  display: inline-block;
  top: 2px;
}

.kcf-app-header-content {
  display: table-row;
  vertical-align: top;
  position: relative;
}

.kcf-app-header__item {
  display: table-cell;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0 1em;

  &.kcf-item-fullwidth {
    width: 100%;
    text-align: center;
  }

  &:first-child {
    padding-left: 20px;
  }

  &:last-child {
    padding-right: 20px;
  }
}

.kcf-form-name-value {
  font-weight: 700;
  font-size: 1.2em;
  padding-right: 1em;
}

.kcf-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
}

.kcf-popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.kcf-popup__content {
  position: absolute;
  margin: auto;
  top: 10%;
  max-height: 80%;
  width: 300px;
  left: 0;
  right: 0;
  background: #fff;
}

/**
 * Toggle
 */

.kcf-toggle__option {
  cursor: pointer;
  position: relative;
  padding: 0 8px;
  height: 28px;
  line-height: 28px;
  min-width: 82px;
  vertical-align: middle;
  display: inline-block;
  text-align: center;
  color: #fff;
  border-radius: 16px;
  box-shadow: inset 1px 1px 1px rgba(0,0,0,0.2);

  &:after {
    content: "";
    display: inline-block;
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 8px;
    vertical-align: top;
    margin: auto;
    top: 0;
    bottom: 0;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.2);
  }

  &.kcf-toggle__on {
    background: $chili-green;
    padding-right: 26px;

    &:after {
      right: 5px;
    }

    .kcf-toggle-state--off & {
      display: none;
    }
  }

  &.kcf-toggle__off {
    background: $chili-red;
    padding-left: 26px;

    &:after {
      left: 5px;
    }

    .kcf-toggle-state--on & {
      display: none;
    }
  }
}

.kcf-first-action-block {
  text-align: center;
  padding: 2em;
  background: #fff;
}

.kcf-segmented {
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  background: #eee;
  box-shadow: 1px 1px 1px rgba(0,0,0,0.08);
}

.kcf-segmented__item {
  display: inline-block;
  text-decoration: none;
  outline: none;
  padding: 0.5em 1em;
  border-right: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;

  &:last-child {
    border: none;
  }

  &.active {
    background: $chili-green;
    color: white;
  }
}

/**
 * TabView
 */

.kcf-tabview__container:after {
  content: '';
  display: table;
  clear: both;
}

.kcf-tabview__item {
  cursor: pointer;
  padding: 0.8em 1.2em;
  background: #F2F2F2;
  border-bottom: 1px solid rgba(0,0,0,0.1);


  &.active {
    background: $chili-green;
    color: white;
  }

  &:first-child {
    border-top-left-radius: 10px;
  }
}

.kcf-tabview__tabs {
  position: relative;
  float: left;
  margin-right: 20px;
  padding-top: 120px;
  padding-bottom: 220px;
  width: 150px;

  &:after {
    content: '';
    display: block;
    position: absolute;
    height: 9999px;
    width: 1px;
    right: 0;
    top: 0;
    background: rgba(0,0,0,0.1);
  }
}

.kcf-tabview__content {
  margin-left: 170px;
  padding: 2em 0;
}

/**
 * Controls
 */

.kcf-form-settings {
  textarea {
    min-width: 500px;
    min-height: 160px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0.5em;
    border-radius: 5px;
  }

  input[type="text"] {
    min-width: 300px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0.5em;
    border-radius: 5px;
  }

  label {
    display: block;
    margin-bottom: 0.5em;
    font-style: italic;
  }
}

.kcf-form-settings__setting-description {
  color: #999;
  margin-top: 0.3em;
}

.kcf-setting--inline-label label {
  display: inline-block;
  margin-right: 1em;
}

.kcf-field-options {
  textarea {
    width: 100%;
    min-height: 100px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0.5em;
    border-radius: 5px;
  }

  input[type="text"] {
    width: 100%;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0.5em;
    border-radius: 5px;
  }

  label {
    display: block;
    margin-bottom: 0.5em;
    font-style: italic;
  }
}

.kcf-app-header__item {
  input[type="text"] {
    min-width: 80px;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0.5em;
    border-radius: 5px;
  }
}

.kcf-action-link {
  margin: 0 1em;
  font-size: 1.1em;
  text-decoration: none;
  display: inline-block;
  position: relative;
  color: $link;
  outline: none!important;

  &:after {
    content: '';
    position: absolute;
    bottom: -0.25em;
    left: 0;
    width: 100%;
    display: block;
    border-bottom: 1px dashed rgb(0, 113, 188);
  }
}

/**
 * ColorPicker
 */

.kcf-color__preview {
  display: inline-block;
  padding: 3px;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  box-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.kcf-color__color-box {
  display: inline-block;
  width: 38px;
  vertical-align: middle;
  height: 22px;
  border-radius: 4px;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.kcf-color__control-wrap {
  display: none;
  position: relative;
  z-index: 10;

  .kcf-color.open & {
    display: block;
  }
}

/**
 * Request overlay
 */

.kcf-request-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255, 0.3);
  z-index: 99999;

  &.is-on {
    display: block;
  }
}