@charset "UTF-8";
@import "../../../../../../lib/craftcms-sass/mixins";

$fldBgColor: $white;
$fldChalkColor: $blue900;
$fldGuideColor: #f4f3fb;

.fieldlayoutform,
.fld-tab,
.fld-field {
  color: $fldChalkColor;
}

.fieldlayoutform {
  padding: 24px;
  background-image: url(../images/fieldlayoutform-bg.png);

  body.ltr & {
    background-position: 25px 24px;
  }

  body.rtl & {
    background-position: calc(100% - 24px) 24px;
  }

  &:after {
    @include clearafter;
  }

  h2 {
    margin: 3px 0 27px !important;
    font-size: 20px;
    line-height: 30px;
    font-weight: normal;
    text-decoration: underline;
    color: $fldChalkColor;
    margin-bottom: 30px;
  }

  .instructions {
    margin: -30px 0 30px;
    line-height: 30px;
  }

  .fld-tabs {
    @include margin(0, 0, 29px, -30px);
  }

  .unusedfields {
    @include margin(30px, 0, -30px, -30px);
  }

  .fld-tabs:after,
  .unusedfields:after {
    @include clearafter;
  }

  .newtabbtn-container {
    @include margin(0, 0, 60px, 0);
    display: flex;
    flex-direction: row;

    .btn.add {
      border: 1px solid $fldChalkColor;
      padding: 5px 10px;
      height: 31px;
      color: $fldChalkColor;
      background: transparent;
      box-shadow: none;

      &:before {
        margin-top: -2px;
      }
    }

    h3 {
      //flex: 1 0 0;
      @include margin(0, 0, 0, 30px);
      line-height: 30px;
    }
  }
}

.fld-tab {
  @include floatleft;
  @include margin(0, -1px, 30px, 30px);
  width: 211px;
}

.fld-tab .tabs .tab,
.fld-tab .fld-tabcontent,
.fld-field {
  border: 1px solid $fldChalkColor;
}

.fld-tab .icon,
.fld-field .icon {
  @include margin-left(5px);
}

.fld-tab .icon:before,
.fld-field .icon:before {
  margin-top: -2px;
  font-size: 16px;
  color: $fldChalkColor;
  opacity: 0.5;
}

.fld-tab .icon:hover:before,
.fld-tab .icon.active:before,
.fld-field .icon:hover:before,
.fld-field .icon.active:before {
  opacity: 1;
}

.fld-tab .menubtn,
.fld-field .menubtn {
  padding: 0;
}

.fld-tab .menubtn:after,
.fld-field .menubtn:after {
  display: none;
}

.fld-tab .tabs {
  padding: 0 10px;

  &:after {
    @include clearafter;
  }

  .tab {
    @include floatleft;
    margin: -1px 0;
    padding: 5px 12px 4px;
    border-bottom-color: $fldGuideColor;
    color: $fldChalkColor;

    &.draggable {
      cursor: move;
    }
  }
}

.fld-tab .fld-tabcontent {
  padding: 13px;
}

.fld-tab-caboose {
  min-height: 31px;
}

.fld-field {
  padding: 6px 8px 3px;
  cursor: move;

  & + .fld-field {
    margin-top: 7px;
  }

  &.fld-required span:after {
    @include icon;
    @include margin(-2px, 0, 0, 5px);
    color: $fldChalkColor;
    content: 'asterisk';
    font-size: 8px;
  }

  .icon {
    @include floatright;
  }
}

.fld-tab.unused .tabs .tab,
.fld-tab.unused .fld-tabcontent,
.fld-field.unused {
  border-style: dashed;
}

.fld-tab.unused .tabs .tab {
  border-bottom-style: solid;
}

.fld-tab.fld-insertion .tabs .tab,
.fld-tab.fld-insertion .fld-tabcontent,
.fld-field.fld-insertion {
  border-style: dashed;
}

.fld-tab.fld-insertion .tabs .tab {
  border-bottom-style: solid;
}

.fld-tab.draghelper .tabs {
  margin: -5px 0 -1px;
  padding-top: 5px;
  padding-bottom: 1px;
  overflow: hidden;
}

.fld-tab.draghelper .tabs .tab,
.fld-tab.draghelper .fld-tabcontent,
.fld-field.draghelper {
  background: $white;
  @include shadow;
}

.fld-tab.draghelper .tabs .tab {
  border-bottom-color: $white;
}

/* retina */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx) {
  .fieldlayoutform {
    background-image: url(../images/fieldlayoutform-bg_2x.png);
    background-size: 30px 30px;
  }
}
