/**
 MIXIN
 =====
 A single mixin inside the object inspector
 It could be the object's own properties
 or a mixin the object extends
*/

$mixin-left-padding: 22px;

.mixin-name {
  border-bottom: 1px solid var(--base03);
  padding: 4px 2px 4px $mixin-left-padding;
  z-index: 1;

  &:active {
    background-color: var(--base02);
  }

  &::before {
    color: var(--base10);
    content: "\25B6";
    font-size: 75%;
    left: 7px;
    margin-right: 5px;
    position: absolute;
    top: 6px;
    transform: rotate(0deg);
    transition: all 0.1s;
  }
}

.mixin-props-no .mixin-name::before {
  opacity: 0;
}

.mixin-state-expanded .mixin-name::before {
  transform: rotate(90deg);
}

.mixin-properties {
  border-bottom: 1px solid var(--base03);
  padding: 3px 0 5px;
}

.mixin-property {
  min-height: 19px;
  padding-bottom: 1px;
  padding-top: 1px;

  button {
    background: none;
    border: none;
    margin: 0;
    padding: 0;
  }

  .pad {
    flex-shrink: 0;
    width: $mixin-left-padding;
  }

  .mixin-calc-btn svg {
    path,
    circle {
      fill: var(--spec07);
    }
  }

  .mixin-send-btn {
    opacity: 0;
    padding-right: 6px;
  }

  .mixin-cp-toggle {
    outline: none;
    width: $mixin-left-padding;

    svg {
      transform: rotate(-90deg) translateY(1px);
      transition: all 0.2s;
    }
  }

  .mixin-cp-toggle-expanded {
    svg {
      transform: rotate(0deg);
    }
  }
}

/* Buttons */

.mixin-property-overridden-by {
  display: none;
}

.mixin-property-name {
  max-width: 50%;
}

.mixin-property-value {
  flex: 1;
  min-height: 14px;
}

.mixin-property-value-txt {
  border: 1px solid var(--base09);
}

.mixin-property .type-function {
  color: var(--base08);
}

.mixin-property .type-object {
  color: var(--base11);
}

.mixin-property .type-ember-object,
.mixin-property .type-object,
.mixin-property .type-array {
  cursor: pointer;
}

.mixin-property .type-null,
.mixin-property .type-boolean {
  color: var(--spec03);
}

.mixin-property .type-descriptor {
  color: var(--spec02);
  cursor: pointer;
}

.mixin-property .type-service {
  color: var(--spec09);
}

.mixin-property:not(.mixin-property-state-overridden):hover {
  background-color: var(--base01);
}

.mixin-property-state-overridden:hover .mixin-property-overridden-by {
  display: inline;
}

.mixin-property:not(.mixin-property-state-overridden):hover .mixin-send-btn {
  opacity: 1;

  &:active {
    opacity: 0.5;
  }
}
