//
// Field: Text
//
.codevz-field-text{

  input{
    width: 340px;
    max-width: 100%;
  }
}

//
// Field: Textarea
//
.codevz-field-textarea{

  textarea{
    width: 100%;
    max-width: 100%;
    min-height: 125px;
  }

  .codevz-shortcode-button{
    margin-bottom: 10px;
  }
}

//
// Field: Wysiwyg
//
.codevz-field-wysiwyg{

  textarea{
    width: 100%;
    max-width: 100%;
    min-height: 125px;
  }

  .wp-editor-container{
    clear: none;
  }
}

//
// Field: Number
//
.codevz-field-number{

  input{
    width: 70px;
  }

  em{
    margin-left: 5px;
    color: #bbb;
  }
}

//
// Field: Select
//
.codevz-field-select{

  select{
    max-width: 100%;
  }
}

//
// Field: Typography
//
.codevz-field-typography{

  select,
  .chosen-container{
    margin-right: 5px;
  }

  .codevz-typo-weight{
    min-width: 90px;
  }
}

//
// Field: Checkbox and Radio
//
.codevz-field-checkbox,
.codevz-field-radio{

  ul{
    margin: 0;
    padding: 0;
    list-style-type: none;
    overflow-y: auto;
    max-height: 305px;
  }

  .horizontal li{
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 15px;
  }

  input[type="radio"]:checked:before{
    line-height: 10px;
  }
}

//
// Field: Switcher
//
.codevz-field-switcher{

  label{
    display: block;
    float: left;
    cursor: pointer;
    position: relative;
    width: 62px;
    height: 26px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    @include border-radius(20px);

    span{
      position: absolute;
      top: 4px;
      left: 4px;
      width: 18px;
      height: 18px;
      background-color: #fff;
      @include border-radius(16px);
      @include transition(left 0.15s ease-out);
    }

    input{
      position: absolute;
      top: 0;
      left: 0;
      opacity: 0;

      &:checked ~ em{
        background: #4fb845;
      }

      &:checked ~ em:before{
        opacity: 0;
      }

      &:checked ~ em:after{
        opacity: 1;
      }

      &:checked ~ span{
        left: 40px;
      }
    }

    em{
      position: relative;
      display: block;
      height: inherit;
      font-size: 11px;
      line-height: 26px;
      font-weight: 500;
      font-style: normal;
      text-transform: uppercase;
      color: #fff;
      background-color: #ed6f6f;
      @include transition(background 0.15s ease-out);
    }

    em:before, em:after{
      position: absolute;
      @include transition(opacity 0.15s ease-out);
    }

    em:before{
      content: attr(data-off);
      right: 14px;
    }

    em:after{
      content: attr(data-on);
      left: 14px;
      opacity: 0;
    }
  }

  .codevz-text-desc{
    float: left;
    margin-left: 5px;
    margin-top: 0;
    padding-top: 4px;
  }
}

//
// Field: Image Select
//
.codevz-field-image_select{

  label{
    display: inline-block;
    margin: 5px;

    img{
      max-width: 100%;
      vertical-align: bottom;
      background-color: #fff;
      border: 2px solid #eee;
      @include opacity(0.75);
      @include transition(all 0.15s ease-out);
    }
  }

  input{
    display: none;

    &:checked ~ img{
      border-color: #333;
      @include opacity(1);
    }
  }
}

//
// Field: Upload
//
.codevz-field-upload{

  input{
    width: 100%;
  }

  .codevz-button{
    margin-left: 10px;
  }
}

//
// Field: Background
//
.codevz-field-background{

  .codevz-field-color_picker{
    position: relative;
    top: 10px;
  }

  .codevz-pseudo-field{
    border: 0 !important;
  }

  .codevz-button{
    margin-left: 10px;
  }
}

