@menu-header-color: #00ccb0;
@modal-scrollbar-thumb-bg: #181e3b;
@simple-form-prefix-cls: ~'@{ant-prefix}-simple-form';
@formbuild-primary-color: #4477ee;
@formbuild-bg: white;
@formbuild-border-color: #ccc;
@formbuild-color: #333;
@formbuild-title-bg: #dbdbdb;
@formbuild-border-dark-color: #f0f0f0;
@formbuild-toolbar-bg: #efefef;
@formbuild-control-input-bg: white;
@ant-prefix: ant;
@formbuild-placeholder-color: #e0e0e0;
@formbuild-top-bg: #f0f0f0;

@brand-primary: #108ee9;
@pagebuilder-control-bg-color: #f0f0f0;
@pagebuilder-control-bg: #dbdbdb;
@pagebuilder-control-border-color: #ccc;
@pagebuilder-control-big-title-color: #1a1a1a;
@pagebuilder-control-tab-active-bg: #f0f0f0;
@pagebuilder-control-error-color: #ff3b30;

:root {
  --mdc-theme-primary: #006cff;
  --mdc-theme-secondary: #197aff;
  --mdc-theme-third: #a7b1bd;
  --mdc-theme-component-background: rgba(0, 121, 242, 0.04);
  --mdc-theme-drag-background: rgba(0, 121, 242, 0.08);
  --mdc-theme-drag-error-background: #ee220029;
  --mdc-theme-container-background: #f0f0f0;
  --mdc-theme-block-container-background: #d3f3d32e;
  --mdc-theme-background: #f2f2f2;
  --mdc-theme-on-surface: #000;
  --mdc-theme-text-primary-on-background: rgba(0, 0, 0, 0.87);
  --mdc-theme-text-secondary-on-background: rgba(0, 0, 0, 0.54);
}

html,
body,
#root {
  height: 100%;
}

// fix iframe scroll
#root {
  overflow-y: auto;
}

body {
  font-size: 16px;
  overflow: hidden;
}

.h-128 {
  height: 34rem;
}

.formbuild-btn-opt,
.formbuild-btn-page-opt {
  display: inline-block;
  padding: 0;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;

  button,
  span {
    color: @formbuild-color;
  }

  button {
    padding: 0 6px;
    width: auto;
    display: inline-block !important;
    height: 26px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    background: none;

    &:focus,
    &:hover,
    &:active {
      background: none;
    }

    &:after,
    &::before {
      display: none;
    }

    svg {
      width: 15px !important;
      height: 15px !important;
      color: #646464;
    }

    svg,
    path {
      fill: #646464;
    }
  }

  span {
    vertical-align: 6px;
    font-size: 13px;
    margin-left: 3px;
  }

  &:hover {
    svg,
    span {
      // color: #5a99f9;
      opacity: 0.65;
    }
  }

  &.red {
    span,
    svg,
    path {
      color: #c93925 !important;
      fill: currentColor !important;
    }

    &:hover {
      span,
      svg {
        opacity: 0.65;
      }
    }
  }
}

.formbuild-btn-page-opt {
  padding-top: 9px;
  margin-left: 10px;

  button {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    font-size: 15px;
    padding: 0;
  }

  &:hover {
    svg,
    polygon {
      fill: white !important;
      opacity: 1;
    }

    button {
      background-image: linear-gradient(180deg, #9f9f9f 0%, #666666 100%);
      border: 1px solid #333333;
    }
  }

  + .formbuild-btn-opt {
    margin-left: 10px;
  }
}

.formbuild-btn-opt-default-color {
  display: inline-block;
  padding: 1px 0 0;
  white-space: nowrap;
  margin: 0 1px;
  cursor: pointer;

  // line-height: 1;
  > div {
    height: 22px !important;
    border-radius: 3px;
    border: 1px solid transparent;
    overflow: hidden;
  }

  .@{ant-prefix}-btn {
    border: none;
    background: none !important;

    &:hover,
    &:active,
    &:focus {
      border: none;
      background: none !important;
    }
  }

  button,
  div.button {
    padding: 0 4px;
    width: auto;
    display: inline-block !important;
    height: 22px !important;
    font-size: 15px;
    background-color: transparent;

    &:after,
    &::before {
      display: none;
    }

    svg {
      width: 15px;
      height: 15px;
    }
  }

  &:hover {
    div {
      background: #d2d2d2;
    }
  }

  &.disabled {
    div {
      opacity: 0.3;
    }
  }

  &.disabled:hover {
    div {
      background: none;
    }
  }

  .formbuild-btn-default-color {
    fill: #999 !important;
  }

  .formbuild-btn-action-color {
    fill: #333 !important;
  }
}

.formbuild-btn-opt-default-color.red {
  svg {
    fill: #c93925;
  }
}

.pagebuilder-bar-tab {
  .formbuild-btn-opt-default-color:not(.pagebuilder-bar-opt-active) {
    svg path {
      fill: #828282 !important;
    }
  }
}

//---------------scroll for chrome brower---------------------------------
@scrollbar-width: 6px;
@scrollbar-thumb-border-radius: 3px;
@scrollbar-thumb-bg: #888;
@scrollbar-bg: #888;

::-webkit-scrollbar {
  width: @scrollbar-width;
  height: @scrollbar-width;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 @scrollbar-width rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background-color: @scrollbar-thumb-bg;
  border-radius: @scrollbar-thumb-border-radius;
}

// iframe容器
#pagebuilder-design-area-inner {
  width: 100%;
  height: 100%;
  border: 0;
}

