@import "mixins";
@import "chosen";
@import "jquery-ui";

.wrap {

}

.options-panel {
  background-color: #fff;
  overflow: hidden;
  .box-shadow(0 0 10px rgba(51, 51, 51, .5));

  * {
    box-sizing: border-box;
  }

  .panel-header {
    background-color: #222;
    padding: 20px 20px;
    #gradient > .vertical(#555, #444);
    .box-shadow(0 0 10px rgba(51, 51, 51, .5));

    h2 {
      margin: 0;
      padding: 0;
      line-height: 35px;
      color: #fff;
    }
    .section-description {
      color: #999;
      font-style: italic;
      line-height: 15px;
      margin: 0;
      padding: 0 0 0 25px;
    }
  }
  .sections-section {
    position: relative;
    background: #ddd;
    display: table;
    width: 100%;

    .sections-list {
      width: 200px;
      display: table-cell;
      vertical-align: top;

      ul {
        list-style: none;
        margin: 10px 0;

        li {
          @arrowWidth: 8px;
          @itemHeight: 50px;
          @itemActiveBg: #666666; //#F14F4F;

          display: block;

          width: 100%;
          height: @itemHeight;
          padding: 0;

          margin: 0;
          position: relative;

          a {
            padding: 15px;
            display: block;
            height: 100%;
            color: @itemActiveBg;
            text-decoration: none;
            font-weight: bold;

            &.active {
              background: @itemActiveBg;
              color: #DDDDDD;

              &:after {
                content: '';
                position: absolute;
                width: 0;
                height: 0;
                top: 0;
                left: 100%;
                border-top: (@itemHeight / 2) solid transparent;
                border-bottom: (@itemHeight / 2) solid transparent;
                border-right: (@itemHeight / 2) solid transparent;
                border-left: @arrowWidth solid @itemActiveBg;

              }
            }
          }

        }
      }
    }
    .sections-body {
      background: #fff;
      display: table-cell;

      .one-section-body {
        display: none;
        padding: 20px 20px 60px 20px;
        &.active {
          display: block;
        }
      }
      table.form-table {
        th {
          h3 {
            margin: 0;
          }
        }
      }
    }
    .submit {
      position: absolute;
      &.bottom {
        bottom: 0;
        right: 0;
        padding: 20px;
        margin: 0;
        border-radius: 5px;
        background: #ddd;

        //				input[type=submit], button {
        //					&.submit
        //				}
      }
    }
  }
}