//
// Field: Color Picker
//
.codevz-field-color_picker{

  .codevz-alpha-wrap{
    display: none;
    position: relative;
    top: -1px;
    width: 235px;
    padding: 9px 10px;
    border: 1px solid #dfdfdf;
    border-top: none;
    background-color: #fff;
  }

  .codevz-alpha-slider{
    position: absolute;
    width: 190px;
    margin-left: 2px;
    height: 18px;

    .ui-slider-handle{
      position: absolute;
      top: -3px;
      bottom: -3px;
      z-index: 5;
      border-color: #aaa;
      border-style: solid;
      border-width: 4px 3px;
      width: 10px;
      height: 16px;
      margin: 0 -5px;
      background: none;
      cursor: ew-resize;
      @include opacity(0.9);
      @include border-radius(4px);
      @include box-shadow(0 1px 2px rgba(black, 0.2));

      &:before{
        content: " ";
        position: absolute;
        left: -2px;
        right: -2px;
        top: -3px;
        bottom: -3px;
        border: 2px solid #fff;
        @include border-radius(3px);
      }
    }
  }

  .codevz-alpha-slider-offset{
    height: 18px;
    width: 200px;
    background: url(../images/checkerboard.png) repeat-y center left scroll #fff;
    @include box-shadow(0 0 5px rgba(black, 0.4) inset);
    @include border-radius(2px);
  }

  .codevz-alpha-text{
    position: absolute;
    top: 12px;
    right: 10px;
    width: 30px;
    font-size: 12px;
    line-height: 12px;
    text-align: center;
    color: #999;
  }
}

//
// Field: Backup
//
.codevz-field-backup{
  textarea{
    width: 100%;
    min-height: 200px;
    margin-bottom: 5px;
  }

  small{
    display: inline-block;
    margin: 5px;
  }

  hr{
    margin: 20px 0;
    border: none;
    border-bottom: 1px solid #e5e5e5;
  }
}


//
// Field: Fieldset
//
.codevz-field-fieldset{
  .codevz-inner{
    border: 1px solid #eee;
    background-color: #fff;
  }

  .codevz-field{
    padding: 20px;
  }
}

//
// Field: Group
//
.codevz-field-group{

  .codevz-field{
    padding: 20px;
  }

  .codevz-cloneable-wrapper{
    position: relative;
  }

  .codevz-cloneable-item{
    display: none;
    position: relative;
    margin-bottom: 5px;

    h4{
      font-size: 1em;
    }
  }

  .ui-accordion .codevz-cloneable-item{
    display: block;
  }

  .codevz-cloneable-content{
    border: 1px solid #e5e5e5;
    background: #fff;
  }

  .codevz-cloneable-title{
    display: block;
    cursor: pointer;
    position: relative;
    margin: 0;
    padding: 15px 65px 15px 10px;
    min-height: 0;
    font-size: 100%;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    @include transition(border-color 0.15s);

    &:active,
    &:hover,
    &:focus{
      border: 1px solid #bbb;
      background: #fafafa;
      outline: none;
    }
  }

  .codevz-cloneable-helper{
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 1;
    font-size: 14px;
    line-height: 1em;

    .codevz-cloneable-clone,
    .codevz-cloneable-remove{
      display: inline-block;
      cursor: pointer;
      color: #555;
      padding: 5px;

      &:hover{
        @include opacity(0.5);
      }
    }

    .codevz-cloneable-pending{
      color: #fcb000;
      padding: 5px;
      display: none;
    }
  }

  .codevz-cloned{
    .codevz-cloneable-pending{
      display: inline-block;
    }
  }

  .codevz-cloneable-content{
    padding: 0;
    border-top: 0;
  }

  .codevz-cloneable-data{
    display: none;
    margin-bottom: 5px;
    padding: 10px 20px;
    color: #a94442;
    border: 1px solid #ebccd1;
    background-color: #f2dede;
  }

  .widget-placeholder{
    margin-bottom: 10px;
    border: 1px dashed #f1c40f;
    background-color: #fffae4;
  }

  .codevz-cloneable-header-icon{
    font-size: 14px;
    width: 17px;
    text-align: center;
    color: #aaa;
  }
}

//
// Field: Repeater
//
.codevz-field-repeater{

  .codevz-field{
    padding: 10px;
  }

  .codevz-cloneable-hidden{
    display: none;
  }

  .codevz-cloneable-wrapper{

    .codevz-cloneable-item{
      display: table;
      width: 100%;
      margin-bottom: 5px;
      border: 1px solid #eee;

      h4{
        font-size: 1em;
      }
    }
  }

  .codevz-cloneable-content{
    width: 100%;
    display: table-cell;
    vertical-align: middle;
    background-color: #fff;
  }

  .codevz-cloneable-helper{
    width: 100%;
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
    line-height: 1em;
    border-left: 1px solid #eee;
    background-color: #f7f7f7;

    i{
      display: inline-block;
      cursor: pointer;
      color: #555;
      padding: 5px;

      &:hover{
        @include opacity(0.5);
      }
    }
  }

  .codevz-cloneable-helper-inner{
    width: 75px;
  }

  .codevz-cloneable-data{
    display: none;
    margin-bottom: 5px;
    padding: 10px 20px;
    color: #a94442;
    border: 1px solid #ebccd1;
    background-color: #f2dede;
  }

  .widget-placeholder{
    height: 50px;
    margin-bottom: 3px;
    border: 1px dashed #f1c40f;
    background-color: #fffae4;
  }

  .ui-sortable-helper{
    height: 50px !important;
    overflow: hidden !important;
    border-color: #ccc !important;
    background-color: #eee !important;
    @include opacity(0.5);

    .codevz-cloneable-helper,
    .codevz-cloneable-content{
      display: none;
    }
  }
}