.webiny-pb-page-element-container {
  padding: 0;
  min-width: 60px;
}

.webiny-pb-layout-block,
.webiny-pb-layout-form {
  width: 100%;
}

.webiny-page-dropdown-menu {
  .@{ant-prefix}-menu-vertical {
    box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%);
    border: none;

    > .@{ant-prefix}-menu-item {
      height: auto;

      .@{ant-prefix}-list-item {
        height: auto;

        .@{ant-prefix}-col {
          display: block !important;
        }
      }
    }
  }
}

.webiny-pb-editor-content-preview {
  .@{ant-prefix}-col {
    display: inline-block !important;
    float: none;
    vertical-align: bottom;
    vertical-align: top;
  }

  .@{ant-prefix}-form.@{ant-prefix}-form-horizontal .@{ant-prefix}-form-item.no-label .@{ant-prefix}-form-item-label {
    display: none !important;
  }
  form.@{ant-prefix}-form-horizontal .@{ant-prefix}-form-item-label > label,
  form.@{ant-prefix}-form-horizontal .@{ant-prefix}-form-item-label > label > div {
    width: 100%;
  }

  .@{ant-prefix}-menu-vertical > .@{ant-prefix}-menu-item {
    height: auto;

    .@{ant-prefix}-list-item {
      height: auto;

      .@{ant-prefix}-col {
        display: block !important;
      }
    }
  }

  .@{ant-prefix}-tabs-nav .@{ant-prefix}-tabs-tab {
    margin: 0;
    padding: 0;
  }
  .@{ant-prefix}-tabs.@{ant-prefix}-tabs-card .@{ant-prefix}-tabs-card-bar {
    .@{ant-prefix}-tabs-tab, .@{ant-prefix}-tabs-nav-container, .@{ant-prefix}-tabs-tab-active {
      height: auto;
    }
  }


  .@{ant-prefix}-steps {
    overflow: auto;
  }

  .@{ant-prefix}-steps-item-content {
    .@{ant-prefix}-steps-item-title {
      display: block;
    }
  }

  .@{ant-prefix}-steps-item-container {
    position: relative;
  }
  .@{ant-prefix}-steps-item-container .@{ant-prefix}-steps-item-title {
    position: unset;
  }
  .@{ant-prefix}-radio,
  .@{ant-prefix}-radio-wrapper,
  .@{ant-prefix}-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
  }
}

.webiny-pb-editor-content-preview {
  .readOnly {
    opacity: 0.6;
    cursor: move;
  }

  .readOnlyContainer {
    background: var(--mdc-theme-container-background);
  }
  .@{ant-prefix}-carousel .slick-list .slick-slide {
    pointer-events: auto !important;

    .swiperItemContainer {
      min-height: 170px;
    }
  }

  .placementText {
    position: relative;
    font-size: small;
    font-weight: normal;
    line-height: unset;
    color: #666;
  }

  .ant-collapse-content-box {
    padding: 0 !important;
  }
}

.webiny-pb-layout-form-container,
.webiny-pb-layout-block-container {
  .@{ant-prefix}-form-horizontal .@{ant-prefix}-form-item-control-wrapper {
    flex: 1 1 0;
  }
  .@{ant-prefix}-table-thead > tr > th {
    position: relative;
  }
  .@{ant-prefix}-form .@{ant-prefix}-form-item-label > label {
    padding-right: 12px;
  }
  .@{ant-prefix}-form.ant-form-vertical .@{ant-prefix}-form-item-label > label {
    &.@{ant-prefix}-form-item-required:not(.@{ant-prefix}-form-item-required-mark-optional):before {
      position: absolute;
      right: -4px;
      top: 3px;
    }
  }

  .@{ant-prefix}-table-wrapper {
    ::-webkit-scrollbar {
      width: 9px;
      height: 9px;
    }
  }

  .@{ant-prefix}-row {
    display: flex;
  }

  .@{ant-prefix}-form-item-hidden,
  .@{ant-prefix}-form-item-hidden.@{ant-prefix}-row {
    display: none;
  }

  div.@{ant-prefix}-row {
    overflow: visible;
  }

  div.@{ant-prefix}-input-number,
  .@{ant-prefix}-picker,
  .@{ant-prefix}-time-picker {
    width: 100%;
  }

  .@{ant-prefix}-form .no-label div.@{ant-prefix}-form-item-label label:after {
    display: none;
  }

  .@{ant-prefix}-form div.@{ant-prefix}-form-item-label label.@{ant-prefix}-form-item-no-colon:after {
    content: ' ';
  }
}

.webiny-pb-page-document {
  padding-top: 20px;
  background: #fff;
  overflow: hidden;
  padding-left: 5px;
  padding-right: 5px;
  min-height: calc(100vh - 20px);
}

// setting table
@formbuild-setting-color: #757575;
@formbuild-setting-hover-color: #3f9aff;
@formbuild-setting-border-color: #e0e0e0;
@formbuild-setting-default-color: @formbuild-primary-color;
@formbuild-setting-help-color: #ee9e58;
@formbuild-setting-help-hover-color: #ee7c18;