.atf-fields {
  * {
    box-sizing: border-box;
  }
  .inline-block {
    display: inline-block;
  }
  .customize-control-content, .editor-wrap, .wp-switch-editor {
    &, * {
      box-sizing: content-box;
    }
  }
  select {
    width: 25em;
    max-width: 100%;
  }
  .check-buttons {
    label {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 2px;
      background: #f7f7f7;
      text-shadow: none;
      font-weight: 600;
      font-size: 13px;
      border: 1px solid #ccc;

      &:hover {
        background: #eee;
      }
      span {
        display: block;
      }
    }
    input {
      display: none;
      &:checked + label {
        border-color: #008EC2;
        background: #00a0d2;
        color: #fff;
      }
    }
    img {
      display: block;
    }
  }
  .radio-image {
    label {
      display: block;
      padding: 5px;
      text-align: center;
      float: left;
      border: 1px solid transparent;

      &.checked {
        background: #eee;
        border: 1px solid #FDADAD;
      }
      &:hover {
        background: #eee;
      }
      span {
        display: block;
      }
    }
    input[type='radio'] {
      display: none;
    }

    img {
      border: 5px solid #eee;
    }
  }
  .tumbler-container {
    @height: 30px;
    @width: 60px;
    @margin: 2px;
    @diameter: (@height - ( @margin * 2 ) );
    input {
      display: none;

      &:checked + .on-off-box {
        background-color: #6AA772;
        .transition(background-color 2s ease);
        .tumbler {
          left: ( @width - @margin - @diameter);
          .transition(left 1s ease);
        }
        .text {
          &.on {
            opacity: 1;
          }
          &.off {
            opacity: 0;
          }
        }
      }
    }

    .on-off-box {
      display: inline-block;
      position: relative;
      height: @height;
      width: @width;
      border-radius: (@height / 2);
      background-color: #FF6347;
      vertical-align: middle;
      .transition(background-color 2s ease);

      .tumbler {
        display: block;
        position: absolute;
        left: @margin;
        top: @margin;
        background-color: #fff;
        height: @diameter;
        width: @diameter;
        border-radius: 50%;
        .transition(left 1s ease);
      }
      .text {
        display: block;
        position: absolute;
        color: #fff;
        width: (@width - @diameter - (@margin * 2));
        height: (@height - (@margin * 2));
        line-height: (@height - (@margin * 2));
        top: @margin;
        text-align: center;
        .transition(opacity 2s ease);

        &.on {
          left: @margin;
          opacity: 0;
        }
        &.off {
          right: @margin;
          opacity: 1;
        }
      }
    }
  }

  .google-webfonts {
    .demotext {
      padding: 25px;
      margin: 20px 0;
      background: #eeeeee;
    }
  }

  .uploader {
    .atf-preview {
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 0 15px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .05);
      -webkit-box-shadow: inset 0 0 15px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .05);
      background: #eeeeee;
      &:after {
        content: '';
        display: block;
        padding-top: 100%;
      }
      img {
        position: absolute;
        top: 50%;
        left: 50%;
        max-height: 100%;
        -webkit-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        transform: translate(-50%,-50%);
      }
    }
    .atf-options-upload-screenshot {
      box-shadow: inset 0 0 15px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .05);
      -webkit-box-shadow: inset 0 0 15px rgba(0, 0, 0, .1), inset 0 0 0 1px rgba(0, 0, 0, .05);
      background: #eeeeee;
    }
  }
  .group-container {
    padding: 0;
  }
  table.atf-options-group {
    background: #ffffff;
    padding: 0;
    th {
      padding: 10px;
      text-align: center;
      width: auto;
    }
    .group-row-id {
      width: 30px;
      text-align: center;
      background: #eee;
      cursor: move;
    }
    th, td {
      border: 1px solid #ddd;
      vertical-align: top;
    }
    .row {
      .atf-options-upload-screenshot {
        max-height: 150px;
      }
    }
    .group-row-controls {
      background: #eee;
      padding: 2px;
      width: 40px;
    }
    .btn-control-group {
      border: 1px solid #ddd;
      display: inline-block;
      background: #fff;
      padding: 6px 10px;
      width: 32px;
      height: 32px;
      text-align: center;
      border-radius: 50%;
      text-decoration: none;
      font-weight: 100;
      margin: 2px;
      &.minus {
        background: #ff6347;
        color: #ffffff;
        border-color: #ffffff;
      }
    }
    &.vertical {
      width: 100%;
      thead, tfoot {
        display: none;
      }
      tr {
        display: block;
        border: 1px solid #ddd;
        margin: 0;
        padding: 0 0 0 40px;
        position: relative;
        & + tr {
          border-top: none;
        }
        .group-row-id, .group-row-controls {
          margin: 0;
        }
        .group-row-id {
          position: absolute;
          left: 0;
          top: 0;
          bottom: 0;
          width: 40px;
        }
        .group-row-controls {
          text-align: center;
          padding: 0 10px 10px;
          background: transparent;
        }
        th, td {
          display: block;
          padding: 10px;
          width: 100%;
          border: none;
          margin: 0;

          select, .regular-text {
            width: 100%
          }

        }
        td {
          &:before {
            content: attr(data-label);
            font-weight: bold;
          }
        }
      }
    }
  }
  div.atf-options-group {
    background: #f1f1f1;

    @padding: 10px;

    padding: @padding;
    border-radius: 2px;
    .row {
      border: 1px solid #d9d9d9;
      padding: @padding;
      margin: 0 0 @padding 0;
      box-shadow: 0 1px 1px rgba(0,0,0,.04);
      background: #fff;
    }
    .header {
      border-bottom:  1px solid #d9d9d9;
      margin: -@padding -@padding @padding -@padding;
      padding: @padding;

      line-height: 1.3;
      font-weight: 600;
    }
    .group-row-id {
      display: inline-block;
      padding: 3px;
      border: 1px solid #ddd;
      border-radius: 50%;
      width: 26px;
      height: 26px;
      text-align: center;
      margin: -3px 0;
    }
    .group-row-controls {
      margin: @padding -@padding -@padding -@padding;
      padding: @padding;
      clear: both;
      border-top: 1px solid #ddd;
      background: #f5f5f5;
      text-align: right;

      .minus {
        color: #a00;
        text-decoration: none;
        border: none;
        line-height: 28px;
        font-size: 13px;
        vertical-align: middle;
        text-align: left;
        float: left;
        &:hover {
          color: red;
        }
      }
    }
  }

  .upload-field {
    ul {
      margin: 0;
    }
    .dashicons {

      vertical-align: middle;
      &.dashicons-media-default {
        height: 40px;
        width: 40px;
        font-size: 40px;
        line-height: 40px;
      }
      &.dashicons-dashicons-dismiss {
        height: 15px;
        width: 15px;
        font-size: 15px;
        line-height: 15px;


      }
    }
    label {
      position: relative;
      input {
        position: absolute;
        top: -50px;
        width: 0;
        height: 0;
        visibility: hidden;
      }
    }

  }

  &.form-table {
    #side-sortables & {
      width: 100%;
      tr {
        display: block;
        th, td {
          display: block;
          padding: 10px 0;
          width: 100%;

          select, .regular-text {
            width: 100%
          }
        }
      }
    }
  }
}