//
// Field: Help
//
.codevz-help{
  cursor: help;
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px;
  font-size: 14px;
  color: #aaa;
}

//
// Field: Heading
//
.codevz-field-heading{
  font-size: 1.5em;
  font-weight: bold;
  color: #23282d;
  background-color: #f5f5f5 !important;
}

//
// Field: Subheading
//
.codevz-field-subheading{
  font-size: 14px;
  font-weight: bold;
  padding-top: 17px;
  padding-bottom: 17px;
  color: #23282d;
  background-color: #f7f7f7 !important;
}

//
// Field: Notice
//
.codevz-field-notice{
  padding: 0 !important;
  border: 0 !important;

  + .codevz-field{
    border-top: 0;
  }

  .codevz-notice{
    font-size: 12px;
    padding: 17px 30px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
  }

  .codevz-success{
    color: #3c763d;
    border-color: #d6e9c6;
    background-color: #dff0d8;
  }

  .codevz-info{
    color: #31708f;
    border-color: #bce8f1;
    background-color: #d9edf7;
  }

  .codevz-warning{
    color: #8a6d3b;
    border-color: #faebcc;
    background-color: #fcf8e3;
  }

  .codevz-danger{
    color: #a94442;
    border-color: #ebccd1;
    background-color: #f2dede;
  }

}

//
// Field: Icon
//
.codevz-field-icon{

  input{
    display: none;
  }

  .button{
    margin-right: 5px;
  }

  .codevz-icon-preview i{
    display: inline-block;
    font-size: 14px;
    width: 30px;
    height: 26px;
    line-height: 26px;
    margin-right: 5px;
    text-align: center;
    vertical-align: top;
    color: #555;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    @include border-radius(3px);
    @include box-shadow(0 1px 0 rgba(black, 0.08));
  }
}

//
// Field: Image
//
.codevz-field-image{

  input{
    display: none;
  }
}

//
// Field: Gallery
//
.codevz-field-gallery{

  input{
    display: none;
  }

  ul{
    margin: 0;
    padding: 0;
    list-style-type: none;

    li{
      display: inline-block;
      position: relative;
      padding: 4px;
      margin: 0 5px 10px 0;
      border: 1px solid #ccc;
      background-color: #f9f9f9;
      @include border-radius(2px);
      @include box-shadow(0 1px 0 rgba(black, 0.08));

      img{
        max-height: 60px;
        display: inline-block;
        vertical-align: middle;
      }
    }
  }

  .button{
    margin-right: 5px;
    margin-bottom: 5px;
  }
}

//
// Field: Sorter
//
.codevz-field-sorter{

  .ui-sortable-placeholder{
    height: 20px;
    border: 1px dashed #f1c40f;
    background-color: #fffae4;
  }

  .codevz-modules{
    float: left;
    width: 50%;
  }

  .codevz-disabled{
    margin-left: 15px;
  }

  .codevz-disabled,
  .codevz-enabled{
    padding: 5px 15px;
    border: 1px dashed #ddd;
    background-color: #fff;
  }

  .codevz-disabled{
    li{
      @include transition(opacity 0.15s);
      @include opacity(0.5);
    }

    .ui-sortable-helper{
      @include opacity(1);
    }
  }

  .codevz-sorter-title{
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 0 0 10px 0;
    text-align: center;
  }

  ul{
    list-style-type: none;
    margin: 0;
    padding: 0;
    min-height: 62px;

    li{
      margin: 10px 0;
      padding: 10px 15px;
      cursor: move;
      font-weight: bold;
      text-align: center;
      border: 1px solid #e5e5e5;
      background-color: #fafafa;
      @include transition(border-color 0.15s);

      &:hover{
        border-color: #bbb;
      }
    }
  }
}