.formbuild-setting-table {
  margin-bottom: 5px;

  .@{ant-prefix}-table-thead th {
    color: @formbuild-setting-color;
  }

  .@{ant-prefix}-table-thead th,
  .@{ant-prefix}-table-footer {
    background: transparent !important;
    padding: 5px 0;
    border: 0;
    margin-top: 8px;
    text-align: center;

    a {
      color: @formbuild-setting-color;
    }

    &:hover {
      a {
        color: @formbuild-setting-hover-color;
      }
    }
  }

  .@{ant-prefix}-table-placeholder {
    border-width: 0 !important;
    margin-top: 5px;
  }

  .@{ant-prefix}-table-body > table {
    &,
    .@{ant-prefix}-table-thead {
      border: 0;
    }

    border-collapse: collapse;

    .@{ant-prefix}-table-thead {
      border-bottom: 1px solid #f0f0f0;
    }

    .@{ant-prefix}-table-tbody > tr:last-of-type > td {
      border-bottom: 0 !important;
    }

    td {
      padding-left: 2px !important;
      padding-right: 1px !important;
    }
  }

  .@{ant-prefix}-table-content > .@{ant-prefix}-table-scroll > .@{ant-prefix}-table-header > table > .@{ant-prefix}-table-thead > tr > th {
    padding-left: 2px !important;
  }

  .@{ant-prefix}-table-small.@{ant-prefix}-table-bordered .@{ant-prefix}-table-footer {
    border: 1px solid #f0f0f0 !important;
  }
}

// 左侧工具栏样式
.webiny-toolbar-lowcodeTree {
  height: 100%;
  padding-top: 0;
  overflow: visible !important;
  background: @pagebuilder-control-bg-color;
  border-bottom: 1px solid @pagebuilder-control-border-color;

  > .ant-tabs-bar {
    margin: 0 0 1px 0;

    &,
    .ant-tabs-nav-container,
    .ant-tabs-tab {
      background: @pagebuilder-control-bg;
    }

    .ant-tabs-tab {
      margin: 0 !important;
      padding: 2px 8px 0 !important;
      background: @pagebuilder-control-bg !important;
      border-color: transparent !important;
      border-width: 2px 2px 0 !important;
      border-radius: 0 !important;
      transition: all 0.3s;
      text-align: center;
      overflow: hidden;
    }

    .ant-tabs-tab,
    .ant-tabs-tab-active {
      color: @pagebuilder-control-big-title-color !important;
    }

    .ant-tabs-tab-active {
      font-weight: normal;
      background: @pagebuilder-control-tab-active-bg !important;
      border-color: @pagebuilder-control-tab-active-bg !important;
    }
  }

  > .ant-tabs-content {
    height: calc(100% - 41px);
    border-left: 1px solid @pagebuilder-control-border-color;
    font-size: 12px;

    > .ant-tabs-tabpane-active {
      height: 100%;
    }

    > .ant-tabs-tabpane {
      padding: 0 1px 1px !important;
    }
  }
}

// 右侧工具栏样式
.webiny-ui-element-setting-bar {
  width: 287px;
  height: 50px;
  overflow: hidden;

  .ant-tabs-bar {
    margin: 0;
  }
  .@{ant-prefix}-collapse-borderless > .@{ant-prefix}-collapse-item > .@{ant-prefix}-collapse-content > .@{ant-prefix}-collapse-content-box {
    padding: 0;
  }

  .@{ant-prefix}-slider-with-marks {
    margin-bottom: 0;
  }

  .@{ant-prefix}-input-group-wrapper {
    top: 0 !important;
  }

  .@{ant-prefix}-collapse-content-active {
    overflow: visible !important;
  }

  > .ant-tabs {
    > .ant-tabs-bar {
      .ant-tabs-nav-container {
        height: auto !important;
      }

      .ant-tabs-tab {
        background: transparent !important;
        height: unset !important;
        line-height: unset !important;
      }
    }

    > .ant-tabs-content > .ant-tabs-tabpane {
      padding: 0 1px 1px !important;
    }
  }
}

.formbuild-collapse {
  background: transparent !important;
  padding: 0 1px;

  .@{ant-prefix}-collapse-header {
    padding-left: 5px !important;
  }
}

// settings
.formbuilder-setting-input {
  background: transparent !important;

  &:before,
  &:after {
    display: none;
  }

  .mdc-text-field__input {
    caret-color: unset;
    border: 1px solid @formbuild-setting-border-color !important;
    height: 26px !important;
    padding: 4px 12px !important;

    &:hover,
    &:focus {
      border-color: @formbuild-setting-hover-color !important;
    }
  }

  .mdc-line-ripple {
    display: none !important;
  }
}

.formbuilder-setting-select {
  .webiny-ui-select {
    background: transparent !important;
    height: 26px !important;
    width: 90px;
    border-radius: 1px !important;

    &:after,
    &:before {
      display: none !important;
    }

    border: 1px solid @formbuild-setting-border-color !important;

    select {
      height: 26px !important;
      padding: 1px 8px !important;
      line-height: 14px !important;
    }
  }

  .mdc-line-ripple {
    display: none !important;
  }

  .mdc-select__dropdown-icon {
    bottom: 1px;
    background: url('data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%23000000%22%20fill-rule%3D%22evenodd%22%20opacity%3D%220.54%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E')
      no-repeat center !important;
  }
}

