ux-partition-map {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background-color: #000;

  .partition-map-segment {
    position: absolute;
    box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
    cursor: pointer;

    &:focus.ux-focus-indicator-active {
      outline: none !important;
      box-shadow: none !important;

      &.partition-map-segment-dark {
        .partition-map-segment-content {
          box-shadow: inset 0 0 0 3px #000;
        }
      }

      &.partition-map-segment-light {
        .partition-map-segment-content {
          box-shadow: inset 0 0 0 3px #fff;
        }
      }
    }

    &.partition-map-segment-dark {
      color: #000;
    }

    &.partition-map-segment-light {
      color: #fff;
    }
  }

  .partition-map-segment-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: ~'calc(100% - 4px)';
    height: ~'calc(100% - 4px)';
    transition:
      box-shadow 250ms ease-in-out,
      background-color 250ms ease-in-out;
    overflow: hidden;
    user-select: none;
    margin: 2px;
    border-radius: 2px;

    &:hover {
      background-color: rgba(0, 0, 0, 0.1);
      box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    }

    &.partition-map-segment-content-hidden {
      .partition-map-segment-label {
        opacity: 0;
      }
    }
  }

  .partition-map-segment-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    margin: 0 1rem;
    font-size: 1rem;
    cursor: pointer;
    opacity: 1;
    transition: opacity 250ms ease-in-out;
  }
}