//
// Field: Ace Editor
//
.codevz-field-ace_editor{

  .codevz-ace-editor-wrapper{
    border: 1px solid #eee;
    background-color: #eee;
  }

  .codevz-ace-editor{
    width: 100%;
    height: 400px;
    font-size: 13px;
  }

}


//
// Field: Datepicker
//
.codevz-datepicker-wrapper{

  * {
    float: none;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-weight: normal;
    font-style: normal;
    text-decoration: none;
    border: none;
    background: none;
    @include box-shadow(none);
    @include border-radius(none);
  }

  .ui-datepicker{
    margin-top: 5px;
    width: auto;
    background-color: #fff;
    z-index: 9999999 !important;
    @include box-shadow(0 0 30px rgba(black, 0.15));
  }

  .ui-widget-header,
  .ui-datepicker-header{
    color: #fff;
    background: #00a0d2;
  }

  .ui-datepicker-header .ui-state-hover{
    cursor: pointer;
  }

  .ui-datepicker-title{
    font-size: 14px;
    line-height: 40px;
    text-align: center;
  }

  .ui-datepicker-prev,
  .ui-datepicker-next{
    position: static;
    top: auto;
    left: auto;
    right: auto;
    font-family: "Font Awesome 6 Free";
    font-size: 12px;
    text-align: center;
    width: 41px;
    height: 40px;
    line-height: 40px;
    color: #fff;
    background-color: rgba(white, 0.1);
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .ui-datepicker-next span,
  .ui-datepicker-prev span{
    display: none;
  }

  .ui-datepicker-prev{
    float: left;
  }

  .ui-datepicker-next{
    float: right;
  }

  .ui-datepicker-prev:before{
    content: '\f053';
  }

  .ui-datepicker-next:before{
    content: '\f054';
  }

  .ui-datepicker-prev-hover,
  .ui-datepicker-next-hover{
    opacity: 0.75;
  }

  tbody .ui-datepicker-week-col{
    background-color: #f7f7f7;
  }

  .ui-datepicker-buttonpane{
    padding: 10px;
    text-align: center;
    background-color: #f7f7f7;
  }

  .ui-datepicker-buttonpane button{
    cursor: pointer;
    margin: 0 5px;
    padding: 7px 14px;
    border: 1px solid #eee;
    background-color: #fff;
  }

  select{
    margin: 0 4px;
    color: #fff;
    border: 1px solid rgba(white, 0.5);
  }

  select option{
    color: #555;
  }

  table{
    font-size: 13px;
    border-collapse: collapse;
    width: 100%;
  }

  thead{
    color: #fff;
    background: #32373c;
  }

  th{
    text-align: center;
    padding: 7px;
    border: 1px solid #444;
  }

  td{
    text-align: center;
    border: 1px solid #f4f4f4;
  }

  td.ui-datepicker-other-month{
    border: transparent;
  }

  td .ui-state-default{
    color: #555;
    width: auto;
    display: block;
    padding: 6px 12px;
  }

  td .ui-state-active,
  td .ui-state-hover{
    color: #fff;
    background-color: #0073aa;
  }

  td.ui-state-disabled .ui-state-default{
    opacity: 0.5;
  }
}


//
// Field: Tabbed
//
.codevz-field-tabbed{

  .codevz-tabbed-section{
    border: 1px solid #eee;
    background: #fff;
  }

  .codevz-tabbed-nav{

    .fa{
      padding-right: 5px;
    }

    a{
      display: inline-block;
      padding: 12px 15px;
      margin-top: 1px;
      margin-right: 5px;
      margin-bottom: -1px;
      position: relative;
      text-decoration: none;
      color: #444;
      background-color: #f3f3f3;
      border: 1px solid #eee;
      @include transition(all .2s);

      &:hover{
        background-color: #f9f9f9;
      }

      &.codevz-tabbed-active{
        background-color: #fff;
        border-bottom-color: #fff;
      }

      &:focus{
        @include box-shadow(none);
      }
    }
  }
}

//
// Common
//
.codevz-image-inner{
  display: inline-block;
  position: relative;
  padding: 4px;
  min-width: 44px;
  min-height: 22px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  @include box-shadow(0 1px 0 rgba(black, 0.08));

  img{
    max-height: 90px;
    display: inline-block;
    vertical-align: middle;
  }
}

.codevz-image-remove{
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  background-color: #e14d43;
  @include opacity(0.8);
  @include transition(opacity .2s);

  &:hover{
    @include opacity(1);
  }
}