.frombuilder-setting-help {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 35px;
  height: 35px;
  line-height: 1;
  padding-top: 7px;
  text-align: center;
  border-radius: 0 0 5px 0;
  background-color: white;
  border-radius: 3px;
  box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.1), 2px 1px 2px 0 rgba(0, 0, 0, 0.1), -2px 1px 2px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 10;
  z-index: 200;

  span {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: @formbuild-setting-help-color;
    padding-top: 2px;
  }

  svg {
    width: 11px;
    height: 11px;
  }

  &:hover {
    span {
      background: @formbuild-setting-help-hover-color;
    }
  }

  &,
  &:hover {
    color: white;
  }
}

.formbuilder-setting-label-underline {
  border-bottom: 1px dashed #bcbcbc;
  height: 18px;
  line-height: 18px;
  vertical-align: 3px;
  display: inline-block;
}

// design card component collapse
.formBuilder-show-collapse {
  margin: 0 !important;

  > .ant-collapse-item {
    border: 0 !important;
  }
}

// fix ngportal
html {
  font-size: 16px !important;
}

// style
.webiny-ui-element-setting-bar {
  .ant-tabs-nav-container-scrolling {
    padding: 0 !important;
  }

  .ant-tabs-nav .ant-tabs-tab {
    padding: 10px 0 !important;
  }

  .ant-tabs-line > .ant-tabs-bar .ant-tabs-tab {
    margin-left: 12px;
    margin-right: 12px;
  }
}

// design form
.webiny-pb-page-document,
.webiny-pb-layout-form-container,
.webiny-pb-layout-block-container {
  .@{ant-prefix}-form-horizontal .@{ant-prefix}-form-item-control-wrapper {
    flex: 1 1 0;
  }

  .@{ant-prefix}-table-thead > tr > th {
    position: relative;
  }
  // table
  .@{ant-prefix}-table-thead > tr > th {
    position: relative;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .@{ant-prefix}-table-column-title {
    overflow: visible;
    height: auto;

    .webiny-pb-layout-table-header-cell {
      > div > div > div > div > div > div {
        margin-top: 6px;
      }
    }

    > div {
      &:hover,
      &.cutIGC {
        .webiny-pb-layout-table-header-cell {
          > div > div > div > div > div > div {
            margin-top: 10px;
          }
        }
      }
    }
  }

  .@{ant-prefix}-table-header-column {
    overflow: visible;
    height: auto;
    min-height: 30px;
    width: 100%;
  }

  .@{ant-prefix}-table-fixed,
  .@{ant-prefix}-table-thead,
  .@{ant-prefix}-table-thead tr,
  .@{ant-prefix}-table-thead th,
  .@{ant-prefix}-table-tbody,
  .@{ant-prefix}-table-tbody > tr,
  .@{ant-prefix}-table-tbody > tr > td,
  .@{ant-prefix}-table-tbody > tr > td > div {
    position: relative;
  }

  .webiny-pb-layout-table-header-cell {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    height: 30px;
    line-height: 30px;
  }

  // .@{ant-prefix}-table-thead th,
  // .@{ant-prefix}-table-thead td {
  //   min-width: 164px;
  // }
  .@{ant-prefix}-table-thead .webiny-pb-page-element-container {
    line-height: 1;
  }

  .@{ant-prefix}-table-thead .webiny-pb-page-element-container,
  .@{ant-prefix}-table-tbody > tr > td .webiny-pb-page-element-container {
    &.iBDPDe {
      position: relative;
    }

    .element-holder {
      top: -8px;

      > div {
        padding-top: 1px;
        padding-bottom: 3px;
      }

      > div > div {
        margin-bottom: -3px;
      }
    }
  }

  .@{ant-prefix}-table {
    .cutIGC > .type {
      z-index: 2;
    }

    .element-holder {
      > div > div {
        z-index: 10;
      }

      label {
        z-index: 15;
        cursor: pointer;
      }
    }

    .webiny-pb-page-if {
      padding-top: 10px;

      .type {
        &,
        .element-holder {
          left: 0;
          right: auto;
        }
      }

      .webiny-pb-page-element-container {
        min-height: auto;
      }
    }
  }

  tbody.@{ant-prefix}-table-tbody > tr {
    &:nth-of-type(2),
    &:nth-of-type(3) {
      &.fdx-table-row-selected,
      &:hover td,
      &:focus td,
      td {
        background: transparent !important;
      }

      td::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
      }
    }

    &:nth-of-type(2) td::after {
      background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.6));
    }

    &:nth-of-type(3) td::after {
      background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.9));
    }
  }

  td > div > .webiny-pb-page-element-container {
    height: inherit;
  }

  th .webiny-pb-layout-table-header-cell {
    clear: both;

    > div > div {
      float: left;
    }

    span > span {
      display: block;
      width: 148px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      line-height: 1;
      float: left;
    }
  }

  td {
    min-height: 34px;
    text-overflow: unset !important;

    .webiny-pb-layout-table-row-cell,
    > div {
      display: flex;
      height: auto !important;

      .webiny-pb-page-element-container {
        min-height: 25px;
        line-height: 25px;
      }
    }
  }

  .@{ant-prefix}-table-tbody > tr {
    &:nth-of-type(2),
    &:nth-of-type(3) {
      > td > div > div {
        min-height: auto !important;
      }
    }
  }

  .@{ant-prefix}-form .@{ant-prefix}-form-item-label label {
    padding-right: 12px;
  }

  .@{ant-prefix}-row {
    display: flex;
  }

  .@{ant-prefix}-form-item-hidden,
  .@{ant-prefix}-form-item-hidden.@{ant-prefix}-row {
    display: none;
  }

  div.@{ant-prefix}-row {
    overflow: visible;
  }

  div.@{ant-prefix}-input-number,
  .@{ant-prefix}-picker,
  .@{ant-prefix}-time-picker {
    width: 100%;
  }

  .@{ant-prefix}-carousel .slick-dots li button {
    background: #666;
  }

  .@{ant-prefix}-carousel .slick-dots li.slick-active button {
    background: #333;
  }

  // radioButton
  .@{ant-prefix}-radio-group,
  .@{ant-prefix}-checkbox-group {
    display: flex;
    line-height: unset;
    flex-wrap: wrap;
  }

  .@{ant-prefix}-radio-button-wrapper {
    height: auto;
    // overflow: hidden;

    input[type='radio'] {
      display: none;
    }
  }
}

