@import './../theme/vars.scss';

$propertyPrefixCls: property;
$property-item-height: 2.5em;
$property-space-width: 20px;

// grid
.#{$propertyPrefixCls}-grid {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 12px;
  color: black;
  user-select: none;
}

// group

.#{$propertyPrefixCls}-group {
  font-size: 12px;
  background: #ecf0f1;
  border: 1px solid #ecf0f1;

  &-hidden {
    display: none;
  }

  > .#{$propertyPrefixCls}-group {
    background: #e6e6e6;
    border: 1px solid #e6e6e6;
  }

  &-header {
    display: flex;
    height: $property-item-height;
    flex-direction: row;
    align-items: center;
    cursor: pointer;

    &-icon {
      width: $property-space-width;
      color: #555;
      text-align: center;
      pointer-events: none;

      i {
        font-size: 12px;
      }
    }

    &-title {
      flex: 1;
      height: 2.5em;
      padding-left: 4px;
      line-height: 2.5em;
      pointer-events: none;
      border-bottom: 1px solid #d9d9d9;
    }
  }

  &-content {
    position: relative;
    margin-left: $property-space-width;
    overflow-y: hidden;
    background: white;

    &-unexpanded {
      display: none;
      opacity: 0;
    }

    &-inner {
      display: flex;
      line-height: $property-item-height;
      vertical-align: middle;
      border-bottom: 1px solid #d9d9d9;
      box-sizing: border-box;
      flex-direction: row;

      .#{$propertyPrefixCls}-label {
        display: inline-flex;
        width: 100px;
        padding: 0 4px;
        align-items: center;
        justify-content: flex-start;
      }

      .#{$propertyPrefixCls}-field {
        position: relative;
        display: flex;
        flex: 1;
        height: $property-item-height;
        padding: 0;
        border-left: 1px solid #d9d9d9;
        align-items: center;
      }
    }
  }
}

// add property-group animate
.#{$propertyPrefixCls}-group-anim {
  overflow: hidden;

  &-active {
    transition: height 0.12s, opacity 0.12s;
  }
}

// color
.#{$propertyPrefixCls}-color {
  display: flex;
  align-items: center;

  &-value {
    min-width: 5em;
  }

  .amos-custom-color-picker-swatch {
    line-height: 14px;
  }
}

// o select
.property-o-select {
  font-size: 12px;
  border: 1px solid #d8d8d8;
  border-radius: 2px;
  outline: none;

  &,
  * {
    box-sizing: border-box;
  }

  &:active,
  &:hover {
    border-color: var(--primary-color);
  }
}
