@import "Colors";
@import "Connector";

$state-min-width: 120px;
$state-min-height: 100px;
$state-border: 1px solid #000000;
$state-name-padding: 5px;
$state-background-color: #FCFCFC;
$state-name-height: 16px;
$state-border-radius: 13px;

@mixin State {
  .state {
    min-width: $state-min-width;
    height: auto;
    overflow: hidden;
    background-color: $state-background-color;
    border: $state-border;
    border-radius: $state-border-radius;

    .name {
      white-space: nowrap;
      font-size: 12px;
      font-weight: bold;
      text-align: center;
      overflow: hidden;
      text-overflow: ellipsis;
      border-bottom: 1px solid #000000;
      height: 16px;
      line-height: 16px;
      padding-left: $state-name-padding;
      padding-right: $state-name-padding;
    }

    .internal-transitions {
      white-space: pre;
      font-size: 12px;
      font-weight: bold;
      text-align: left;
      line-height: 16px;
      padding-left: $state-name-padding;
      padding-right: $state-name-padding;
    }

    li {
      width: auto;
      overflow: hidden;
      text-overflow: ellipsis;
      list-style-type: none;
      white-space: pre;
      font-size: 12px;
      font-weight: bold;
      text-align: left;
      line-height: 14px;
    }

    .connector {
      @include connector_basics;

      &.top {
        left: 50%;
        top: $connector-size / -2;
      }

      &.bottom {
        left: 50%;
        bottom: $connector-size / -2;
      }

      &.left {
        position: absolute;
        margin-left: 0;
        top: 50%;
        left: $connector-size / -2;
	right: 100%;
      }

      &.right {
        position: absolute;
        top: 50%;
        right: $connector-size / -2;
	left: 100%;
      }
    }
  }

  .connector {
    @include connector_basics;

    margin-left: $connector-size / -2;
    left: 50%;

    &.top {
      top: $connector-size / -2;
    }

    &.bottom {
      bottom: $connector-size / -2;
    }
  }
}

@mixin SelectedState {
  .state {
    background-color: $selected-background-color;
    border-color: $selected-border-color;
  }
}