.pagebuilder-design-area {
  .@{ant-prefix}-spin-nested-loading {
    height: 100%;

    .@{ant-prefix}-spin-container {
      height: 100%;
    }

    .@{ant-prefix}-spin-blur {
      opacity: 0;
    }
  }
}

.pb-editor-if-setting {
  .@{ant-prefix}-radio-inner {
    width: 12px;
    height: 12px;
    top: -1px;

    &::after {
      top: 1px;
      left: 1px;
    }
  }
}

// black theme
.formbuilder-bg {
  background: @formbuild-bg;
}

.formbuilder-border-color {
  border-color: @formbuild-border-color;
}

.formbuilder-title-bg {
  background-color: @formbuild-top-bg;
}

.formbuilder-border-dark-color {
  border-color: @formbuild-border-dark-color;
}

.webiny-ui-element-setting-bar {
  .ant-tabs-nav .ant-tabs-tab {
    color: @formbuild-color;
  }

  .ant-tabs-top-bar {
    border-color: @formbuild-border-color;
  }

  .ant-tabs-bar {
    background: @formbuild-title-bg;

    span {
      font-size: 12px !important;
    }
  }

  .ant-tabs-nav .ant-tabs-tab-active {
    color: @formbuild-color;
  }

  .ant-tabs-ink-bar {
    background: @formbuild-color;
  }

  .ant-collapse-icon-position-right > .ant-collapse-item > .ant-collapse-header {
    color: @formbuild-color !important;
  }

  .ant-form-item-label > label {
    color: @formbuild-color !important;
  }

  .ant-form input.ant-input {
    // background: @formbuild-control-input-bg;
    color: @formbuild-color;
    // border: 1px solid @formbuild-setting-border-color !important;
  }

  .mdc-menu-surface--anchor .mdc-menu-surface + div {
    background: @formbuild-control-input-bg;
    color: @formbuild-color;
  }

  .mdc-typography--overline,
  .ant-collapse-content-box {
    color: @formbuild-color !important;
    padding: 0 !important;
  }

  .mdc-select:not(.mdc-select--disabled) {
    background: @formbuild-control-input-bg !important;
    color: @formbuild-color !important;
    border: 0 !important;
  }

  .formbuilder-setting-input .mdc-text-field__input {
    background: @formbuild-control-input-bg !important;
    color: @formbuild-color !important;
    border: 0 !important;
  }

  svg.webiny-ui-icon {
    &,
    path {
      color: #00ccb0 !important;
    }
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
  .ant-input-number {
    background: @formbuild-control-input-bg !important;
    color: @formbuild-color !important;
  }

  .ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
    height: 26px;

    input {
      height: 22px;
      line-height: 22px;
    }

    .ant-select-selection-placeholder,
    .ant-select-selection-item {
      line-height: 24px;
    }
  }

  input {
    color: @formbuild-color !important;

    &::-webkit-input-placeholder {
      color: @formbuild-placeholder-color;
    }

    &:-moz-placeholder {
      color: @formbuild-placeholder-color;
    }

    &::-moz-placeholder {
      color: @formbuild-placeholder-color;
    }

    &:-ms-input-placeholder {
      color: @formbuild-placeholder-color;
    }
  }
}

.formbuild-icon-design {
  path {
    &:first-of-type {
      fill: none !important;
    }

    &:last-of-type {
      fill: currentColor !important;
      color: #333 !important;
    }
  }
}

.webiny-drawer-content {
  background: @formbuild-toolbar-bg;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  &::-webkit-scrollbar {
    width: 4px;
    height: 4px;
    background-color: #d3dadb;
  }

  &::-webkit-scrollbar-track {
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
  }

  &::-webkit-scrollbar-thumb {
    background-color: #949fa3;
    border-radius: 0;
  }
}

.formbuilder-toolbar-wrap {
  width: 187px;
}

// theme
.formbuild-dropdown-active {
  &,
  &:hover {
    background: @formbuild-primary-color;
    color: white;
  }
}

// search
.lowcode-builder_search {
  background: @formbuild-toolbar-bg;
  height: 32px;
  padding: 0 3px;
  border-right: 1px solid #bdc5c7;
  position: relative;

  .ant-input-affix-wrapper {
    width: 89%;
  }

  input {
    &::-webkit-input-placeholder {
      color: #949fa3;
      font-style: italic;
    }

    &:-moz-placeholder {
      color: #949fa3;
      font-style: italic;
    }

    &::-moz-placeholder {
      color: #949fa3;
      font-style: italic;
    }

    &:-ms-input-placeholder {
      color: #949fa3;
      font-style: italic;
    }
  }

  .ant-input {
    background: transparent;
    height: 26px;
    margin-top: 3px;
    padding-left: 23px !important;
    border-color: transparent !important;
    font-size: 12px;

    &:hover,
    &:focus {
      outline: 0;
      box-shadow: none;
    }
  }

  .ant-input-prefix {
    left: 4px;
    top: 55%;
    cursor: pointer;

    svg {
      width: 16px;
      height: 16px;
      fill: #949fa3;
    }
  }
}

.lowcode-builder_collapse {
  width: 14px;
  height: 14px;
  position: absolute;
  top: 10px;
  right: 8px;
  cursor: pointer;
  fill: #949fa3;
}

.lowcode-builder_collapse_add {
  width: 14px;
  height: 14px;
  position: absolute;
  top: 10px;
  right: 24px;
  cursor: pointer;
  fill: #949fa3;
}

.lowcode-builder_menu_collapse {
  width: 45px;

  .lowcode-builder_collapse {
    right: 15px;
  }

  .mdc-list {
    padding-left: 0;
    padding-right: 0;
    width: 100%;

    > div {
      margin-bottom: 0;
    }
  }

  .mdc-list-item {
    display: none;

    + div {
      padding: 0 !important;

      > * {
        width: 100%;

        > div > div > div {
          min-height: 24px;

          > div {
            height: 24px;
            margin: 0;
            border: 0;
            margin-bottom: 0;
          }
        }
      }

      .itemsCenter {
        > div {
          &:nth-of-type(2) {
            display: none;
          }

          &:nth-of-type(1) {
            svg {
              width: 15px !important;
              height: 15px !important;
            }
          }
        }
      }
    }
  }

  .page-builder-toolbar-group-item {
    padding-left: 0;
    padding-right: 0;

    > * {
      width: 100%;
      height: 38px;

      &:hover {
        .page-builder-toolbar-menu-item {
          height: 38px !important;
        }
      }
    }

    .page-builder-toolbar-menu-icon + div {
      display: none;
    }
  }
}

// setting
.webiny-ui-element-setting-bar {
  background: white;

  .ant-slider-rail {
    background: #999;
  }
}

// autocomplete
.certain-category-search-dropdown {
  > div > ul > li:first-of-type > ul {
    display: none;
  }
}

// 移动端样式
.webiny-pb-page-document.mobile {
  .webiny-pb-layout-form-container,
  .webiny-pb-layout-block-container {
    .fxm-list {
      text-align: left;
      border-bottom: none;

      .fxm-list-body {
        border-top: none;
        padding-bottom: 12px;
        padding-top: 12px;
      }

      .fxm-list-item {
        border: 1px solid #eee;
        border-radius: 4px;
      }
    }

    .fxm-radio {
      border: 1px solid #ccc;
      border-radius: 50%;
      width: 18px;
      height: 18px;

      &.fxm-radio-checked {
        border-color: @brand-primary;
      }
    }

    .fxm-radio-inner:after {
      width: 10px;
      height: 10px;
      top: 3px;
      left: 2px;
      border-radius: 50%;
      content: '';
      transform: none;
    }

    .fxm-radio.fxm-radio-checked .fxm-radio-inner:after {
      background: @brand-primary;
      display: block;
    }
  }
}

// toolbar
.page-builder-categories-list {
  background-color: transparent;
  padding: 0 0 5px;
  width: 100%;
}

.page-builder-toolbar-menu-item {
  height: 68px;
  margin: 0 1px;
  background: transparent;
  border-radius: 2px;
  padding: 8px 1px 0;
  transition: all 0.3s;

  > div:first-of-type {
    height: 26px;
  }

  > div:last-of-type {
    font-size: 12px;
    color: #39464b;
    width: 100%;
    height: 26px;
    line-height: 14px;
    text-align: center;
    display: -webkit-box;
    vertical-align: top;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &:hover {
    background: #d2d3d4;
  }
}

.page-builder-toolbar-menu-icon {
  z-index: 50;
  font-size: 12px;
  margin: 0 auto;

  svg {
    width: 22px !important;
    height: 22px !important;
  }
}

.page-builder-toolbar-group-title {
  width: 100%;
  background-color: #e7e7e7;
  height: 33px !important;
  padding-left: 10px;

  > div {
    display: inline-block;
    vertical-align: top;
    height: 33px;
    padding: 8.5px 0px 8.5px 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 16px;
  }

  svg {
    width: 15px !important;
    height: 15px !important;
  }
}

.page-builder-toolbar-group-item {
  border-top: 0px solid #bdc5c7;
  display: flex;
  flex-wrap: wrap;

  > div {
    width: 50%;
  }

  padding: 10px;

  &:first-of-type {
    border-top: 0;
  }
}

// fix table
.webiny-pb-editor-content-preview {
  .ant-table-empty {
    table > thead.ant-table-thead {
      display: none;
    }

    .ant-table-placeholder > div > div {
      border: 0;
    }

    .ant-table-placeholder {
      border-bottom: 0;
      padding: 0;
    }
  }

  .pagebuilder-table-empty-tpl {
    width: 150px;
    height: 152px;
    position: relative;
    margin: 15px auto 0;

    img {
      width: 100%;
      height: 100%;
    }

    > span {
      position: absolute;
      top: 86px;
      right: 125px;
      width: 80px;
      font-size: 12px;
    }
  }

  .ant-table-column-title {
    > .bYqJjl .webiny-pb-layout-table-header-cell > div > div {
      border: 0;
    }
  }

  // fix table alignment
  .type + div > .fdx-table > .ant-table-wrapper {
    tbody > tr {
      &:not(:first-of-type) {
        > td > div {
          display: flex;

          > * {
            flex: 100%;
          }
        }
      }
    }
  }
}

.pagebuilder-bar-separate {
  width: 1px;
  height: 16px;
  background: #9e9d9d;
  display: inline-block;
  margin: 4px 5px 0;
}

.pagebuilder-bar-opt-active > div {
  background: #c5c5c5 !important;
  border-color: #808080 !important;
}

.formbuild-btn-opt-default-color svg.pagebuilder-bar-opt-arrow {
  width: 6px !important;
  height: 6px !important;
  vertical-align: 4px;
  margin-left: 3px;
}

.pagebuilder-title-tag {
  background: #596669;
  border-radius: 3px;
  line-height: 16px;
  display: inline-block;
  vertical-align: 2px;
  margin: 0 3px 0 0;
  padding: 0 1px;
  color: white;
  font-size: 12px;

  + span {
    vertical-align: 3px;
  }
}

.medium-editor-element {
  min-height: auto;

  p {
    margin: 0;
  }
}

// fix setting panel
.pagebuilder-lf {
  form {
    .ant-form-item-label label {
      width: 100%;
      float: left;
    }

    .ant-form-item-control-input-content {
      line-height: 18px;
    }
  }
}

.ant-modal .ant-modal-footer {
  position: relative;
}
.mdc-layout-grid.no-bottom-padding {
  overflow: hidden;

  > .mdc-layout-grid__inner {
    padding: 8px 5px 0;

    > div {
      margin-bottom: 0 !important;
    }
  }
}

.modal-base-code {
  > .ant-drawer-content-wrapper > .ant-drawer-content > .ant-drawer-wrapper-body > .ant-drawer-body {
    height: calc(100% - 10px);
    position: relative;
  }
}

canvas.decorationsOverviewRuler {
  right: -14px !important;
}

.modal-base-con-box {
  margin-top: 20px;
  height: calc(100% - 54px);
}

.expressionContainer {
  cursor: pointer;
}

.webiny-pb-layout-block-container.flex {
  &.justify-between {
    > .webiny-pb-base-page-element-style {
      display: flex;
      justify-content: space-between;
    }
  }

  &.justify-around {
    > .webiny-pb-base-page-element-style {
      display: flex;
      justify-content: space-around;
    }
  }

  &.justify-start {
    > .webiny-pb-base-page-element-style {
      display: flex;
      justify-content: flex-start;
    }
  }

  &.justify-center {
    > .webiny-pb-base-page-element-style {
      display: flex;
      justify-content: center;
    }
  }

  &.justify-end {
    > .webiny-pb-base-page-element-style {
      display: flex;
      justify-content: flex-end;
    }
  }
}

// fix style, wrap block
.webiny-pb-page-element-container[type='document'] > div > .webiny-pb-page-block-container {
  height: 100%;
}

.webiny-pb-page-document {
  .webiny-pb-page-layout-container {
    width: 100%;
  }

  form {
    &.ant-form-horizontal {
      > div > div > div[type='block'] .webiny-pb-base-page-element-style {
        margin-top: 4px;
      }
    }

    &.ant-form-vertical {
      display: flex;
      flex-flow: row wrap;

      > * {
        margin-bottom: 14px;
      }
    }
  }
}

// fix theme, 后面移到皮肤里
form.ant-form-horizontal {
  flex: none;
  display: unset;

  .float-right {
    float: right !important;
  }
}

// temp
.card-round_img {
  display: block;
}

// 增加全局类，fix皮肤样式 fix 5g
.tabs-lowcodetree > .@{ant-prefix}-tabs-bar {
  .@{ant-prefix}-tabs-tab-next,
  .@{ant-prefix}-tabs-tab-prev {
    width: 0;
  }

  .@{ant-prefix}-btn {
    background-color: transparent;
  }
}

.pagebuilder-fixedright {
  .@{ant-prefix}-form.@{ant-prefix}-form-horizontal:not(.horizontal-form) .@{ant-prefix}-form-item {
    margin-bottom: 0;
    min-height: auto;
    padding: 0;
  }
  .@{ant-prefix}-btn {
    background-color: transparent !important;
    border: 1px solid#ddd !important;
    color: #333 !important;

    &:hover,
    &:focus,
    &:active,
    &.active {
      background-color: transparent;
    }
  }

  .ant-radio-button-wrapper:not(.ant-radio-button-wrapper-disabled) {
    background-color: transparent !important;
    color: #333;
  }

  .ant-form-horizontal {
    .ant-form-item {
      flex-direction: row !important;
    }
  }

  .@{ant-prefix}-select-clear{
    right: 8px;
  }
}

.lowcodetree-setting-modal {
  .@{ant-prefix}-form-item {
    margin-bottom: 0;
    min-height: auto !important;
    overflow: hidden;
  }
}

.lowcodetree-meta {
  .@{ant-prefix}-btn {
    border: 0 !important;
    background-color: transparent !important;
    color: #333 !important;

    &:hover,
    &:focus,
    &:active,
    &.active {
      background-color: transparent;
    }
  }
}

// tooltip
.lowcode-tooltip-white {
  .ant-tooltip-inner,
  .ant-tooltip-arrow::before {
    background-color: white;
    color: #333;
  }
}

// setting
.pagebuilder-tree-property {
  .ant-select-search__field,
  .ant-select-search__field__wrap {
    float: left;
  }
  .ant-descriptions-view .ant-descriptions-row {
    th {
      background: white !important;
      width: 45px !important;
    }
    th,
    td {
      padding: 2px 3px !important;
    }
  }
  .ant-form-item {
    border-bottom: 1px solid #e8f4f9;
    margin-bottom: 0;
    input {
      background: transparent;
      border: 0;
      color: #1a1a1a;
      font-size: 12px;
      outline: none;
      box-shadow: none;
      height: 18px;
      line-height: 18px;
      padding: 0 2px;
    }
    // 嵌套form样式
    &.menuSelector_form_item {
      position: relative;
      .ant-select-auto-complete.ant-select .ant-input {
        height: 18px;
      }
      .ant-select-auto-complete.ant-select .ant-select-selection__rendered {
        line-height: 18px;
      }
      .ant-form-item-label {
        height: auto;
        line-height: unset;
      }
      .ant-form-item-control {
        position: unset;
        // overflow: auto;
        min-height: 18px;
        height: auto;
      }
    }
  }
  &.ant-form div.ant-form-item-label,
  &.ant-form .ant-form-item-label label {
    // height: 18px;
    min-height: 18px;
    line-height: 18px;
    color: #1a1a1a;
    padding-top: 0;
    font-size: 12px;
    text-align: left;
    padding-left: 2px;
    &:after {
      display: none;
    }
  }
  &.ant-simple-form.ant-form-horizontal .ant-form-item-label {
    &,
    label {
      padding-right: 3px;
    }
  }
  &.ant-simple-form.ant-form-small .ant-form-item-label > label {
    padding-bottom: 0px;
    // border-right: 1px solid #e8f4f9;
  }
  .ant-form-item-control {
    padding: 0 4px 0 0;
  }
  .ant-form-item-control-input {
    min-height: 16px !important;
  }
  .ant-select-selector {
    border: 0 !important;
    color: @pagebuilder-control-big-title-color !important;
    font-size: 12px;
    box-shadow: none !important;
    height: 18px !important;
    line-height: 18px !important;
    padding-left: 2px !important;
  }
  .ant-select-selection {
    border: 0 !important;
    color: @pagebuilder-control-big-title-color !important;
    font-size: 12px;
    box-shadow: none !important;
    height: 18px !important;
    line-height: 18px !important;
    padding-left: 2px !important;
  }
  .ant-input-number {
    height: 18px;
    font-size: 12px;
    border: 0;
  }
  .ant-select {
    // height: 18px !important;
    // overflow: hidden;
  }
  .ant-picker {
    padding: 0;
    border: none;
  }
  .ant-select-selection-search,
  .ant-select-selection-placeholder,
  .ant-select-selection-item {
    line-height: 18px !important;
    height: 18px !important;
    overflow: hidden;
  }
  .ant-form-item-control {
    // height: 18px;
    min-height: 18px;
    border-left: 1px solid #e8f4f9;
    overflow: hidden;
    .ant-select-auto-complete.ant-select {
      .ant-input {
        height: auto;
      }
      .ant-select-selection__rendered {
        line-height: 18px;
      }
    }
  }
  .ant-form-item.ant-form-item-has-error {
    .ant-form-item-control {
      border: 1px solid @pagebuilder-control-error-color;
    }
  }
}
// .pagebuilder-tree-property {
//   .ant-select-search__field,
//   .ant-select-search__field__wrap {
//     float: left;
//   }
// }

/*fix ide*/
.webiny-pb-page-element-container[type='modal'] {
  z-index: 11;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

/*panel label */
form.ant-form-horizontal div.ant-form-item-label > label,
form.ant-form-horizontal div.ant-form-item-label > label > span {
  text-overflow: unset;
  white-space: normal;
  line-height: 15px !important;
}

form.ant-form-horizontal div.ant-form-item-label > label {
  height: auto !important;
}

form.ant-form-horizontal div.ant-form-item-label {
  display: flex;
  align-items: center;
  transform: translateY(2px);
}